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

Switch to chacha20-poly1305 crate #89

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

nyonson
Copy link
Collaborator

@nyonson nyonson commented Oct 31, 2024

Drop the internal implementation for the new and improved version in rust-bitcoin which includes the SIMD optimizations.

Also promoted the Key type for a little more type safety.

@nyonson nyonson force-pushed the deprecate-chacha branch 2 times, most recently from b1e865f to e3ae6bc Compare November 11, 2024 18:04
@nyonson nyonson marked this pull request as ready for review November 11, 2024 18:09
@@ -96,7 +94,7 @@ impl FSChaCha20Poly1305 {
///
/// The 16-byte authentication tag.
pub fn encrypt(&mut self, aad: &[u8], content: &mut [u8]) -> [u8; 16] {
let cipher = ChaCha20Poly1305::new(self.key, self.nonce());
let cipher = ChaCha20Poly1305::new(self.key, Nonce::new(self.nonce()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe in future versions of chacha we can have the nonce implement std::ops::Add

@rustaceanrob
Copy link
Collaborator

Can we squash these to one commit? I think they are pretty related. Huge to see all this hard work paying off!

@rustaceanrob
Copy link
Collaborator

ACK 4fabce3

@rustaceanrob rustaceanrob merged commit 8547e47 into rust-bitcoin:main Nov 11, 2024
7 checks passed
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.

2 participants