Golang (X)ChaCha20 stream cipher.

Yawning Angel 6f059cfcee Use unaligned loads/stores for interacting with the state. 2 weeks ago
LICENSE e02639ba9f Initial import. 1 year ago
README.md 8be2ad5dc9 Initial AVX2 support. 1 year ago
chacha20.go c91e78db50 Move the hChaChaRef routine to where it makes more sense. 1 year ago
chacha20_amd64.go 70289bb213 Fix the counter wrap detection for the IETF mode. 2 months ago
chacha20_amd64.py 6f059cfcee Use unaligned loads/stores for interacting with the state. 2 weeks ago
chacha20_amd64.s 6f059cfcee Use unaligned loads/stores for interacting with the state. 2 weeks ago
chacha20_ref.go 70289bb213 Fix the counter wrap detection for the IETF mode. 2 months ago
chacha20_test.go c91e78db50 Move the hChaChaRef routine to where it makes more sense. 1 year ago

README.md

chacha20 - ChaCha20

Yawning Angel (yawning at schwanenlied dot me)

Yet another Go ChaCha20 implementation. Everything else I found was slow, didn't support all the variants I need to use, or relied on cgo to go fast.

Features:

  • 20 round, 256 bit key only. Everything else is pointless and stupid.
  • IETF 96 bit nonce variant.
  • XChaCha 24 byte nonce variant.
  • SSE2 and AVX2 support on amd64 targets.
  • Incremental encrypt/decrypt support, unlike golang.org/x/crypto/salsa20.