[][src]Struct storage_proofs::circuit::por::PoRCircuit

pub struct PoRCircuit<'a, E: JubjubEngine, H: Hasher> { /* fields omitted */ }

Proof of retrievability.

Fields

  • params - The params for the bls curve.
  • value - The value of the leaf.
  • auth_path - The authentication path of the leaf in the tree.
  • root - The merkle root of the tree.

Methods

impl<'a, E: JubjubEngine, H: Hasher> PoRCircuit<'a, E, H>[src]

pub fn synthesize<CS>(
    cs: CS,
    params: &E::Params,
    value: Option<E::Fr>,
    auth_path: Vec<Option<(E::Fr, bool)>>,
    root: Root<E>,
    private: bool
) -> Result<(), SynthesisError> where
    E: JubjubEngine,
    CS: ConstraintSystem<E>, 
[src]

Trait Implementations

impl<'a, E: JubjubEngine, H: Hasher> CircuitComponent for PoRCircuit<'a, E, H>[src]

impl<'a, H> CompoundProof<'a, Bls12, MerklePoR<H>, PoRCircuit<'a, Bls12, H>> for PoRCompound<H> where
    H: 'a + Hasher
[src]

fn setup<'b>(sp: &SetupParams<'a, 'b, E, S>) -> Result<PublicParams<'a, E, S>> where
    E::Params: Sync
[src]

fn partition_count(public_params: &PublicParams<'a, E, S>) -> usize[src]

fn prove<'b>(
    pub_params: &'b PublicParams<'a, E, S>,
    pub_in: &'b S::PublicInputs,
    priv_in: &'b S::PrivateInputs,
    groth_params: &'b Parameters<E>
) -> Result<MultiProof<'b, E>> where
    E::Params: Sync
[src]

prove is equivalent to ProofScheme::prove.

fn verify(
    public_params: &PublicParams<'a, E, S>,
    public_inputs: &S::PublicInputs,
    multi_proof: &MultiProof<E>,
    requirements: &S::Requirements
) -> Result<bool>
[src]

fn circuit_proof<'b>(
    pub_in: &S::PublicInputs,
    vanilla_proof: &S::Proof,
    pub_params: &'b S::PublicParams,
    params: &'a E::Params,
    groth_params: &Parameters<E>
) -> Result<Proof<E>>
[src]

circuit_proof creates and synthesizes a circuit from concrete params/inputs, then generates a groth proof from it. It returns a groth proof. circuit_proof is used internally and should neither be called nor implemented outside of default trait methods. Read more

fn groth_params(
    public_params: &S::PublicParams,
    engine_params: &'a E::Params
) -> Result<Parameters<E>>
[src]

fn verifying_key(
    public_params: &S::PublicParams,
    engine_params: &'a E::Params
) -> Result<VerifyingKey<E>>
[src]

fn circuit_for_test(
    public_parameters: &PublicParams<'a, E, S>,
    public_inputs: &S::PublicInputs,
    private_inputs: &S::PrivateInputs
) -> (C, Vec<E::Fr>)
[src]

impl<'a, E: JubjubEngine, H: Hasher> Circuit<E> for PoRCircuit<'a, E, H>[src]

fn synthesize<CS: ConstraintSystem<E>>(
    self,
    cs: &mut CS
) -> Result<(), SynthesisError> where
    E: JubjubEngine
[src]

Public Inputs

This circuit expects the following public inputs.

  • [0] - packed version of the is_right components of the auth_path.
  • [1] - the merkle root of the tree.

This circuit derives the following private inputs from its fields:

  • value_num - packed version of value as bits. (might be more than one Fr)

Note: All public inputs must be provided as E::Fr.

Auto Trait Implementations

impl<'a, E, H> Unpin for PoRCircuit<'a, E, H> where
    H: Unpin,
    <E as ScalarEngine>::Fr: Unpin

impl<'a, E, H> Sync for PoRCircuit<'a, E, H> where
    <E as ScalarEngine>::Fr: Sync,
    <E as JubjubEngine>::Params: Sync

impl<'a, E, H> Send for PoRCircuit<'a, E, H> where
    <E as ScalarEngine>::Fr: Send,
    <E as JubjubEngine>::Params: Sync

impl<'a, E, H> RefUnwindSafe for PoRCircuit<'a, E, H> where
    H: RefUnwindSafe,
    <E as ScalarEngine>::Fr: RefUnwindSafe,
    <E as JubjubEngine>::Params: RefUnwindSafe

impl<'a, E, H> UnwindSafe for PoRCircuit<'a, E, H> where
    H: UnwindSafe,
    <E as ScalarEngine>::Fr: UnwindSafe,
    <E as JubjubEngine>::Params: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,