# Why does Salsa20 algorithm require incrementing word[8] and word[9] after producing cipher text message

I'm trying to get understanding of Salsa20 algorithm. There is an official specification from Daniel J. Bernstein at link. Everything in spec is clear and I could write an implementation on Swift.

But I met Salsa20 cipher algorithm implemented by other developers Crypto and TLS for C++11 , Salsa20 written on Python The developers perform some operations with words at positions 8 and 9 after generating ciphertext message:

I didn't saw these operations in the original Salsa20 spec. What do these increments mean?

• @CodesInChaos Reading the PDF spec, the $Salsa20_k(n)$ expansion function defines a single 16 byte input $n$, then section 10 references that function called with 2 distinct inputs, the 8 byte nonce $v$ and "the unique 8 byte sequence" $i$. It should have used a concatenation symbol instead of a comma, took me a few minutes to figure out what was supposed to happen. – Richie Frame Nov 14 '17 at 5:35