pub trait SessionFieldElement {
// Required methods
fn random_for_session<R: CryptoRng + RngCore>(rng: &mut R) -> FieldElement;
fn is_valid_for_session(&self) -> bool;
}Expand description
Allows field element generation for Session Proofs
Required Methods§
Sourcefn random_for_session<R: CryptoRng + RngCore>(rng: &mut R) -> FieldElement
fn random_for_session<R: CryptoRng + RngCore>(rng: &mut R) -> FieldElement
Generate a randomized field element with a specific prefix used only for Session Proofs.
This is generally used to:
- Generate the
SessionId::oprf_seedused as input for the OPRF derivation ofsession_id_r_seed - Generate a randomized action for the nullifier input of a Session Proof
Sourcefn is_valid_for_session(&self) -> bool
fn is_valid_for_session(&self) -> bool
Returns whether a Field Element is valid for Session Proof use, i.e. it has the right prefix
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.