Skip to content
  • Daiki Ueno's avatar
    chacha: add variant that treats counter value as 32-bit · 2176ccc1
    Daiki Ueno authored and Niels Möller's avatar Niels Möller committed
    
    
    The ChaCha-Poly1305 implementation previously used the chacha_crypt
    function that assumes the block counter is 64-bit long, while RFC 8439
    defines that the counter is 32-bit long.  Although this should be fine
    as long as up to 256 gigabytes of data is encrypted with the same key,
    it would be nice to use a separate functions (chacha_set_counter32 and
    chacha_crypt32) that assume the counter is 32-bit long.
    
    Signed-off-by: default avatarDaiki Ueno <dueno@redhat.com>
    2176ccc1