-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Intro
For example in frost-ristretto255 now it is implemented as FROST(Ristretto255, SHA512) which sha512 is tightly coupled as a hash function.
However the hash function is not specified in the Schnorr signature only if it satisfies the collision resistance in nature.
Proposal
By making a trait like SchnorrHash,
pub trait SchnorrHash {
fn hash_to_array(inputs: &[&[u8]]) -> [u8; 64];
}
pub struct Sha512;
impl SchnorrHash for Sha512 {
// TODO
}and making the struct like Ristretto255<H: SchnorrHash> where now only RistrettoSha512 is served
https://github.com/ZcashFoundation/frost/blob/frost-ristretto255/v2.1.0/frost-ristretto255/src/lib.rs#L150
users can choose the hash function of the Schnorr signature.
Ristretto255Sha512 can be an alias of Ristretto255<Sha512> and it can support the compatibility.
Motivation
By using ZK-friendly hash function like Poseidon, a ZK-friendly signature can be generated by FROST(Ristretto, Poseidon)