/// Create ring VRF signature using specified randomness source.
Create ring VRF signature using specified randomness source.
Create ring VRF signature using specified randomness source .
pub fn ring_vrf_prove<T, R, P, A>(
        &self,
        vrf_input: VRFInput,
        mut extra: T,
        copath: RingSecretCopath<A>,
        proving_key: RingSRS<P>,
        rng: &mut R,
    ) -> SynthesisResult<RingVRFProof<Bls12>>
    where
        T: SigningTranscript,
        R: RngCore + CryptoRng,
        P: groth16::ParameterSource<Bls12>,
        P::G1Builder: SourceBuilder<<Bls12 as Engine>::G1Affine>,
        P::G2Builder: SourceBuilder<<Bls12 as Engine>::G2Affine>,
        A: 'static + PoseidonArity,
    {
        let instance = crate::circuit::RingVRF {
            depth: proving_key.depth,
            unblinding: None, //Some(self.clone()),
            pk_blinded: None, //Some(vrf_input.as_point().clone()),
            extra: Some(extra.challenge_scalar(b"extra-msg")),
            copath: copath,
        };
        groth16::create_random_proof(instance, proving_key.srs, rng)
    }
pub fn ring_vrf_prove < T , R , P , A > ( & self , vrf_input : VRFInput , mut extra : T , copath : RingSecretCopath < A > , proving_key : RingSRS < P > , rng : & mut R , ) -> SynthesisResult < RingVRFProof < Bls12 > > where T : SigningTranscript , R : RngCore + CryptoRng , P : groth16 :: ParameterSource < Bls12 > , P :: G1Builder : SourceBuilder < < Bls12 as Engine > :: G1Affine > , P :: G2Builder : SourceBuilder < < Bls12 as Engine > :: G2Affine > , A : ' static + PoseidonArity , { let instance = crate :: circuit :: RingVRF { depth : proving_key . depth , unblinding : None , //Some(self.clone()), pk_blinded : None , //Some(vrf_input.as_point().clone()), extra : Some ( extra . challenge_scalar ( b" " ) ) , copath : copath , } ; groth16 :: create_random_proof ( instance , proving_key . srs , rng ) }
Create ring VRF signature using specified randomness source.
Create ring VRF signature using specified randomness source .
&self
vrf_input
VRFInput
extra
T
copath
RingSecretCopath<A>
proving_key
RingSRS<P>
rng
&mut R