Skip to content

ChaCha: nonce and counter #86

Description

@dhardy

Forking from here. Summary:

  • ChaChaRng is for our purposes primarily an RNG; usage as a stream-cipher is secondary
  • setting a nonce correctly using set_counter is hard to do correctly due to required byte-to-u64 conversion and Endianness
  • we could add another method, e.g. fn set_nonce(&mut self, counter: u64, nonce: [u8; 8])
  • we could add other constructors, as in PeterReid's version
  • we could just leave as-is and state setting a nonce is unsupported

Current course of action: probably leave as is, with a note that setting a nonce is unsupported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions