Function hsalsa

Source
pub(crate) fn hsalsa<const R: usize>(key: [u8; 32], input: [u8; 16]) -> [u8; 32]
Expand description

The HSalsa20 function defined in the paper “Extending the Salsa20 nonce”

https://cr.yp.to/snuffle/xsalsa-20110204.pdf

HSalsa20 takes 512-bits of input:

  • Constants (u32 x 4)
  • Key (u32 x 8)
  • Nonce (u32 x 4)

It produces 256-bits of output suitable for use as a Salsa20 key