DaGenix/rust-crypto

Ed25519 signature verification fails

LumaRay opened this issue · 0 comments

Signature verification fails, pleqse help!

use crypto::ed25519::{keypair, signature, verify};
fn main() {
    let seed: &[u8] = b"This is a seed";
    let message: &[u8] = b"This is a test of the tsunami a This is a test of the tsunami a ";
    let (mut secret_key, mut public_key) = keypair(seed);
    let mut sig = signature(message, &secret_key);
    assert!(verify(message, &public_key, &sig)); // Assert fails here
}