lukechampine / blake3 Goto Github PK
View Code? Open in Web Editor NEWAn AVX-512 accelerated implementation of the BLAKE3 cryptographic hash function
License: MIT License
An AVX-512 accelerated implementation of the BLAKE3 cryptographic hash function
License: MIT License
I am requesting to have Bao verified streaming/Merkle tree support based on the https://github.com/n0-computer/abao rust fork.
I am also requesting the outboard mode be supported as well.
Thanks.
possible for blake3 to have 224 bit version?
% go get lukechampine.com/blake3
# lukechampine.com/blake3
../../../lukechampine.com/blake3/blake3.go:302:16: invalid operation: 1 << i (shift count type int, must be unsigned integer)
could just return an error
Line 283 in 7afca59
Dear Luke,
Could you be so kind to generate .exe
for the rest of us who are mere Windows users w/o compiler?
I am eager to try b3sum implemented in Go, because @oconnor663 is in no hurry to fix Rust’s one.
From my reading of Blake3 paper, and my understanding of Merkle trees in general, I think this should be doable in theory: if I have Blake3 digests of parts of a file, I should be able to calculate the digest of the whole (by building the tree of digests and then getting the root). But I don't think this module's API exposes enough to make it work, or am I missing something?
why not do a golang binding of blake3 instead? shld be faster and less mem hog
Well done getting this up so quickly! Any feedback on how the reference implementation could be improved? Any parts that were confusing? Did you happen to find Section 5.1.2 in the spec that talks about what's going on with add_chunk_chaining_value
? :)
Some thoughts about this comment:
NewFromDerivedKey returns a Hasher whose key was derived from the supplied context string.
That's true, but it's also kind of an implementation detail. The intention isn't really for users to know about or think about this "context key". Instead, the word "key" in the name derive_key
/new_derive_key
refers to the output of the function. The intention is that the user starts with a context string and some key material, and the output is a context-specific derived subkey.
In that sense, it might make more sense to use the name NewDeriveKey
or something like that? What do you think?
Hello,
I’m curious to know if it’s possible to compute the hash of a data stream without knowing its length in advance, and to do this without storing the entire data in RAM. Ideally, the hash should be updated incrementally.
As a beginner, this might seem like a simple question. I understand that to compute the hash, the data needs to be divided into chunks of 1024 bytes.
To put it in simpler terms, I want to write a Hash class that has a method void HashByte(*byte). This method would take an arbitrary number of bytes as input and maintain a “partial hash” in memory, which is updated incrementally every time N bytes arrive from the stream.
Another method, byte[64] Close(void), would return the 512-bit hash as an array of 64 bytes, representing the entire received stream.
for example:
hash = New Hash()
hash.HashBytes(byte[] "This is the first array of byte.")
hash.HashBytes(byte[] " <A VERY LONG STRING>.")
// Here can be added even few MiB of data
hash.HashBytes(byte[] "")
//Nothing is added
hash.HashBytes(byte[] " This is the second")
hash.HashBytes(byte[] ".")
// Just 1 byte is added
byte[64] result0 = hash.close()
byte[64] result1 = Sum512(byte[] "This is the first array of byte. <A VERY LONG STRING>. This is the second.")
result0 should be equal to result1
Is it possible and how can I do?
Many thanks
go: github.com/lukechampine/[email protected]: parsing go.mod: module declares its path as: lukechampine.com/blake3 but was required as: github.com/lukechampine/blake3
Hi,
While packaging this for Debian, we have cpuid v2 in the repository and I needed to get it to compile with that version.
The patch for compatibility with cpuid v2 is simple:
--- a/cpu.go
+++ b/cpu.go
@@ -5,6 +5,6 @@
import "github.com/klauspost/cpuid"
var (
- haveAVX2 = cpuid.CPU.AVX2()
- haveAVX512 = cpuid.CPU.AVX512F()
+ haveAVX2 = cpuid.CPU.Supports(cpuid.AVX2)
+ haveAVX512 = cpuid.CPU.Supports(cpuid.AVX512F)
)
Thanks!
possible to have this feature in?
thx for the software btw.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.