From 413dbaa279d4f4cee657100b8e4c14df3f6c695f Mon Sep 17 00:00:00 2001 From: mnovak Date: Thu, 26 Nov 2026 03:46:21 +0100 Subject: [PATCH] build: cargo deny bans ed25519-dalek/legacy_compatibility (QA S-10) With legacy_compatibility, ed25519-dalek checks only the top bits of S, so S + l is accepted: a second encoding of the Ed25519 half, and the malleability promise of verify_strict is gone. Feature unification lets any crate in the final binary turn it on. deny.toml now bans it for ed25519-dalek and curve25519-dalek, and ed25519-dalek/hazmat with it (cargo-deny 0.20 [[bans.features]]). Checked: bans ok as committed; enabling legacy_compatibility on ed25519-dalek in Cargo.toml fails `cargo deny --offline check bans` for both crates, and enabling hazmat fails it for ed25519-dalek (reverted). --- deny.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deny.toml b/deny.toml index 328afe2..71c4473 100644 --- a/deny.toml +++ b/deny.toml @@ -29,6 +29,17 @@ multiple-versions = "deny" wildcards = "deny" highlight = "all" +# QA S-10: `legacy_compatibility` makes ed25519-dalek accept a non-reduced S (S + l), a second +# encoding of every Ed25519 half, and is enabled for the whole binary by any crate that asks for it. +# `hazmat` exposes raw ExpandedSecretKey signing. Neither may reach Arcanum's graph. +[[bans.features]] +crate = "ed25519-dalek" +deny = ["legacy_compatibility", "hazmat"] + +[[bans.features]] +crate = "curve25519-dalek" +deny = ["legacy_compatibility"] + [sources] unknown-registry = "deny" unknown-git = "deny"