spoka...@yahoo.com
unread,Apr 3, 2012, 8:34:25 PM4/3/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crypto++ Users
Hi all,
Deadline looms. Hope there is an angel out there.
1. In AES CCM mode, is it possible to use ProcessData like the
following and still get tag verification. I don't see how since I am
not entering the authenticated data anywhere for comparison - just the
output buffer and then the encrypted data.
d.ProcessData(&outbuf[0],&buf[bufoffset],encryptedDataSize);
2. The reason we are trying ProcessData is that the following code
crashes on every other attempt:
CCM< AES, TAG_SIZE >::Decryption d;
d.SetKeyWithIV( key, sizeof(key), iv, sizeof(iv) );
d.SpecifyDataLengths( bufoffset, enc.size(), 0 ); (bufoffset has the
10 bytes of authen data
AuthenticatedDecryptionFilter df( d, NULL,
AuthenticatedDecryptionFilter::MAC_AT_END |
AuthenticatedDecryptionFilter::THROW_EXCEPTION );
df.ChannelPut( "AAD", &buf_adata[0], bufoffset );
df.ChannelPut("", (const byte*)enc.data(), enc.size() );
df.ChannelPut( "", (const byte*)tag.data(), tag.size() );
df.ChannelMessageEnd("AAD");
df.ChannelMessageEnd("");
Is there some clean up I need to do after this call?
Has anyone been able to use ProcessData in AESCCM and verify the
authenticated data vs the tag?
Thanks
Don H