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).
This commit is contained in:
@@ -29,6 +29,17 @@ multiple-versions = "deny"
|
|||||||
wildcards = "deny"
|
wildcards = "deny"
|
||||||
highlight = "all"
|
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]
|
[sources]
|
||||||
unknown-registry = "deny"
|
unknown-registry = "deny"
|
||||||
unknown-git = "deny"
|
unknown-git = "deny"
|
||||||
|
|||||||
Reference in New Issue
Block a user