Hi Wei,

I think part of my problem is lack of knowledge when working with the
channels that may be present in an object. I've got some basic time
with ChannelSwitch, but that's about it (read: if it has more than one
channel, I'm going to suffer for a while).

Here's how Id like to use these two beasts (but I know it's not a good
modification to the filter):

CCM< AES, ... >::Encryption e;
AuthenticatedEncryptionFilter ef( e,
    new StringSource( plain), new StringSource( aad ),
    new StringSink( cipher ) );

and

CCM< AES, ... >::Decryption d;
AuthenticatedDecryptionFilter df( d,
    new StringSource( cipher ),
    new StringSink( cipher ), new StringSink( aad ) );

I know the additions are incorrect. So what if you add a Source and
Sink instead:
CCMSource(...) and CCMSink(...) which can handle the additional inputs
and call on the AuthenticatedEncryptionFilter or
AuthenticatedDecryptionFilter.

This would lead to a usage similar to below:

CCMSource(
    new StringSource( plain ),
    new StringSource( aad ),
    ef,
    new StringSink( cipher )
);

Above, two input streams are being muxed into the cipher text.
Conversely, demultiplex as follows:

CCMSink(
    new StringSource( cipher ),
    df,
    new StringSink( plain ),
    new StringSink( aad )
);

I've believe I've got the Encryption process. But I am still having
problems with Decryption/Verification and the TransferTo/CopyTo that
is occuring in TestAuthenticatedSymmetricCipher.

> Also, I added two additional member functions to
> AuthenticatedSymmetricCipher.
Are you ready to have the latest checked out from SVN? I'm still using
yesterday's sources.

Jeff

On 3/2/09, Wei Dai <[email protected]> wrote:
>
> > Is it possible to specify a ChannelSwitch as the sink in the filter?
>
> Yes.
>
> Also, I added two additional member functions to
> AuthenticatedSymmetricCipher. These might be easier to use than the Filter
> wrappers, when you have just a short message to encrypt/decrypt.
>
> [SNIP]

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