Struct libspartan::SNARK [−][src]
pub struct SNARK { /* fields omitted */ }Expand description
SNARK holds a proof produced by Spartan SNARK
Implementations
pub fn encode(
inst: &Instance,
gens: &SNARKGens
) -> (ComputationCommitment, ComputationDecommitment)
pub fn encode(
inst: &Instance,
gens: &SNARKGens
) -> (ComputationCommitment, ComputationDecommitment)
A public computation to create a commitment to an R1CS instance
pub fn prove(
inst: &Instance,
decomm: &ComputationDecommitment,
vars: VarsAssignment,
inputs: &InputsAssignment,
gens: &SNARKGens,
transcript: &mut Transcript
) -> Self
pub fn prove(
inst: &Instance,
decomm: &ComputationDecommitment,
vars: VarsAssignment,
inputs: &InputsAssignment,
gens: &SNARKGens,
transcript: &mut Transcript
) -> Self
A method to produce a SNARK proof of the satisfiability of an R1CS instance
pub fn verify(
&self,
comm: &ComputationCommitment,
input: &InputsAssignment,
transcript: &mut Transcript,
gens: &SNARKGens
) -> Result<(), ProofVerifyError>
pub fn verify(
&self,
comm: &ComputationCommitment,
input: &InputsAssignment,
transcript: &mut Transcript,
gens: &SNARKGens
) -> Result<(), ProofVerifyError>
A method to verify the SNARK proof of the satisfiability of an R1CS instance
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for SNARK
impl UnwindSafe for SNARK
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn cast(self) -> U
pub fn cast(self) -> U
Numeric cast from self to T.
pub fn from_bits(t: T) -> T
pub fn from_bits(t: T) -> T
Safe lossless bitwise transmute from T to Self.
pub fn from_cast(t: T) -> T
pub fn from_cast(t: T) -> T
Numeric cast from T to Self.
pub fn into_bits(self) -> U
pub fn into_bits(self) -> U
Safe lossless bitwise transmute from self to T.