jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.18k stars 1.73k forks source link

Can I use Authenticated encryption with chacha20? #982

Closed fangchaooo closed 4 years ago

fangchaooo commented 4 years ago

In this document page, It introduces the Authenticated encryption that is encrypted using XSalsa20 stream cipher. But now I want to use ChaCha20 replace it. Please tell me what should I do?

emilbayes commented 4 years ago

It’s in the docs under the other modes. Both the IETF and original version

https://libsodium.gitbook.io/doc/secret-key_cryptography/aead/chacha20-poly1305