Skip to content

Commit e39ab94

Browse files
fix(rust): ed25519-dalek 3.0 removed the std feature — use alloc
PR #37 bumps x25519-dalek 2.0 -> 3.0 and ed25519-dalek 2.1 -> 3.0, and cargo could not even resolve the dependency graph: error: failed to select a version for `ed25519-dalek`. package `pqf-reader` depends on `ed25519-dalek` with feature `std` but `ed25519-dalek` does not have that feature. ed25519-dalek 3.0 went no_std-first and dropped `std`, which in 2.1.1 was ["alloc", "ed25519/std", "serde?/std", "sha2/std"]. Its default is now ["fast", "zeroize"], and `alloc` is the surviving equivalent of what this crate needs. x25519-dalek 3.0 still has `static_secrets`, so that line was already correct. Because pqf-writer path-depends on pqf-reader, nothing Rust-side resolved, which is why all 11 Rust-dependent checks failed while every .NET check passed. Verified locally against the real toolchain, not by inspection: cargo build --release (pqf-reader) clean cargo build --release (pqf-writer) clean cargo test --release (pqf-writer) 12 passed, 0 failed cargo run --bin pqf-conformance pass=47 fail=0 skipped=0 cargo build --target wasm32-unknown-unknown (bindings/wasm) clean The conformance run is the one that matters: it includes TV-NEG-011 (refused: SignatureVerificationFailure), so Ed25519 verification still behaves correctly under dalek 3.0 and curve25519-dalek 5.0, and all 47 vectors agree with the .NET implementation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent df44fd1 commit e39ab94

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

impl/rust/pqf-reader/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ x25519-dalek = { version = "3.0", features = ["static_secrets"] }
2828
ml-kem = "0.3.0"
2929

3030
# Hybrid signatures
31-
ed25519-dalek = { version = "3.0", features = ["std"] }
31+
ed25519-dalek = { version = "3.0", features = ["alloc"] }
3232
# ml-dsa 0.1 routes the `signature::Verifier::verify` trait method to
3333
# FIPS 204 Algorithm 8 (no domain separator). BouncyCastle's pure
3434
# ML-DSA-87 signs with Algorithm 3 (with the empty-context prefix), so

0 commit comments

Comments
 (0)