tags:

views:

14

answers:

1

i am implementing CTR mode of encryption using AES. i want know how to generate initial vectors(counter blocks) for this mode.

A: 

You should generate random IV, and after that increment it with each new block, like 16-byte integer. Also, as far as I remember, some specifications use zero IV for CTR mode.

Nickolay O.