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.