rust-crypto-wasm
rust-crypto-wasm copied to clipboard
ed25519 sign then verify returns false
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 ?