Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ nothing in webcpp's own code.
The guide (`doc/hash.adoc`) teaches each family of functions with two comparison tables, an example
program of `example/` per section and its pitfalls, then three applications from end to end; its
tables and `doc/llms.txt` are generated from `doc/capabilities.json` and the measured data by
`tools/hash/doc_tables.py`. `NOTICE.md` keeps the notice of the documentation it adapts.
`tools/hash/doc_tables.py`. Every key derivation runs on `backends::hash2` unless the call names
another backend; Argon2id and scrypt run on `backends::sodium`, their only backend. The measured
table, `doc/measurements.json`, is a reference measured on 2026-11-16 that decides nothing. `NOTICE.md` keeps the notice of the documentation it adapts.

## Building and testing

Expand All @@ -25,14 +27,11 @@ b2 -a --build-dir=bin/lane-emscripten toolset=emscripten libs/hash/test libs/has
b2 -a --build-dir=bin/lane-gcc-15 toolset=gcc-15 libs/hash/test libs/hash/example
```

Two own lanes run outside those. `c-suites` builds the C libraries' own test programs on every
target, and `measure` builds one program per cell of the capability table on every target in
one command, then checks the committed measurements; it needs the WebAssembly toolsets
(`clang-wasip2`, `clang-wasip3`, `emscripten`) to be set up beside the native one:
One own lane runs outside those: `c-suites` builds the C libraries' own test programs on every
target:

```
b2 -a --build-dir=bin/lane-c-suites libs/hash/test/c_suites//c-suites
b2 -a --build-dir=bin/lane-measure libs/hash/test/measure//measure
```

The user Jamfiles of the library (each line of the specification's section 5.1, as a user
Expand Down
6 changes: 3 additions & 3 deletions bench/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ rule with-openssl ( properties * )
<optimization>speed ;
webcpp.run pbkdf2_sha512_key : pbkdf2_sha512.cpp : $(.requirements) ;

# The same program at variant=release, which the own lane measure
# (test/measure/Jamfile) builds on the four targets and tools/hash/measure.py
# --check runs with no argument, its correctness test (on every target).
# The same program at variant=release, the one collect.py measures, run by
# hand (doc/performance.adoc); no lane measures it. pbkdf2_sha512_key runs in
# every lane of test/ (test/Jamfile builds this project).
exe pbkdf2_sha512 : pbkdf2_sha512.cpp : $(.requirements) <variant>release ;
explicit pbkdf2_sha512 ;
29 changes: 28 additions & 1 deletion doc/backends.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

// Generated by tools/hash/measure.py from doc/capabilities.json: do not edit.
// Generated by tools/hash/doc_tables.py from doc/capabilities.json: do not edit.

[#hash-backends]
== Backends
Expand Down Expand Up @@ -454,6 +454,33 @@ states about its constant time. The backends:
| native, wasip2, wasip3, emscripten
|===

=== The default backends

The backend a call that names none uses, on every target, whatever the program links (<<hash-default-backend>>):

[cols="2,1",options="header"]
|===
| Function | Default

| hkdf_extract
| hash2

| hkdf_expand
| hash2

| hkdf
| hash2

| pbkdf2
| hash2

| argon2id
| sodium

| scrypt
| sodium
|===

=== Constant time

What each backend's upstream states, and where:
Expand Down
Loading
Loading