pynacl
pynacl copied to clipboard
[Feature request] Please allow nacl.public.SealedBox to also offer XChaCha20 as does libsodium
Please allow nacl.public.SealedBox to also offer XChaCha20 as does libsodium
Possible since 2017: https://github.com/jedisct1/libsodium/issues/561
Reference from your own documentation, currently only XSalsa20: https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox
If I knew the codebase I'd offer help. It's probably just a few LoC to be added.
I propose to add an optional parameter to the function, such as:
sealed_box = SealedBox(pkbob)
becomes
sealed_box = SealedBox(pkbob, mode="XSalsa20")
sealed_box = SealedBox(pkbob, mode="XChaCha20")
To allow the user to change the default mode of AEAD.
Cheers if you consider this, it's helpful standardize XChaCha20 across the board if possible! Really popular especially since TLS1.3 endorses it.