I'm implementing Salsa20 in Rust for fun.
I have the initial state (4x4 32-bit matrix) setup from the key, nonce, and stream position 0. I'm using the Wikipedia Salsa20 article as reference, and I'm confused on how to encrypt the first block. QR is applied on the 4x4 matrix, but how do I "mix in" the input? Is there a better reference for this algorithm (or stream ciphers in general) I could use to understand the implementation?