Howto implement chacha20-poly1305?
Dmitry Eremin-Solenikov
dbaryshkov at gmail.com
Mon Nov 28 21:19:32 CET 2016
Hello,
2016-11-28 17:32 GMT+03:00 Stef Bon <stefbon at gmail.com>:
> I;m writing a fuse sftp client, and not making use of openssh (like
> sshfs does). I'm writing all required procedures and functions to do
> the negotiation and encryption myself, using libgcrypt.
> This works already very good.
> It basically uses simple encryption like 3des and blowfish and aes,
> and mac like hmac-sha1 en hmac-sha256.
>
> Now I want also support for newer algo's like chacha20-poly1305 and
> poly1305-AES.
Would gcry_cipher_open(&hd, GCRY_CIPHER_CHACHA20,
GCRY_CIPHER_MODE_POLY1305, 0) work for you?
Then use gcry_cipher_gettag/gcry_cipher_checktag for retrieving/checking
tag.
It is an AEAD cipher mode, so there is no separate encryption and separate
MAC.
--
With best wishes
Dmitry
More information about the Gcrypt-devel
mailing list