Here is my new question. Who can answer this?

I have two different encrypted text.
But after decrypting this, i've got same result.

Is that right?

First one came from MySQL AES_ENCRYPTed blob field data.
Second one made by 'CryptoPP::Encryption' class.
Also mcrypt library make same result.

Here is test code.
--------------------------------------------------------------------------------
char plainText[1024];
byte ciphertext[1024];

byte key[AES::DEFAULT_KEYLENGTH];
memset(key, 0x00, sizeof(key));
memcpy(key, "Key1234", 7); //9bytes NULL padded.

unsigned char pC1[16] = {0x90,0xba,0x06,0x74,0x05,0x4c,0x0f,0xaa,
0x48,0x5b,0x09,0x7c,0xea,0x88,0x58,0x3d}

unsigned char pC2[16] = {0x63,0x1C,0x25,0x25,0xEA,0x4E,0xD7,0x0F,
0x93,0x60,0x39,0xF9,0x4C,0x8B,0xF1,0x7A};

ECB_Mode<AES>::Decryption ecbDecryption(key, AES::DEFAULT_KEYLENGTH);
memset(plainText, 0x00, sizeof(plainText));
memcpy(ciphertext, pPwd1, 16);
ecbDecryption.ProcessData((byte*)plainText, (byte*)ciphertext, 16);

ECB_Mode<AES>::Decryption ecbDecryption(key, AES::DEFAULT_KEYLENGTH);
memset(plainText, 0x00, sizeof(plainText));
memcpy(ciphertext, pPwd2, 16);
ecbDecryption.ProcessData((byte*)plainText, (byte*)ciphertext, 16);

--~--~---------~--~----~------------~-------~--~----~
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