How to use salsa20 counter nonce?
I am not sure if I got it right: a counter of messages can be used as/instead of the nonce? I mean a message like this: Header(2bytes) | counter(8bytes) | Body(n bytes encrypted) | HMAC-SHA1 with counter = 1 (63 of the bits=0) is ok? I understand that I should never use the same key with the same nonce twice. What do I do when a new connection is started and counter starts from 1 again? Artjom B. I understand that I should never use the same key with the same nonce twice. What do I do when a new connection is started and counter starts from 1 again? If you re-use a nonce with the same key,