Archived Forum Post

Index of archived forum posts

Question:

How CTR counter in AES is implemented?

Feb 11 '15 at 10:59

Hi,

Can you help clarify how CTR counter is implemented internally? In my code, I randomly generate 16-byte array and use it to initialize CkCrypt2, how is this data used to calculate initial counter? And also how does counter increase in subsequent blocks?

Thank you


Accepted Answer

The IV becomes the nonce in CTR mode. The counter is incremented for each subsequent block.