fix(fuzz): repair broken fuzz_public_key target#109
Merged
Conversation
The target referenced four APIs that no longer exist on `wsc::signature::keys`: - `PublicKey::from_openssh` - `PublicKey::from_any` - `PublicKeySet::from_openssh` - `SecretKey::from_openssh` OpenSSH ingestion and the polymorphic `from_any` auto-detect entry point were removed from the public-key surface; only raw-bytes, PEM, and DER parsing remain. Audit PR #98 (parser hardness) flagged the build failure as a pre-existing leftover, out of scope for that change. This commit rewrites the target against the current surface only: - PublicKey::{from_bytes,from_pem,from_der} + round-trip oracles - SecretKey::{from_bytes,from_pem,from_der} + round-trip (handling the `Zeroizing<Vec<u8>>` / `Zeroizing<String>` returns of `SecretKey::to_bytes` / `to_pem` via deref coercion) - determinism check on `PublicKey::attach_default_key_id` A module-level comment documents the dropped APIs so the next reviewer does not re-introduce them. No core source touched; only the fuzz target was changed. Verified: - `cd fuzz && cargo build --bin fuzz_public_key` -> clean - `cd fuzz && cargo build --bins` -> clean - `cargo build --workspace --release` -> clean Trace: skip Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
avrabe
added a commit
that referenced
this pull request
May 11, 2026
Patch release bundling four merged PRs: #107 — cargo-deny CI step hardening (closes #103) #108 — discharge lemma_le64_injective Verus admit (audit C-1 partial) #109 — repair fuzz_public_key target (audit follow-up from #98) #110 — clear 3 RUSTSEC advisories via dep bumps (fixes #102) Companion work on 0.8.2+next: #111 — criterion benches for signature verification (#89) #112 — lift Kani wasm_module mask; document merkle + format See CHANGELOG.md for the full release notes. Trace: skip Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The `fuzz_public_key` target referenced four APIs that have since been removed from `src/lib/src/signature/keys.rs`:
OpenSSH ingestion and the polymorphic auto-detect entry point are gone; only raw-bytes, PEM, and DER parsing remain on `PublicKey` and `SecretKey`.
Fix
Rewrote the target against the current surface only. New oracles:
Added a module comment documenting the dropped APIs to prevent reintroduction.
Handled `SecretKey::to_bytes` / `to_pem` returning `Zeroizing<…>` via deref coercion.
Verification
Originally flagged in audit PR #98 as a pre-existing broken target out of scope at the time.