Calculating updated IV in AES-CTR

61 views
Skip to first unread message

Julio Cabezas

unread,
Apr 5, 2021, 9:40:43 PM4/5/21
to Crypto++ Users

I intend to use Crypto++ for encrypting audio recording files.
A file needs to be played back in a random access way, setting the play cursor at any time of the recording.
I chose AES-CTR because it is seekable.
So I need to calculate the index of the block at, e.g. 0h:35m and start decrypting.
That time pont is the index=131250 AES block.
The key is known and the first-block IV too.
My questions:
- Is the reasoning above right ?
- what is the "counter increment" formula used by Crypto++ in CTR mode for the updated vector to be used in AES ?
    It's just incrementing by one the 16-byte unsigned integer vector at each new block with wrap around in the event of carry in the MSBit ?
- Does Crypto++ has an utility to add a number to an array representing a 16-byte unsigned integer?
    What is recommended for that?

Many thanks.
    

Reply all
Reply to author
Forward
0 new messages