Struct storage_proofs_core::por::PoR[][src]

pub struct PoR<Tree: MerkleTreeTrait> { /* fields omitted */ }
Expand description

Merkle tree based proof of retrievability.

Trait Implementations

impl<'a, Tree: 'static + MerkleTreeTrait> CompoundProof<'a, PoR<Tree>, PoRCircuit<Tree>> for PoRCompound<Tree>[src]

fn circuit<'b>(
    public_inputs: &<PoR<Tree> as ProofScheme<'a>>::PublicInputs,
    _component_private_inputs: <PoRCircuit<Tree> as CircuitComponent>::ComponentPrivateInputs,
    proof: &'b <PoR<Tree> as ProofScheme<'a>>::Proof,
    public_params: &'b <PoR<Tree> as ProofScheme<'a>>::PublicParams,
    _partition_k: Option<usize>
) -> Result<PoRCircuit<Tree>>
[src]

circuit constructs an instance of this CompoundProof’s bellperson::Circuit. circuit takes PublicInputs, PublicParams, and Proof from this CompoundProof’s proof::ProofScheme (S) and uses them to initialize Circuit fields which will be used to construct public and private inputs during circuit synthesis. Read more

fn blank_circuit(
    public_params: &<PoR<Tree> as ProofScheme<'a>>::PublicParams
) -> PoRCircuit<Tree>
[src]

fn generate_public_inputs(
    pub_inputs: &<PoR<Tree> as ProofScheme<'a>>::PublicInputs,
    pub_params: &<PoR<Tree> as ProofScheme<'a>>::PublicParams,
    _k: Option<usize>
) -> Result<Vec<Fr>>
[src]

generate_public_inputs generates public inputs suitable for use as input during verification of a proof generated from this CompoundProof’s bellperson::Circuit (C). These inputs correspond to those allocated when C is synthesized. Read more

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

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

fn prove<'b>(
    pub_params: &PublicParams<'a, S>,
    pub_in: &S::PublicInputs,
    priv_in: &S::PrivateInputs,
    groth_params: &'b MappedParameters<Bls12>
) -> Result<MultiProof<'b>>
[src]

prove is equivalent to ProofScheme::prove.

fn prove_with_vanilla<'b>(
    pub_params: &PublicParams<'a, S>,
    pub_in: &S::PublicInputs,
    vanilla_proofs: Vec<S::Proof>,
    groth_params: &'b MappedParameters<Bls12>
) -> Result<MultiProof<'b>>
[src]

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

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

Efficiently verify multiple proofs.

