002371445b
The probe looked only for its 32-byte canary, i.e. the seeds; the key material that actually signs is derived from them and never contains it, so an unwiped copy of the expanded key went unseen (QA's mutation Q15). The probe allocator now also watches up to four further 32-byte patterns, held in atomics (dealloc must not allocate or lock). The test computes the canary key's FIPS 204 expanded encoding with ml-dsa itself and watches K (held raw inside ml-dsa's ExpandedSigningKey) and a 32-byte window of the encoded s1; controls show an unwiped copy is seen and a Zeroizing one is not; then building, signing, binding and dropping a canary SigningKey must free no block holding either. Q15 re-checked: a SigningKey field holding an unwiped Vec of ml.to_expanded() fails the probe at the new assertion (reverted). The ml-dsa rnd / rho'' / y stack residue is out of the probe's reach (stack, not heap) and is recorded as a gap.
24 lines
991 B
TOML
24 lines
991 B
TOML
[package]
|
|
name = "arcanum-zeroize-probe"
|
|
version = "0.0.0"
|
|
edition = "2024"
|
|
license = "CPAL-1.0"
|
|
publish = false
|
|
description = "QA A-29: a counting allocator that checks Arcanum's secrets are wiped before their heap memory is freed. Test-only; never a dependency of anything."
|
|
|
|
[dependencies]
|
|
arcanum = { path = ".." }
|
|
zeroize = { version = "1.8", default-features = false, features = ["alloc"] }
|
|
|
|
[dev-dependencies]
|
|
# QA S-04: the probe computes the canary key's expanded ML-DSA key to watch its bytes. Same version
|
|
# and features as Arcanum's own dependency.
|
|
ml-dsa = { version = "=0.1.2", default-features = false, features = ["alloc", "rand_core", "zeroize"] }
|
|
chacha20 = { version = "0.10", default-features = false, features = ["rng"] }
|
|
rand_core = { version = "0.10", default-features = false }
|
|
|
|
# Its own workspace, like fuzz/: the probe needs `unsafe` (a GlobalAlloc), and Arcanum itself
|
|
# keeps `#![forbid(unsafe_code)]`. Nothing depends on this crate.
|
|
[workspace]
|
|
members = ["."]
|