Skip to main content
Version: dev

EdDSA Verification

eddsa::eddsa_poseidon_verify

Verifier for EdDSA signatures

fn eddsa_poseidon_verify(public_key_x : Field, public_key_y : Field, signature_s: Field, signature_r8_x: Field, signature_r8_y: Field, message: Field) -> bool

It is also possible to specify the hash algorithm used for the signature by using the eddsa_verify function by passing a type implementing the Hasher trait with the turbofish operator. For instance, if you want to use Poseidon2 instead, you can do the following:

use std::hash::poseidon2::Poseidon2Hasher;

eddsa_verify::<Poseidon2Hasher>(pub_key_a.x, pub_key_a.y, s_a, r8_a.x, r8_a.y, msg);
info

This is a black box function. Read this section to learn more about black box functions in Noir.

eddsa::eddsa_to_pub

Private to public key conversion.

Returns (pub_key_x, pub_key_y)

fn eddsa_to_pub(secret : Field) -> (Field, Field)