fn circuit_proofs(
    pub_in: &S::PublicInputs,
    vanilla_proofs: Vec<S::Proof>,
    pub_params: &S::PublicParams,
    groth_params: &MappedParameters<Bls12>,
    priority: bool
) -> Result<Vec<Proof<Bls12>>>
[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 aggregate_proofs(
    prover_srs: &ProverSRS<Bls12>,
    hashed_seeds: &[u8],
    proofs: &[Proof<Bls12>]
) -> Result<AggregateProof<Bls12>>
[src]

Given a prover_srs key, a list of groth16 proofs, and an ordered list of seeds (used to derive the PoRep challenges) hashed using FIXME, aggregate them all into an AggregateProof type. Read more

fn verify_aggregate_proofs(
    ip_verifier_srs: &VerifierSRS<Bls12>,
    pvk: &PreparedVerifyingKey<Bls12>,
    hashed_seeds: &[u8],
    public_inputs: &[Vec<Fr>],
    aggregate_proof: &AggregateProof<Bls12>
) -> Result<bool>
[src]

Verifies the aggregate proof, with respect to the flattened input list. Read more

fn groth_params<R: RngCore>(
    rng: Option<&mut R>,
    public_params: &S::PublicParams
) -> Result<MappedParameters<Bls12>>
[src]

If the rng option argument is set, parameters will be generated using it. This is used for testing only, or where parameters are otherwise unavailable (e.g. benches). If rng is not set, an error will result if parameters are not present. Read more

fn verifying_key<R: RngCore>(
    rng: Option<&mut R>,
    public_params: &S::PublicParams
) -> Result<VerifyingKey<Bls12>>
[src]

If the rng option argument is set, parameters will be generated using it. This is used for testing only, or where parameters are otherwise unavailable (e.g. benches). If rng is not set, an error will result if parameters are not present. Read more

fn srs_key<R: RngCore>(
    rng: Option<&mut R>,
    public_params: &S::PublicParams,
    num_proofs_to_aggregate: usize
) -> Result<ProverSRS<Bls12>>
[src]

If the rng option argument is set, parameters will be generated using it. This is used for testing only, or where parameters are otherwise unavailable (e.g. benches). If rng is not set, an error will result if parameters are not present. Read more

fn srs_verifier_key<R: RngCore>(
    rng: Option<&mut R>,
    public_params: &S::PublicParams,
    num_proofs_to_aggregate: usize
) -> Result<VerifierSRS<Bls12>>
[src]

If the rng option argument is set, parameters will be generated using it. This is used for testing only, or where parameters are otherwise unavailable (e.g. benches). If rng is not set, an error will result if parameters are not present. Read more

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

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

Like circuit_for_test but returns values for all partitions.

impl<Tree: Debug + MerkleTreeTrait> Debug for PoR<Tree>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<Tree: Default + MerkleTreeTrait> Default for PoR<Tree>[src]

fn default() -> PoR<Tree>[src]

Returns the “default value” for a type. Read more

impl<'a, Tree: 'a + MerkleTreeTrait> ProofScheme<'a> for PoR<Tree>[src]

type PublicParams = PublicParams

type SetupParams = SetupParams

type PublicInputs = PublicInputs<<Tree::Hasher as Hasher>::Domain>

type PrivateInputs = PrivateInputs<'a, Tree>

type Proof = DataProof<Tree::Proof>

type Requirements = NoRequirements

fn setup(sp: &SetupParams) -> Result<PublicParams>[src]

setup is used to generate public parameters from setup parameters in order to specialize a ProofScheme to the specific parameters required by a consumer. Read more

fn prove<'b>(
    pub_params: &'b Self::PublicParams,
    pub_inputs: &'b Self::PublicInputs,
    priv_inputs: &'b Self::PrivateInputs
) -> Result<Self::Proof>
[src]

prove generates and returns a proof from public parameters, public inputs, and private inputs.

fn verify(
    pub_params: &Self::PublicParams,
    pub_inputs: &Self::PublicInputs,
    proof: &Self::Proof
) -> Result<bool>
[src]

verify returns true if the supplied proof is valid for the given public parameter and public inputs. Note that verify does not have access to private inputs. Remember that proof is untrusted, and any data it provides MUST be validated as corresponding to the supplied public parameters and inputs. Read more

fn prove_all_partitions(
    pub_params: &Self::PublicParams,
    pub_in: &Self::PublicInputs,
    priv_in: &Self::PrivateInputs,
    partition_count: usize
) -> Result<Vec<Self::Proof>>
[src]

fn verify_all_partitions(
    pub_params: &Self::PublicParams,
    pub_in: &Self::PublicInputs,
    proofs: &[Self::Proof]
) -> Result<bool>
[src]

fn with_partition(
    pub_in: Self::PublicInputs,
    _k: Option<usize>
) -> Self::PublicInputs
[src]

fn satisfies_requirements(
    _pub_params: &Self::PublicParams,
    _requirements: &Self::Requirements,
    _partitions: usize
) -> bool
[src]

Auto Trait Implementations

impl<Tree> RefUnwindSafe for PoR<Tree> where
    Tree: RefUnwindSafe

impl<Tree> Send for PoR<Tree>

impl<Tree> Sync for PoR<Tree>

impl<Tree> Unpin for PoR<Tree> where
    Tree: Unpin

impl<Tree> UnwindSafe for PoR<Tree> where
    Tree: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V