Trait modular_frost::curve::Curve
source · pub trait Curve: Ciphersuite {
const CONTEXT: &'static [u8];
// Provided methods
fn hash(dst: &[u8], data: &[u8]) -> Output<Self::H> { ... }
fn hash_to_F(dst: &[u8], msg: &[u8]) -> Self::F { ... }
fn hash_msg(msg: &[u8]) -> Output<Self::H> { ... }
fn hash_commitments(commitments: &[u8]) -> Output<Self::H> { ... }
fn hash_binding_factor(binding: &[u8]) -> Self::F { ... }
fn random_nonce<R: RngCore + CryptoRng>(
secret: &Zeroizing<Self::F>,
rng: &mut R,
) -> Zeroizing<Self::F> { ... }
fn read_G<R: Read>(reader: &mut R) -> Result<Self::G> { ... }
}
Expand description
FROST Ciphersuite.
This exclude the signing algorithm specific H2, making this solely the curve, its associated hash function, and the functions derived from it.
Required Associated Constants§
Provided Methods§
sourcefn hash(dst: &[u8], data: &[u8]) -> Output<Self::H>
fn hash(dst: &[u8], data: &[u8]) -> Output<Self::H>
Hash the given dst and data to a byte vector. Used to instantiate H4 and H5.
sourcefn hash_to_F(dst: &[u8], msg: &[u8]) -> Self::F
fn hash_to_F(dst: &[u8], msg: &[u8]) -> Self::F
Field element from hash. Used during key gen and by other crates under Serai as a general utility. Used to instantiate H1 and H3.
sourcefn hash_msg(msg: &[u8]) -> Output<Self::H>
fn hash_msg(msg: &[u8]) -> Output<Self::H>
Hash the message for the binding factor. H4 from the IETF draft.
sourcefn hash_commitments(commitments: &[u8]) -> Output<Self::H>
fn hash_commitments(commitments: &[u8]) -> Output<Self::H>
Hash the commitments for the binding factor. H5 from the IETF draft.
sourcefn hash_binding_factor(binding: &[u8]) -> Self::F
fn hash_binding_factor(binding: &[u8]) -> Self::F
Hash the commitments and message to calculate the binding factor. H1 from the IETF draft.
Object Safety§
This trait is not object safe.