Commit 1ee8ee6
authored
Hardening deserialization (#836)
* fuzz: add MMR and crypto type deserialization fuzz targets
Add fuzz targets for high-severity attack surface:
- mmr.rs: PartialMmr and Forest deserialization
- crypto.rs: Falcon PublicKey, SealingKey, SealedMessage deserialization
Also update keccak to 0.1.6 to fix RUSTSEC-2026-0012.
* ci: add mmr and crypto fuzz targets to CI workflow
Add new fuzz targets for MMR structures (PartialMmr, Forest) and
cryptographic types (PublicKey, SealingKey, SealedMessage) to the
daily CI fuzz job.
* fix: replace unwrap with proper error handling in XChaCha decryption
The AeadScheme implementation for XChaCha used unwrap() when
deserializing EncryptedData from raw bytes, which could panic on
malformed attacker-controlled input. Replace with proper error
propagation.
Also add AEAD fuzz target to catch similar issues and include it
in CI fuzz job.
* fuzz: add DSA signatures fuzz target
Add fuzz coverage for all signature deserialization paths:
- EdDSA (Ed25519) signatures and public keys
- ECDSA (secp256k1) signatures, public keys, and recovery
- Falcon512 signatures, public keys, and recovery
Also exercises verify paths to catch panics on malformed input.
* chore: Changelog1 parent 6af6c7d commit 1ee8ee6
File tree
10 files changed
+406
-83
lines changed- .github/workflows
- miden-crypto-fuzz
- fuzz_targets
- miden-crypto/src/aead/xchacha
10 files changed
+406
-83
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
168 | 184 | | |
169 | 185 | | |
170 | 186 | | |
| |||
0 commit comments