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

feat: stream cipher trait and chacha encryption #103

Merged
merged 6 commits into from
Jul 1, 2024

Conversation

lonerapier
Copy link
Collaborator

@lonerapier lonerapier commented Jun 26, 2024

This PR closes issue #97
Closes #97

It changes the following:

  • ChaCha stream cipher
    • adds variants: Chacha20/20, ChaCha20/12, ChaCha20/8
    • stream cipher trait

TODO:

  • XChaCha variants

@lonerapier lonerapier marked this pull request as ready for review June 28, 2024 11:24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation is so clean, you are crushing it <3

@0xJepsen
Copy link
Contributor

Does this also close #95?

@Autoparallel
Copy link
Contributor

Will get around to this by Monday

@lonerapier
Copy link
Collaborator Author

Does this also close #95?

Partially, added a StreamCipher trait. I think #102 handles the other half.

Copy link
Contributor

@Autoparallel Autoparallel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!!! I love it!!!


$$
\begin{align*}
\text{Enc}(s,m)=c=G(s)\oplus m \\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have written FAR too much TeX... but another option instead of \text{} is \operatorname{}

Don't worry about doing that here, but it can help you out some point in your life I bet.

Or hopefully we never see TeX again in a few years...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8vizys

let nonce = [0, 0x4a000000, 0];
let counter = Counter::new([1]);

let plaintext = b"Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol didn't know about this

@lonerapier lonerapier merged commit 60bb255 into pluto:main Jul 1, 2024
5 checks passed
@lonerapier lonerapier deleted the feat/stream-cipher branch July 1, 2024 10:36
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.

feat: ChaCha stream cipher
3 participants