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 pure-Rust Blake2 #755

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add pure-Rust Blake2 #755

wants to merge 5 commits into from

Conversation

keks
Copy link
Member

@keks keks commented Jan 16, 2025

This PR adds the pure-rust implementation from hacl-rs. So far this only features a low-level byte-oriented API.

One thing I am not sure about is the last_node flag. From reading the spec I think it maybe should be set to true, but that makes it produce wrong/inconsistent results.

It also reduces the visibility of some hacl-related submodules of ed25519, that is an unrelated cleanup change.

@keks keks requested a review from a team as a code owner January 16, 2025 15:51
Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

Just a quick drive-by. I'll look at it tomorrow.

@@ -0,0 +1,13 @@
//#![no_std]
Copy link
Member

Choose a reason for hiding this comment

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

Is it supposed to be no_std? alloc is used unconditionally right now, so it won't be no_std without changes.

@@ -0,0 +1,6 @@
pub fn memzero<T: Copy>(x: &mut [T], len: u32) {
Copy link
Member

Choose a reason for hiding this comment

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

Let's not use this memzero. It won't actually do anything. Let's throw in proper zeroization into a new crate that we already have on the secret ints branch. Or not do it at all. But using this looks bad.

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