Repository navigation
Releases
BLAKE3-Servil 0.10.0
blake3-servil 0.10.0+b0b4c80c39ff28c2dbcc2234a6dc17b40911830d, against blake3-servil 0.9.1
What changed since 0.9.1 (0.9.0 with the one fix of GHSA-q4c5-2759-8c8x), each item with where it is described. Every
figure names its machine. bench-hashes' page for this release sets 0.8,
0.9 and 0.10 side by side on every machine of its fleet (BLAKE3 #402).
New
- The Pipeline (
throughput::Pipeline, #356): the streaming API,
which 0.9 left out. Messages are written into rooms the Pipeline lends
or are lent to it in place; results arrive as events, in order; the
pool hashes them. Dropping a Pipeline or a loan while workers may
still read its memory stops the process without unwinding; other
broken preconditions panic on the calling thread. - The tree API (
throughput::TreeHasher,Cv,LastCv,level_of,
left_len; #378, #421), for programs that build or check a BLAKE3 tree
themselves (verified streaming, Bao, iroh): a subtree's chaining value,
a layer of parents, the root. A tree that is not BLAKE3's has no way
through it. A whole subtree is named by its level and index, so a size
that is no power of two of chunks cannot be said, andlevel_of(5 MiB)
in aconststops the build. The message's last subtree has its own
type,LastCv, so a short subtree as a left child does not compile.
Each value carries its place: joining two that are not siblings, or a
root whose children do not hold the message's length, panics in every
build. ATreeHasheris also a mode prepared once:hash,hash_many
andhash_eachhash whole messages in it, so a key-derivation context
is hashed once for many messages.Prepared::partgives some of a
batch's messages as a batch, for a pool of the program's own.b3sum
and the library's own pool build their trees with these calls, so a
mistake in either's cut or merge stops the process where it would have
given a wrong hash. b3sum --outboard DIRwrites each file's bao-tree outboard beside
its hash, byte for byte bao-tree 0.17.0's
(BlockSize::from_chunk_log(4)). A 1 GiB file from storage: 120 ms,
where official BLAKE3 with rayon and bao-tree take 222 and 584 (Ryzen
9700X).
Safety and assurance
b3sumreports failure on output errors and empty checkfiles.b3sumhashes the file it opened on every path, including if its
pathname has been replaced. Hashing still requires stable contents.- A file that
b3sumreads is read to where its reads end, whatever
its size said. (A mapped file is hashed to the size it had when
opened.) The README says what a file changed during the run gives. - A panic in
b3sumstops the process at once, and a ring of reads
cannot be dropped while the kernel still writes its buffers. - Where io_uring is unavailable, a small file that grew during the run
is no longer copied past its buffer. b3sumno longer closes a descriptor the caller passed
(b3sum /dev/fd/255 other).b3sum --no-mmapmaps no file (it was accepted and ignored). A file
that another program shortens during the run then cannot stop it.
--checkrefuses--seek.--outboardwrites each outboard under a new name and renames it into
place: a link at that name is replaced, not followed, and a reader
never sees a partial outboard.--keyed --outboard -is an error.throughput::finalize_eachpanics on an index named twice or out of
range in every build, leaving the hashers unmarked where the call is
refused. On 0.9's scalar path a repeated index could receive the empty
message's hash in release builds.update_eachleaves no hasher's
stage held if a call unwinds.Batch::newandBatch::message_mutcheck that their slot and block
lengths fit inusize;hash_many_multithreadedchecks that a
borrowed batch's block buffer equalsslot * out.len()above the
split as well as below it.- On Arm64, the Pipeline waiter and worker sleep paths place a barrier
between storing a waiter's state and checking for work (#463, an
unbounded stall seen on the Apple M6). - On Linux, the CPU-affinity mask handles kernels configured for up to
8,192 CPUs. A worker thread that the
system refuses to start stops the process rather than leaving callers
waiting;blake3-servil's "Panics" section lists every condition on
which the crate ends the process. b3sum: where repeated standard input is accepted, naming it more
than once (b3sum - -, or by another name of the same pipe under
/devor/proc) reads it once, in order, in the 32-byte, extended
and outboard paths; 0.9 could split large piped or redirected inputs
across file threads and print two wrong hashes. Only-itself is standard
input (-/was hashed as standard input).b3sum --checkon a pipe
that names that pipe fails the entry instead of waiting for ever, and
a--tagline whose filename holds two spaces checks. The output's
last byte at 2^64 - 2 is printed and requests past 2^64 - 1 (or over
65,536 bytes with--sigilcode) are refused when options are read.- On SME2, the kernel for parent nodes and one-block messages reads
sixteen blocks through one pointer. Where the blocks lie in one buffer
(a batch of one-block messages, a tree's parents, the parents over
hashers fed together) the pointer is now that buffer's own; a table of
separately borrowed blocks is copied into one buffer first. 0.9 took a
table's blocks for one buffer when their addresses followed one
another, which gives no pointer the right to read them all under
Rust's rules for pointers. No fault was observed, and the bytes hashed
were the same. Pipeline::with_ownersandownedneed an owner that borrows nothing
(B: 'static): aVec<u8>, not a&[u8].b3sum's Linux release binaries and the four crates are
reproducible: anyone can rebuild one from the tag and compare its
bytes (how). The crates are packed from a
committed dependency lock. A release's tag names its source by hash
and cannot be moved. Releases come with SHA-256 files; the.b3
files and the C library's archive are no longer published (build the
C library from source,capi/README.md).- A failed
io_uringsubmission/wait stops the process before pending
reads' buffers can be released. A completed read error remains a
file error. - The build check runs Shuttle's finish, park and wake-up models on each
candidate, and a model of the whole Pipeline against a stand-in pool:
ten faults planted in the Pipeline one at a time each make it fail.
Everyunsafeblock of the Pipeline and ofb3sumstates why it is
sound, and a check refuses one that does not. The development branch
requires explicit checks or waivers on the exact commit before it can
move. - Before each stable release, separate AI agents using different
leading-edge models perform deep security audits. Reports and finding
dispositions accompany the release evidence; this is not a claim of
an independent human audit. QUALITY.md and the
quality manual describe the protections and
their limits.
What a program on 0.9 changes
- The licence. From this release BLAKE3-Servil is under any of MIT,
Apache-2.0, TGPPL-1.0 or BOSL-1.0, at your choice, as smalloc is
(#450). 0.9.1 and earlier stay under the terms they were published
with: CC0-1.0, Apache-2.0, or Apache-2.0 with the LLVM exception. A
program that relied on CC0 has MIT and Apache-2.0 to choose from. Hasher::finalizeandfinalize_xoftake&self(0.9 took the
hasher): a hasher can be finalized and fed further, as with official
BLAKE3.- A
Hasheris 26,624 bytes (it was 18,432). C callers recompile:
B3_HASHER_SIZEincapi/b3.hchanged. - The
zeroizefeature is gone, and with itZeroizeforHasher,
OutputReaderandHash. The crates wipe nothing they held from
memory; each crate's "Memory" section says where a key and a
message's bytes stay. A program that must wipe a hasher can use
official BLAKE3, whose types implementZeroize. ("Safer", below,
says what went wrong with it.) b3sumreads a large file past the page cache when the cache does
not hold it (Linux, 4 MiB and more). The file is not in the cache
afterwards, so a second pass reads the drive again.b3sum < filegives the hash it always gave, sooner (below).- One memory node on Linux (#452, #457): where the system shows
several memory nodes and allows the binding,initialize_multithreaded
keeps its workers on one node (the starting thread's node, or one with
at least twice as many allowed CPUs), andNonebounds the default
thread count to that node's allowed CPUs.b3sumkeeps its main thread and workers on
one node too. Where the system hides the topology or refuses the
binding, both run on the CPUs they have. A build for a 32-bit-pointer
target stops with a message pointing to official BLAKE3.
Faster
Each pair of figures is the commit before the change and the commit
with it (or 0.9.1 against 0.10 where noted), on the machine named.
bench-hashes' page (above) measures 0.9 against 0.10.0 as released.
b3sum, a file of 4 MiB or more from storage (Linux): direct
reads, several at once, each thread hashing what it read. 1 GiB: 217 to
100 ms on a Ryzen 9700X, 241 to 140 on 2x EPYC 7443, 203 to 127 on 2x
Xeon 6330.b3sum < fileis hashed as the file is, not as a stream. 1 GiB on
a Ryzen 9700X: 37.7 to 25.0 ms from the page cache, 418 to 99 from
storage (official b3sum 1.8.7: 121 and 452).- A Hasher fed in pieces: its stack holds rows of chaining values
and hashes parents a full layer at a time. One core, 16 KiB pieces:
10.3 to 12.3 GB/s (Ryzen 9700X), 3.89 to 4.17 (2x EPYC 7443), 3.44 to
3.72 (2x Xeon 6330). - A short message through a Hasher: 64 bytes, new, update and
finalize, 197 to 50 ns (Ryzen 9700X...
BLAKE3-Servil 0.9.1
Security notice (added November 19, 2026, updated November 22, by John Servil). Do not use this release: use the newest one, 0.10.0 or later. The 0.9.1 crates were withdrawn (yanked) from crates.io on November 19, 2026. Two advisories apply to this release:
- GHSA-v237-j9h9-8pf7: with the crate's
zeroizefeature on (it is off by default), aHasherthat a program keeps using afterzeroize()can make another, plain hasher return a wrong hash fromthroughput::update_eachorthroughput::update_each_multithreaded, and nothing reports it.b3sumis not affected, nor is a program that never uses a wipedHasheragain. Fixed in 0.10.0, which has nozeroizefeature. A program still on 0.9.1: afterzeroize(), put a newHasherin the wiped one's place, and compute again any hash made under those conditions. How this happened and what we changed: the after-action report.- GHSA-cgj8-835c-97r2: on Linux 5.9 and 5.10 kernels,
b3sumgiven several files in one run can print the hash of only the first part of a file, with exit status 0. Fixed in 0.10.0.
Fixed
- On Apple M4 and later,
throughput::hash_multithreadedcould return a wrong hash for some message lengths, andthroughput::hash_each_multithreadedcould do the same for an item of 512 KiB or longer (GHSA-q4c5-2759-8c8x). The SME2 thread's share of a message is now cut into valid subtrees at every length. Hashes computed by those calls on Apple M4 or later should be recomputed.
0.9.0 has been yanked from crates.io. No other changes.
blake3-servil 0.9.0+73ee859efce085d28f1c2b22c35a5703403476f7, against blake3-servil 0.8.0
Security notice (added November 19, 2026, updated November 22, by John Servil). Do not use this release: use the newest one, 0.10.0 or later. It was withdrawn (yanked from crates.io). Three advisories apply to it:
- GHSA-q4c5-2759-8c8x: on Apple M4 and later,
throughput::hash_multithreadedcan return a wrong hash for some message lengths, andthroughput::hash_each_multithreadedfor an item of 512 KiB or longer. Fixed in 0.9.1 (itself withdrawn since) and in 0.10.0.- GHSA-v237-j9h9-8pf7: with the
zeroizefeature on, aHasherthat is used again afterzeroize()can make another hasher's hash wrong inthroughput::update_eachandthroughput::update_each_multithreaded. Fixed in 0.10.0, which has nozeroizefeature.- GHSA-cgj8-835c-97r2: on Linux 5.9 and 5.10 kernels,
b3sumgiven several files in one run can print the hash of only the first part of a file, with exit status 0. Fixed in 0.10.0.The advice further down to stay on 0.8 for its stream until the Pipeline's release no longer holds: the Pipeline is in 0.10.0, and 0.8.0's stream has the memory-safety bugs of GHSA-mf3f-vh3v-f7v6.
Short summary:
docs/announce-0.9.md
Security note:0.8.0has been yanked from crates.io — see GHSA-mf3f-vh3v-f7v6.
What changed since 0.8.0, each item with where it is described. The
figures come from checks of this code against 0.8.0, on the machines
each names.
Two crates, and no streaming API in this release
blake3-servil-coreis BLAKE3-Servil on one thread: every call
hashes on the thread that makes it, and the crate starts no thread. Its
assembly kernels are each proved against the BLAKE3 specification.
Without itsstdfeature it needs no allocator.blake3-servilis that crate, whole, with a pool of threads and a
multithreaded form of each call:hash_multithreaded,
hash_many_multithreaded,hash_each_multithreaded,
update_multithreaded,update_each_multithreaded.- 0.9 has no streaming API. 0.8's stream (
performance::stream) is
gone, and one streaming API, the Pipeline, is being built to replace it
after 0.9 (#356). A program that feeds 0.8's stream waits for the
Pipeline's release and stays on 0.8 until then, knowing the stream's
two faults there (below, "Safer"). Where a program can do without a
stream, 0.9's calls take whole inputs:hash_multithreaded(one
message),hash_many_multithreaded(a batch),hash_each_multithreaded
(messages of different lengths),update_multithreaded(one message
fed in pieces). Used in a stream's place they are slower ("Slower",
below).
What a program on 0.8 changes
performanceisthroughput: the module's name; its calls keep
theirs.- The
Hasherisconvenience::Hasher(it wasperformance::Hasher):Hasher::new(mode)isHasher::new(mode, length_hint), the hint an
Option<u64>;Noneis always right;finalizeandfinalize_xoftake the hasher (self, where they
took&self);countandresetare gone;- the method
hasher.update_multithreaded(input)is the call
throughput::update_multithreaded(&mut hasher, input).
finalize_eachtakes&mut [Hasher](it took&[Hasher]): each
hasher it finishes starts again.- The stream is gone:
performance::stream,Streamand its seven
methods.
Unchanged for a caller, though the signature reads differently:
hash_many and hash_many_multithreaded take any Prepared input, and
&Batch is one. New: Packed<16> and Packed<32> (the other Prepared
input) and the constant BUILD_VERSION. Hash, Mode, Block,
OutputReader, the three convenience calls, context_key and the
other throughput calls read the same in both. A program that depends
on blake3-servil keeps the crate's name: it re-exports everything the
core documents and adds the multithreaded calls and
initialize_multithreaded.
The API: one call family for a hash now and then, one for call after call
convenienceis for a hash amid other work:hash,hash_with,
hash_xof, and now the incrementalHasher. Its paths are tuned for
code that has left the caches (on AArch64, its kernels' code is
prefetched). The length hint is a scheduling hint and never part of the
hash.throughput(theperformancemodule of 0.8, renamed) is for call
after call:hash,hash_many,hash_eachand their multithreaded
forms over prepared inputs (Block,Batch,Packed), and grouped
incremental updates (update_each,finalize_each). A program chooses
the pattern by the call it makes; no clock guesses it.- The C API is the convenience API:
b3_hash,b3_hasher_*(with
the length hint) and the modes. - A build names its code (#328):
BUILD_VERSION,b3_version()and
b3sum --version. A release reads its version; the code after one reads
X.Y.Z+devwith its commit, and a dirty tree adds its Git tree id.
Slower
Without a stream: messages hashed one after another on many threads.
This is what a program would see if it used 0.9's calls where it used
0.8's stream; a program that needs a stream waits for the Pipeline.
0.8's stream hashed on the workers while the program read the next
message, gathered short messages into lanes and spread them over the
cores. A call a message does none of that. Against 0.8's stream, on four
x86-64 machines (a Ryzen 9700X, an EPYC 9275F, an EPYC 9255, two Xeon
Gold 6330), messages one after another through hash_multithreaded take
from 1.2 to 25 times the time: the most for messages of 512 B and 1 KiB
on the 16-thread Ryzen, 2 to 3 times for messages of 16 KiB and more
there. Gathering short messages into batches for
hash_many_multithreaded recovers most of it: batches one after another
take 1.2 to 2.9 times the stream's time. No other call is slower on
those machines: none of the single-threaded calls, none of the
multithreaded calls made for whole inputs. (Four pairs of runs a cell.)
On purpose, on AArch64: a throughput call made now and then. 0.8
guessed with a clock whether a call came after a pause, and prefetched
its kernels' code when it did. 0.9 has no such clock (#253): the call
decides. So on AArch64 a throughput call made amid other work, where
0.8's clock would have prefetched, is slower than 0.8:
hash_multithreadedof one message of 1.5 to 16 KiB;hash_manyover a batch of 2 to 8 short messages, on one thread or many.
The remedy for one message is the call made for that pattern,
convenience::hash, which prefetches on every call of 1 to 64 KiB. A
small batch amid other work has no such call yet. Call after call, both
are as fast as before or faster. On an Apple M6, made amid other work,
the batch takes 37 to 180% more time than 0.8's and the message 28 to
115% more (#364).
Cause not yet known, on AMD Zen 5: convenience::hash of 4 KiB made
after other work takes 5 to 6% more time than 0.8 on a Ryzen 9700X, an
EPYC 9275F and an EPYC 9255 (#376). The same call on the lengths beside
it is faster than 0.8 there (3 KiB by 28 to 30%).
Faster
- On x86-64, whole chunks and parents round up to the lanes (#248,
#345): 3 inputs run on 4 lanes, 5 to 7 on 8, 9 to 15 on 16 and 17 to 31
on 32 where those kernels run, each in one pass where the kernels took
two or three; the spare lanes hash a copy whose result is dropped. One
message of 3 KiB to 7935 B takes 24 to 45% less time on a Ryzen 9700X. - On x86-64, packed leaves and a batch's messages of 1 to 63 bytes
run eight at a time on AVX2 and sixteen on AVX-512 (#297), on the
kernelsfinalize_eachuses: a single-threaded Merkle tree over 16- or
32-byte leaves takes 74 to 78% less time on a Ryzen 9700X and an EPYC
9275F (sixteen lanes), and 45 to 57% less on two EPYC 7443 (eight). One
cell pays, on that last machine alone: its multithreaded tree of
1,048,576 leaves of 32 B, on 96 threads, takes 6% more (#372). Packed<16>andPacked<32>: a batch of 16- or 32-byte messages
(Merkle leaves, digests) hashed without the program writing each into a
block of its own first (#289).finalize_eachfinishes sixteen hashers at once on AVX-512, each
with its own chaining value and flags, on a proved kernel; its indices
are distinct, a contract a debug build checks (#295).- On AArch64, many short messages fed in small pieces finish side by
side (#298): 1,024 open messages of 1 KiB arriving in 256-byte pieces
take 68 to 71% less time a cycle on an M4 Max. Plain messages alone: a
keyed hasher's key is secret, so it finishes by itself as before. - A Hasher's in-place checkpoint copies only the bytes it has staged
(clone_from), not its whole 16 KiB stage (#283).
Steadier
- After preparation, the pool's calls allocate nothing (#325): a
whole message, a batch, a collection of chunk-sized items, and repeated
update-and-finish cycles of 4 MiB messages in every mode, on the calling
thread and the workers, the first cycle included.
initialize_multithreadedprepares the calling thread's scratch (48 KiB,
for inputs to 64 MiB). - A repeated collection allocates nothing (#325):
hash_eachkeeps
its messages' places and chunk values on the calling thread between
calls, where each call took them and freed them.
Safer
Whe...
blake3-servil 0.8.0+b3c5efc7c975d903762dea809066f7c0a0603861, against official BLAKE3 1.8.7
Security notice (added November 19, 2026, updated November 22, by John Servil). Do not use this release: use the newest one, 0.10.0 or later. It was withdrawn (yanked from crates.io) for memory-safety bugs in its streaming API and secret-dependent timing in two operations: GHSA-mf3f-vh3v-f7v6. Its
b3sumalso falls under GHSA-cgj8-835c-97r2: on Linux 5.9 and 5.10 kernels, given several files in one run, it can print the hash of only the first part of a file. The downloads on this page are of that withdrawn release. Every advisory for BLAKE3-Servil is listed here; read the newest release's page before choosing a version.
The same digests. Faster than official BLAKE3 1.8.7 on 64-bit Arm and
x86-64. Every kernel is assembly, and every one is proved correct
within its stated contract. Everything else is tested, and the tests
are tested (QUALITY.md).
Faster
Each figure is blake3-servil's speed over official BLAKE3 1.8.7's, both
measured in the same run by bench-hashes
0.18.1 at this release's commit (one run per machine, October 27).
On the every-core rows each uses its multithreaded function:
| Intel i7-12700K | AMD EPYC 9255 | Apple M4 Max | Linux VM on the M4 Max | |
|---|---|---|---|---|
| One message of 64 B | 0.8× | 1.1× | 1.5× | 1.1× |
| One message of 1 KiB | 1.1× | 1.1× | 1.2× | 1.2× |
| One message of 1 MiB, one thread | 1.0× | 1.2× | 2.5× | 2.5× |
| One message of 128 MiB, every core | 1.1× | 1.0× | 1.3× | 1.3× |
| A stream of 64 KiB messages, every core | 8.0× | 7.2× | 33× | 156× |
| A batch of 1024 messages, 64 B each | 1.1× | 1.1× | 1.9× | 1.8× |
| b3sum over 1000 files of mixed sizes | 3.4× | 5.8× | 4.6× | 26× |
On the M4 Max and in the VM, official's multithreaded call on each 64 KiB
message takes longer than its one-thread call (1.08 and 7.13 ns per byte,
against 0.42 and 0.43), so the stream row's figures there are large.
On 64-bit Arm, new kernels make every size faster: SME2 on the M4 and
later, and kernels that run the integer and NEON units side by side.
On x86-64 with SSE4.1 or AVX2, a single message hashes with official's
own assembly (each proved below), so it runs at official's speed (one
message of 64 B varies from run to run: 0.8× to 1.9× on the i7). On Linux on AMD Zen 5 and later,
new kernels hash 32 whole chunks or 16 parent nodes at once with AVX-512
(proved too): on the EPYC 9255, one thread hashing 32 KiB or more takes
about 20% less time than with upstream's 16-input AVX-512 kernel. Other
AVX-512 CPUs keep the 16-input kernel, which measured faster there (Zen 4:
the wide kernels 4-5% slower from memory; Intel Ice Lake: 3-4.5% slower
throughout). The other gains on x86-64 come
from many messages at once: a stream that hashes on other cores while
the program reads the next input, batches of short messages, and b3sum
over many files.
Checked more
Beyond official's tests (published test vectors and a reference
implementation), this crate adds:
- Formal proofs of every assembly kernel, official's own x86-64
assembly among them, at every shape this crate calls it: symbolic
execution against a specification of BLAKE3, with memory accesses,
the calling convention and secret-dependent branches checked too. - Mutation testing: one small mistake planted at a time, more than
2,000 in all, and a test must fail for each; every one that survives
is listed with its reason. - A model checker (Shuttle) for the thread pool's waits, under
thousands of thread schedules. - Guard pages: tests put an inaccessible page beside every input,
output, key and context of every public call, in Rust and in C, so
a call that touches one byte past the caller's memory crashes the
test. - A startup self-test of the build and the CPU before the first
hash.
These found eight bugs before release, among them the AVX2 and AVX-512
batch kernels reading past an input's end at shapes this crate's batch
calls use (fixed here; see below). QUALITY.md says what
each check covers and what remains unproved.
Before you switch
- Targets: 64-bit Arm on Linux and macOS, x86-64 on Linux. Latest
stable Rust and a C compiler, GCC 12 or Clang. Official BLAKE3 keeps
Windows, 32-bit CPUs, big-endian CPUs, WebAssembly and older compilers;
a build for any other target stops and names it. - Call
blake3_servil::initialize()once before any other call. A
program that makes multithreaded calls or uses a stream calls
initialize_multithreaded(None)instead. A call before it panics. - Two kinds of call, in two modules.
convenience: one call per hash,
every feature, any slice, the result returned:hash(input)is now
convenience::hash(input),keyed_hash(key, input)is
convenience::hash_with(Mode::Keyed(key), input),derive_key(context, material)isconvenience::hash_with(Mode::DeriveKey(context), material), andconvenience::hash_xof(mode, input)gives extended
output.performance, for power users, has every way to hash fast.
There the program takes on more of the work: inputs asBlocks (64
bytes on a 64-byte boundary: a message is blocks and a length, a
batch messages of one length), digests into its places, and aMode
in every call. TheHasheris there too:Hasher::new(mode)replaces
Hasher::new(),Hasher::new_keyedandHasher::new_derive_key, the
plain hash isMode::Plain, andHasherhas noDefault. - Threads are the crate's own.
Hasher::update_rayonis now
update_multithreaded.performance::hash_multithreaded(mode, input)
hashes one message over the threads. There is norayonfeature. - Removed:
Hasher::update_mmapand themmapfeature (map the file
yourself, or useupdate_reader), thetraits-previewfeature, the
guts,hazmat, andplatformmodules, and theno_avx2,
no_avx512,no_neon, andno_sme2features, andpure: this crate
runs its assembly or not at all. For portable Rust, or an x86-64 CPU
without SSE4.1 (which stops atinitialize), use official BLAKE3. - b3sum installs from the package
b3sums(cargo install b3sums);
crates.io'sb3sumis official BLAKE3's. The program is stillb3sum.
--num-threads Nmeans at most N threads in all, and 1 means one
thread.--no-mmapdoes nothing. Every file is read to its end. A
broken pipe ends b3sum quietly.
New
performance::hash_manyandhash_many_multithreaded: aBatchof
messages of one length, each inBlocks (64 bytes on a 64-byte
boundary). ABatchlets the program write only its messages' bytes,
so the bytes past each message, which the batch kernels read in place,
stay zero; a Merkle layer writes its digests straight into the next
layer'sBatch.performance::hash_eachandhash_each_multithreaded: a collection of
any lengths.performance::update_eachandfinalize_each: many messages in
progress at once, each with its ownHasher.performance::stream(): inputs one after another, hashed behind the
caller.- A C API in
capi/b3.h. The library islibb3_servil. C11 and C++11. Mode::DeriveKeyWithwithperformance::context_key: one context
hashed once for many derivations.
Different
- A startup self-test checks the build and the CPU. A wrong digest stops
the process, uncatchably: withstdit names the code path and aborts;
without it, the CPU's trap instruction. - A panic on one of the crate's threads, or in a caller during a
multithreaded call, ends the process. - The threads are the process's: in a child forked after they started,
every multithreaded call and stream panics, saying so. A program that
forks callsinitialize_multithreadedin the process that hashes,
after any fork; single-threaded calls work anywhere. - A
Hasheris about 18 KiB. It gathers short updates and hashes them
side by side, so a message arriving in small pieces hashes as fast as
one in a buffer. - The AVX2 and AVX-512 batch kernels read nothing past an input's end.
- The crate leaves Arm's data-independent timing (DIT) as the calling
thread has it. A program that wants Arm's promise turns DIT on in its
own threads before it hashes (the quality manual, "Timing and secrets":
docs/quality-manual.md). - Building the Arm kernels needs an assembler that knows armv8.2-a+sha3,
GNU as 2.30 or LLVM 7; building the x86-64 kernels needs a C compiler
that takes the AVX-512 flags, GCC 12 or Clang. Without one, the build
stops and says so; official BLAKE3 builds without assembly. The SME2 kernels need Clang 17
or GCC 14 with binutils 2.41; without those the build warns and leaves
them out.
Assets
Each file beside its SHA-256 and BLAKE3 digests (.sha256, .b3); check both. Built from the tag (tools/b3sum-release.sh, statically linked; Linux AArch64 on the VM; the C library by cargo cinstall --release in capi/, prefix /usr/local).
b3sum-v0.8.0+b3c5efc7c975d903762dea809066f7c0a0603861-aarch64-unknown-linux-gnu- SHA-256
1f4e6bde06e7ab2a59c8b7366f8c0d9e38b7d56a2f01313d0ce9f3568e2df314 - BLAKE3
93882bd25362b2fab6bc312d36f51645e881b18081dc759b57fe3134ca586af6
- SHA-256
b3sum-v0.8.0+b3c5efc7c975d903762dea809066f7c0a0603861-x86_64-unknown-linux-gnu(bu...