Libsodium algorthims

Viewed 18

I am looking at libsodium to encrypt files but I'm not 100% sure what algorithms are accepted. I see here that it supports AES256-GCM, but apparently only a hardware accelerated version of it...

https://libsodium.gitbook.io/doc/secret-key_cryptography/aead/aes-256-gcm#limitations

So I have a couple of questions about libsodium:

  1. Does libsodium only use hardware accelerated instructions or does it include software implementations?
  2. If libsodium only supports hardware aesni and recommends ChaCha20-Poly1305 if portability is a concern, does this mean that libsodium is using a software implementation of ChaCha20 or does ChaCha20 has hardware instructions on a cpu the way AES has AESNI?
  3. If ChaCha is not hardware accelerated, then why wouldn't libsodium have hardware accelerated AES256-GCM and a fallback software implementation in case the cpu doesn't have aesni?
0 Answers
Related