Hi Stef,
> There is a discrepancy between the higher hex > numbers of the Crypto++ result and the Python/PHP results. > But the first Hex number is always correct. Is it possible to run a couple of test vectors through Python/PHP? Also, the final hex conversion from the library is causing you grief. Could you send the results to a file, and then look at the file in a hex editor? I've never observed a problem with Crypto++'s hex converters. > If you have PHP (mcrypt library) installed you can maybe verify it. Sorry - I'm not a *nix kind of guy. Perhaps someone else can verify your script. Some other thoughts which I do not believe to be a problem: > Testing the CFB Mode... Does mcrypt default to AES in CFB mode? I don't believe it is a problem since sizeof(plain text) < sizeof(Block Size), but perhaps $mode = MCRYPT_MODE_CFB [1] is required. > AES::Encryption aesEncryption(key, 24); BLOCKSIZE = KEYLENGTH = 16. I'm not sure about the significance of 24 bytes (AES key sizes are 16 to 32 bytes). > StreamTransformationFilter::NO_PADDING); I don't believe CFB mode uses padding. So this should not be required for Crypto++. Jeff [1] http://us.php.net/mcrypt On 2/5/08, Jeffrey Walton <[EMAIL PROTECTED]> wrote: > Hi Stef, > > > There is a discrepancy between the higher hex > > numbers of the Crypto++ result and the Python/PHP results. > > But the first Hex number is always correct. > Is it possible to run a couple of test vectors through Python/PHP? > > Also, the final hex conversion from the library is causing you grief. > Could you send the results to a file, and then look at the file in a > hex editor? I've never observed a problem with Crypto++'s hex > converters. > > > If you have PHP (mcrypt library) installed you can maybe verify it. > Sorry - I'm not a *nix kind of guy. Perhaps someone else can verify your > script. > > Some other thoughts which I do not believe to be a problem: > > > Testing the CFB Mode... > Does mcrypt default to AES in CFB mode? I don't believe it is a > problem since sizeof(plain text) < sizeof(Block Size), but perhaps > $mode = MCRYPT_MODE_CFB [1] is required. > > > AES::Encryption aesEncryption(key, 24); > BLOCKSIZE = KEYLENGTH = 16. I'm not sure about the significance of 24 > bytes (AES key sizes are 16 to 32 bytes). > > > StreamTransformationFilter::NO_PADDING); > I don't believe CFB mode uses padding. So this should not be required > for Crypto++. > > Jeff > > [1] http://us.php.net/mcrypt > > On 2/5/08, StefSchultz <[EMAIL PROTECTED]> wrote: > > > > Hi Jeffrey, > > > > thanks for replying :-) > > > > > Do the scripts include the trailing '\0' of 'Hello'? > > > > > > Jeff > > > > I'm not sure. I changed plaintext to > > > > const byte plaintext[5] = { 0x68, 0x65, 0x6c, 0x6c, 0x6f }; > > > > and replaced plaintext.length() + 1 through 5. > > > > I don't think that the script includes the trailing '\0' of 'Hello'. > > Both scripts (Python Cryptography Toolkit and PHP) are using a C > > implementation of AES. There is a discrepancy between the higher hex > > numbers of the Crypto++ result and the Python/PHP results. But the > > first Hex number is always correct. > > > > If you have PHP (mcrypt library) installed you can maybe verify it. > > > > Best regards, > > Stefan (Stephen) > > > --~--~---------~--~----~------------~-------~--~----~ 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. -~----------~----~----~----~------~----~------~--~---
