Skip to content

Every key derivation defaults to backends::hash2; no measurement or define decides a default - #4

Merged
pinhopro merged 1 commit into
mainfrom
hash/defaults-hash2
Nov 16, 2026
Merged

pinhopro merged 1 commit into
mainfrom
hash/defaults-hash2

Conversation

@pinhopro

Copy link
Copy Markdown
Contributor

The owner's decisions of 2026-11-16 (proposal: webcpporg/proposals#17, design D33).

  • default_backend / default_kdf_backend keep their signatures and answer backends::hash2 for hkdf, hkdf_extract, hkdf_expand and pbkdf2 on every target and link set, backends::sodium for argon2id and scrypt. BearSSL, OpenSSL and libsodium's HKDF stay, tested as before, reached only by naming them in the type (hkdf<hmac_sha2_256, backends::openssl>).
  • Removed: every profile (WEBCPP_HASH_PROFILE_*), hash's reading of WEBCPP_PROFILE_*, the per-algorithm overrides WEBCPP_HASH_DEFAULT_BACKEND_<ALGORITHM>_<NAME> with detail/overrides.hpp, detail/ranking.hpp and the code reading it, the profile's detect_mismatch, their tests, messages and MSVC cases, and test/measure. A former define compiles and has no effect (default_backend_former_defines).
  • argon2id and scrypt on the default without libsodium now stop with sodium.hpp's own instruction (argon2id_default_not_linked, scrypt_default_not_linked).
  • doc/capabilities.json names each function's default (layout 3), checked by capabilities_test. doc/measurements.* stay as a reference measured on 2026-11-16 that decides nothing. profile.adoc becomes choosing_backend.adoc; the generated tables and llms.txt follow. bench/'s correctness program runs in every lane.

The superproject side (removing tools/hash/measure.py and the measure lane, doc_tables.py rendering the data chapters) is webcpporg/webcpp's hash/defaults-hash2. This branch is independent of #3.

Verified locally: test and example from scratch on native, wasip2, wasip3, emscripten and gcc-15; libs/crypto native; the tools' tests; full lint clean; b2 -a doc and b2 site.

🤖 Generated with Claude Code

…ement or define decides a default

The owner's decisions of 2026-11-16. default_backend and default_kdf_backend answer
backends::hash2 for hkdf, hkdf_extract, hkdf_expand and pbkdf2 on every target and link set, and
backends::sodium for argon2id and scrypt, their only backend; BearSSL, OpenSSL and libsodium's
HKDF are reached only by naming them in the type. The profiles, the umbrella profile's reading,
the per-algorithm overrides with detail/overrides.hpp, detail/ranking.hpp and the measure lane
(test/measure) are removed, with their tests and messages; a former define has no effect
(default_backend_former_defines). argon2id and scrypt on the default without libsodium stop with
sodium.hpp's own instruction. doc/capabilities.json names each function's default (layout 3);
doc/measurements.* stay as a reference measured on 2026-11-16 that decides nothing; the guide's
chapter on the profile becomes the chapter on the default backend; bench's correctness program
runs in every lane.
@pinhopro
pinhopro merged commit 3c9505a into main Nov 16, 2026
18 of 27 checks passed
@pinhopro
pinhopro deleted the hash/defaults-hash2 branch November 20, 2026 04:18
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.

1 participant