I wrote my own C++ implementation of the ChaCha20 stream cipher, with both "orig...

@brouhaha@mastodon.social

I wrote my own C++ implementation of the ChaCha20 stream cipher, with both "original" and RFC 8439 modes (64/64 bit counter/nonce, vs 32/96). To my utter amazement, it passed the test vector in the RFC on the first attempt. I didn't have to investigate per-round intermediate results, as I usually have when implementing other cryptographic algorithms. I attribute this to ChaCha20 being simple and well-documented.
I still need to implement Poly1305.
1/