ChaCha20 without Poly1305 on nRF Connect

Hey,

Does nRFConnect SDK support the ChaCha20 encryption library without Poly1305? 

We are currently using the mbedTLS PSA Crypto library to perform encryption/decryption but it only works if we use the 16 byte authentication tag that is part of the Poly1305 implementation, is it possible on nRFConnect to use ChaCha20 without the Poly tag?

Thanks

Parents Reply
  • Hi,

    ChaCha20 is a stream cipher that works on single bytes, so the length of the array does not matter. Also, if you pass a huge array, or several smaller chunks will not matter. The resulting encrypted text will be the same regardless. And as you see in the test code, different chunk sizes are used for decryption, and that is also fine. Again, a stream cipher is byte based (rather than block based), so it does not matter.

    The code I uploaded was based on test code as mentioned, so I assume the reason for using different lengths there is to verify that it works with different combinations of chunk sizes.

Children
No Data
Related