Thanks, Adam, I've incorporated your fix for 
SetNewAndDeleteFunctionPointers. Jeff is correct about why some algorithms 
are not in the DLL.

----- Original Message ----- 
From: "Jeffrey Walton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Crypto++ Users" <[EMAIL PROTECTED]>
Sent: Saturday, February 10, 2007 7:19 AM
Subject: Re: Crypto++ & x64


>
> Hi Adam,
>
> The DLL is built for FIPS compliance, so RC2 and DES will not be
> available. This is by design by Wei.
>
> Jeff
>
>
> On 2/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> During my development on Windows Vista/x64 I have found some errors in
>> Crypto++. The first problem is connected with DLL build of Crypto++
>> and SetNewAndDeleteFunctionPointers function. Below I have attached
>> all changes which are required to proper functionality of Crypto++ on
>> Vista/x64:
>>
>> -- [dll.cpp] --
>> --- version 2 in <gustaw-1.3-devel>
>> +++ version 4 in <gustaw-1.3-devel>
>> @@ -103,9 +103,17 @@
>> {
>> s_pNew = (PNew)GetProcAddress(hModule, "[EMAIL PROTECTED]@Z"); // operator
>> new
>> s_pDelete = (PDelete)GetProcAddress(hModule, "[EMAIL PROTECTED]@Z"); //
>> operator delete
>> + if (NULL == s_pNew || NULL == s_pDelete) {
>> + // Windows Vista on x64
>> + s_pNew = (PNew)GetProcAddress(hModule, "[EMAIL PROTECTED]@Z"); //
>> operator new
>> + s_pDelete = (PDelete)GetProcAddress(hModule, "[EMAIL PROTECTED]@Z"); //
>> operator delete
>> + }
>> + if (NULL == s_pNew || NULL == s_pDelete) {
>> + OutputDebugString("Crypto++ was not able to obtain new and delete
>> function pointers.\n");
>> + throw 0;
>> + }
>> return;
>> }
>> -
>> OutputDebugString("Crypto++ was not able to obtain new and delete
>> function pointers.\n");
>> throw 0;
>> }
>> -- cut hiere --
>>
>> I have also noticed, that a lot of API does not contain CRYPTOPP_DLL
>> attribute, e.g.:
>>
>> -- [rc2.h] --
>> --- version 2 in <gustaw-1.3-devel>
>> +++ version 3 in <gustaw-1.3-devel>
>> @@ -21,7 +21,7 @@
>> /// <a href="http://www.weidai.com/scan-mirror/cs.html#RC2";>RC2</a>
>> class RC2 : public RC2_Info, public BlockCipherDocumentation
>> {
>> - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<RC2_Info>
>> + class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public
>> BlockCipherImpl<RC2_Info>
>> {
>> public:
>> void UncheckedSetKey(const byte *userKey, unsigned int length, const
>> NameValuePairs &params);
>> @@ -30,13 +30,13 @@
>> FixedSizeSecBlock<word16, 64> K; // expanded key table
>> };
>> - class CRYPTOPP_NO_VTABLE Enc : public Base
>> + class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Enc : public Base
>> {
>> public:
>> void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
>> byte *outBlock) const;
>> };
>> - class CRYPTOPP_NO_VTABLE Dec : public Base
>> + class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Dec : public Base
>> {
>> public:
>> void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
>> byte *outBlock) const;
>> -- cut hiere --
>>
>> or:
>>
>> -- [des.h] --
>> --- version 2 in <gustaw-1.3-devel>
>> +++ version 3 in <gustaw-1.3-devel>
>> @@ -35,7 +35,7 @@
>> check or correct the parity bits if you wish. */
>> class DES : public DES_Info, public BlockCipherDocumentation
>> {
>> - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<DES_Info>,
>> public RawDES
>> + class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public
>> BlockCipherImpl<DES_Info>, public RawDES
>> {
>> public:
>> void UncheckedSetKey(const byte *userKey, unsigned int length, const
>> NameValuePairs &params);
>> -- cut hiere --
>>
>> Regards,
>> Adam Augustyn
>
> > 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to