Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ed25519 signature verification fails #480

Open
LumaRay opened this issue Oct 26, 2022 · 0 comments
Open

Ed25519 signature verification fails #480

LumaRay opened this issue Oct 26, 2022 · 0 comments

Comments

@LumaRay
Copy link

LumaRay commented Oct 26, 2022

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant