You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Review finding: v1.0.0 signer leaves SLH-DSA secret material on the released stack #260
The v1.0.0 vendored libbitcoinpqc leaves SK_SEED and WOTS/FORS secret state on the released stack after signing. The 1.x.x line has the stack scrub; v1.0.0/main does not.
Impact
A local process, core dump, swap image, or ptrace//proc/<pid>/mem read can recover the 64-byte SLH-DSA secret key.
Suggested fix
Bump the vendored library to the 1.x.x scrub release (or backport secure_zero_local and a volatile burn at the return of slh_dsa_sign/keygen/secret_key_validate) and add a secret-residue test.
Evidence
src/libbitcoinpqc/sphincsplus/ref/sign.c:146-255; hash_sha2.c:42-55; wotsx1.c:33-76. Stack probe hits SK_SEED at probe+65248; the newer vendor reports 0 hits.
Fixed on 1.x.x by #268 (libbitcoinpqc v0.3.2 with the signer stack scrub, merged as e374ba2) and #270 (qbit-side stack clear after PQC secret-key operations, including DerivePQCKey, merged as 330b370). main and 1.1.0 still vendor v0.3.0. Moving those lines to the scrubbed release is tracked in #276.
Activity
doc: add release notes for #268
test: let the pqc_tests stack probes run cleanly under Valgrind
subtree: pin libbitcoinpqc v0.3.1 and test the signer stack scrub
doc: add release notes for #268
subtree: pin libbitcoinpqc v0.3.2 and test the signer stack scrub
doc: add release notes for #268
subtree: import libbitcoinpqc v0.3.2 signer stack scrub (#268)
crypto: clear stack released by PQC secret-key operations
test: copy the released stack from a small frame in pqc_tests
test: let the pqc_tests stack probes run cleanly under Valgrind
test: check the library's burn directly in the scrub test
crypto: update the stack-burn comment for libbitcoinpqc v0.3.2
crypto: clear stack released by PQC secret-key operations (#270)
kiwidream commentedon Nov 4, 2026
Fixed on
1.x.xby #268 (libbitcoinpqc v0.3.2 with the signer stack scrub, merged as e374ba2) and #270 (qbit-side stack clear after PQC secret-key operations, includingDerivePQCKey, merged as 330b370).mainand1.1.0still vendor v0.3.0. Moving those lines to the scrubbed release is tracked in #276.subtree: import libbitcoinpqc v0.3.2 signer stack scrub (#268)
crypto: clear stack released by PQC secret-key operations (#270)