Struct sigma_fun::FiatShamir [−][src]
Applies the Fiat-Shamir transform to a given Sigma
protocol given a Transcript
.
Fields
transcript: T
The transcript
sigma: S
The sigma protocol
Implementations
impl<S: Sigma, T: Transcript<S>> FiatShamir<S, T>
[src]
pub fn new(sigma: S, transcript: T, override_name: Option<&str>) -> Self
[src]
Create a new non-interactive prover/verifier given a Sigma
and a Transcript
for that
Sigma protocol.
pub fn prove<Rng: CryptoRng + RngCore>(
&self,
witness: &S::Witness,
statement: &S::Statement,
rng: Option<&mut Rng>
) -> CompactProof<S> where
T: ProverTranscript<S>,
[src]
&self,
witness: &S::Witness,
statement: &S::Statement,
rng: Option<&mut Rng>
) -> CompactProof<S> where
T: ProverTranscript<S>,
Generates a proof given the witness, a statement and some optional additional randomness.
Optimistically, the proof should be secure without passing in rng
but it is always recommended.
to pass in secure system random number generator as rng
.
#[must_use]pub fn verify(&self, statement: &S::Statement, proof: &CompactProof<S>) -> bool
[src]
Verifies the proof given the statement.
Trait Implementations
impl<S: Clone, T: Clone> Clone for FiatShamir<S, T>
[src]
fn clone(&self) -> FiatShamir<S, T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug, T: Debug> Debug for FiatShamir<S, T>
[src]
impl<S: Default + Sigma, T: Transcript<S> + Default> Default for FiatShamir<S, T>
[src]
Auto Trait Implementations
impl<S, T> RefUnwindSafe for FiatShamir<S, T> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for FiatShamir<S, T> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<S, T> Sync for FiatShamir<S, T> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<S, T> Unpin for FiatShamir<S, T> where
S: Unpin,
T: Unpin,
S: Unpin,
T: Unpin,
impl<S, T> UnwindSafe for FiatShamir<S, T> where
S: UnwindSafe,
T: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Mark for T
[src]
#[must_use]pub fn mark<M>(self) -> <M as ChangeMark<T>>::Out where
M: ChangeMark<T>,
[src]
M: ChangeMark<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,