Add BLAKE3 hashing algorithm #791

Open
opened 2025-04-07 18:12:15 +00:00 by sofiedotcafe · 1 comment

From upstream Nix: NixOS/nix@1f56ea4c72

Should we add the BLAKE3 hashing algorithm? It is merged to upstream Nix.
I think this should be pretty easy just patching the commit in. Would be a good first commit for me, for example?

As said in the commit, the Nix implementation:

[...] uses the single-threaded C-based routines from libblake3.

[...] is not optimal performance-wise but should be a good starting point
for nix compatibility with BLAKE3 hashing until a more performant
implementation based on the multi-threaded BLAKE3 routines
(written in Rust) can be developed.

#### From upstream Nix: https://github.com/NixOS/nix/commit/1f56ea4c7204a5b014bf96953a7f7c1e44cc66f3 Should we add the BLAKE3 hashing algorithm? It is merged to upstream Nix. I think this should be pretty easy just patching the commit in. Would be a good first commit for me, for example? As said in the commit, the Nix implementation: > [...] uses the single-threaded C-based routines from libblake3. > [...] is not optimal performance-wise but should be a good starting point for nix compatibility with BLAKE3 hashing until a more performant implementation based on the multi-threaded BLAKE3 routines (written in Rust) can be developed.
Owner

There's no hurry to do this (in the sense that it is experimental-feature gated in CppNix so nobody is going to force us to implement it via compat hazards), and once we actually get expanded rust support in, we can implement it properly using the rust library (mid term future; it's on the docket but the involved people have been busy for a few months).

I am unopposed in principle; blake3 has some real benefits and the stuff that can be done with it with respect to trees of hashes is pretty cute.

There's no hurry to do this (in the sense that it is experimental-feature gated in CppNix so nobody is going to force us to implement it via compat hazards), and once we actually get expanded rust support in, we can implement it properly using the rust library (mid term future; it's on the docket but the involved people have been busy for a few months). I am unopposed in principle; blake3 has some real benefits and the stuff that can be done with it with respect to trees of hashes is pretty cute.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#791
No description provided.