Crypto++ AES_CCM questions/isues

38 views
Skip to first unread message

spoka...@yahoo.com

unread,
Apr 3, 2012, 8:34:25 PM4/3/12
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

Jeffrey Walton

unread,
Apr 16, 2012, 11:49:35 PM4/16/12
to Crypto++ Users
Reply all
Reply to author
Forward
0 new messages