rust-crypto-wasm icon indicating copy to clipboard operation
rust-crypto-wasm copied to clipboard

ed25519 sign then verify returns false

Open nmrshll opened this issue 5 years ago • 0 comments

Steps to reproduce

With rust, (e.g. in a test), run:

let seed = [0u8, 1, 2, 3, 4, 5, 67];
let kp = ed25519::keypair(&seed);
let msg: &[u8] = b"This is a test of the tsunami alert system.";
let sig = ed25519::signature(&msg, &kp.0);
let verif = ed25519::verify(&msg, &kp.1, &sig);
println!("{:?}", verif); //false

Expected:

I would expect verif to be true

Actual

verif evaluates to false

Am I using the library wrong or is this a bug ?

nmrshll avatar Feb 18 '20 14:02 nmrshll