On Apr 3, 8:34 pm, "[email protected]" <[email protected]>
wrote:
> 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?
http://www.cryptopp.com/wiki/Ccm

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