Function chacha20::hchacha

source ·
pub fn hchacha<R: Unsigned>(
    key: &Key,
    input: &GenericArray<u8, U16>
) -> GenericArray<u8, U32>
Expand description

The HChaCha function: adapts the ChaCha core function in the same manner that HSalsa adapts the Salsa function.

HChaCha 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 ChaCha key

For more information on HSalsa on which HChaCha is based, see:

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