Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ChaCha stream cipher operation #1466

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

joostrijneveld
Copy link
Contributor

This adds the ChaCha stream cipher. I've chosen to support both the 'original construction' and ChaCha20 as specified in RFC-8439 (i.e., with a 32-bit instead of a 64-bit counter). Poly1305 may follow separately; I considered whether to combine the two in a single operation, but decided that ChaCha would be of individual interest.

I claim no proficiency in Javascript, and am happy to take any pointers (especially related to type conversions). In particular, this pull request also adds functions to the Utils module to convert between integers and bytes (much like Python's int.to_bytes and int.from_bytes) ― I was unable to find built-in functionality for this.

@CLAassistant
Copy link

CLAassistant commented Nov 3, 2022

CLA assistant check
All committers have signed the CLA.

@n1474335
Copy link
Member

Brilliant, thanks very much for the contribution. Poly1305 and/or Salsa20 operations would be welcomed if you fancy it.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants