Hi, take a look at GCM_Base::GCTR in gcm.h. It does what you want, but is a 
protected member of GCM_Base, so just copy its code.

--------------------------------------------------
From: "Jan" <[email protected]>
Sent: Tuesday, June 16, 2009 2:40 AM
To: "Crypto++ Users" <[email protected]>
Subject: AES/CTR IV custom increment

>
> Hello,
>
> I am trying to implement AES in CTR mode but with the custom IV
> increment. CryptoPP implementation increments IV over the whole vector
> but I would like to have increment only over the lowest 4 bytes (with
> modulo).
>
> E.g. 00 .... AB FF FF FF FE -> 00 .... AB FF FF FF FF -> 00 .... AB 00
> 00 00 00
>
> Is there any easy way how to do it? Only solution which I currently
> found is to increment IV by myself after each block and then call
> Resynchronize and then encrypt another block.
>
> Thank you for your help,
> Jan
>
> >
> 

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