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
Commit 4eb96fb
Browse filesBrowse the repository at this point in the historyBrowse files
Fix intermittent XMSS verification failure and FN-DSA conversion UB
XMSS signatures failed to verify roughly one run in twelve, on every
platform. xmss_hash_f leaves the keyAndMask address field set, and a
WOTS+ chain whose base-w digit is zero performs no hash steps at all, so
the address fed to the next chain's secret-key PRF depended on how many
steps the previous chain took. Key generation always runs w-1 steps
while signing runs digit-many, so the two derived different chain
secrets whenever an earlier digit was zero.
This was latent until the keyAndMask fix in 0.2.0 made that field
significant; before then every node shared one key and the leftover
state could not matter. Both derivation sites now reset keyAndMask
before the PRF.
Also clamps out-of-range and NaN double-to-int32_t conversions in
ntru_solve.c and sign.c. The NTRU solver can diverge to magnitudes
around 1e15, and such a conversion is undefined behaviour rather than a
wrapping one. Reported by the UndefinedBehaviorSanitizer job.
test_security_audit gains a WOTS+ round-trip check over many digit
patterns, which is what isolated the defect; its XMSS groups are now
compiled only when XMSS is enabled, so minimal builds link; and its
timeout accommodates MemorySanitizer, under which rebuilding a Merkle
tree per signature exceeds 600 s.
Reported-by: Conner (Spartan8806) <https://github.com/spartan8806>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,41 @@ All notable changes to libpqc-dyber will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [Unreleased]
9
+
10
+
### Security
11
+
12
+
-**XMSS: signatures intermittently failed to verify.**`xmss_hash_f`
13
+
leaves the `keyAndMask` address field set, and a WOTS+ chain whose
14
+
base-w digit is zero performs no hash steps at all — so the address fed
15
+
to the next chain's secret-key PRF depended on how many steps the
16
+
previous chain took, which differs between key generation (always w-1
17
+
steps) and signing (digit-many steps). Affected chains derived
18
+
different secrets in the two paths. This surfaced only once the
19
+
`keyAndMask` fix in 0.2.0 made that field significant; before then it
20
+
was masked by every node sharing one key. Reproduced at roughly 1 run
21
+
in 12, and on every platform.
22
+
-**FN-DSA: undefined behaviour converting out-of-range doubles to
23
+
`int32_t`** in `ntru_solve.c` and `sign.c`. The NTRU solver can diverge
24
+
and produce magnitudes around 1e15; an out-of-range or NaN
25
+
float-to-integer conversion is undefined, not wrapping. Conversions are
26
+
now clamped, leaving the caller's own correctness checks to reject the
27
+
result. Caught by the UndefinedBehaviorSanitizer job.
28
+
29
+
### Added
30
+
31
+
-`test_security_audit` now asserts the WOTS+ round-trip invariant
32
+
(`pk_from_sig(sign(m), m) == keygen()`) over many digit patterns, which
33
+
is what caught the defect above.
34
+
35
+
### Fixed
36
+
37
+
-`test_security_audit` no longer fails to link in minimal builds; the
38
+
groups that call XMSS internals are compiled only when XMSS is enabled.
39
+
- Raised the regression suite's timeout to 1800 s. Rebuilding a Merkle
40
+
tree per signature is inherent to what it asserts, and that exceeds a
41
+
600 s budget under MemorySanitizer.
42
+
8
43
## [0.2.0] - 2026-07-29
9
44
10
45
This is a security release. It fixes four critical memory-safety defects,
0 commit comments