pub struct OprfNullifier {
pub query_proof_input: QueryProofCircuitInput<TREE_DEPTH>,
pub verifiable_oprf_output: VerifiableOprfOutput,
pub nullifier: Nullifier,
}Expand description
Nullifier computed using OPRF Nodes.
Fields§
§query_proof_input: QueryProofCircuitInput<TREE_DEPTH>The raw inputs to the Query Proof circuit
verifiable_oprf_output: VerifiableOprfOutputThe result of the distributed OPRF protocol.
nullifier: NullifierThe final nullifier value to be used in a Proof.
This is equal to VerifiableOprfOutput::output and is already unblinded.
Implementations§
Source§impl OprfNullifier
impl OprfNullifier
Sourcepub async fn generate(
services: &[String],
threshold: usize,
query_material: &CircomGroth16Material,
authenticator_input: AuthenticatorProofInput,
proof_request: &ProofRequest,
connector: Connector,
) -> Result<Self, ProofError>
pub async fn generate( services: &[String], threshold: usize, query_material: &CircomGroth16Material, authenticator_input: AuthenticatorProofInput, proof_request: &ProofRequest, connector: Connector, ) -> Result<Self, ProofError>
Generates a nullifier through the provided OPRF nodes for a specific proof request.
This method will handle the signature from the Authenticator authorizing the request for the OPRF nodes.
§Arguments
services: The list of endpoints of all OPRF nodes.threshold: The minimum number of OPRF nodes responses required to compute a valid nullifier. The source of truth for this value lives in theOprfKeyRegistrycontract.query_material: The material for the query proof circuit.authenticator_input: SeeAuthenticatorProofInputfor more details.proof_request: The proof request provided by the RP.
§Errors
Returns ProofError in the following cases:
PublicKeyNotFound- the public key for the given authenticator private key is not found in thekey_set.InvalidDLogProof– theDLogequality proof could not be verified.- Other errors may propagate from network requests, proof generation, or Groth16 verification.
Trait Implementations§
Source§impl Clone for OprfNullifier
impl Clone for OprfNullifier
Source§fn clone(&self) -> OprfNullifier
fn clone(&self) -> OprfNullifier
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OprfNullifier
impl RefUnwindSafe for OprfNullifier
impl Send for OprfNullifier
impl Sync for OprfNullifier
impl Unpin for OprfNullifier
impl UnsafeUnpin for OprfNullifier
impl UnwindSafe for OprfNullifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more