Hi Friends..
I use cryptopp5.60, and..
I have a little doubt regarding CMAC with IV..
I tried to calculate CMAC with IV all zeros, after that i tried to
calculate CMAC with different IV, but the result is always the same
with CMAC result with IV all zeros..
here's my code :
void CMAC_AES(){
byte key[16];
byte iv[16];
byte result[16];
byte data[16];
memset(iv, '\xAA', 16);
memset(result, 0, 16);
memset(data, 0, 16);
memset(key, '\x40', 16);
CMAC<AES> obj;
obj.SetKeyWithIV(key, 16, iv, 16);
obj.Update(data, 16);
obj.Final(result);
printf("Result = ");
for(int i=0;i<16; i++)
printf("%02X", result[i]);
printf("\n\n");
}
//Result is always = 815AAC547DC3296052FAE07BF71869BC
Please correct me if i'm wrong..
Thanks..
--
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.