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_with_hasher
function with a parameter implementing the Hasher trait. For instance, if you want to use Poseidon2 instead, you can do the following:
use dep::std::hash::poseidon2::Poseidon2Hasher;
let mut hasher = Poseidon2Hasher::default();
eddsa_verify_with_hasher(pub_key_a.x, pub_key_a.y, s_a, r8_a.x, r8_a.y, msg, &mut hasher);
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)