dalek-cryptography / curve25519-dalek

A pure-Rust implementation of group operations on Ristretto and Curve25519
Other
850 stars 416 forks source link

ed25519: Add wycheproofs #640

Open pinkforest opened 4 months ago

pinkforest commented 4 months ago

Problem by dynamically adding tests at runtime is these can be missed silently if the dyn generation fails - google doesn't add / modify / remove them much in any case so can just re-generate & check em in when needed :woman_shrugging:

wycheproofs-ed25519-dalek is excluded from workspace --all-features so it doesn't barf with the ed25519-dalek/legacy_compatibility -

It still gets tested by default features OK via workspace

Notes

Testing whole workspace with --all-features enables every feature from ed25519-dalek dependency despite wycheproofs-ed25519-dalek not explicitly including it due to how the resolver works within workspace.

Namedly ed25519-dalek/legacy_compatibility causes barf at wycheproof expanded generated.rs tc 63 and 85 fails

repro @ 4af5275 workspace_root $ cargo test --target x86_64-unknown-linux-gnu --features legacy_compatibility

So tests worked I guess :]

Follow-Ups

I will also send another PR to turn the VALIDATION_CRITERIA into static tests directly from C2SP/CCTV/ed25519/vectors.json and some sort of checksumming / commit following thing perhaps to follow modulo easily