[−][src]Struct sigma_fun::HashTranscript
A transcript which consists of a hash with fixed length output and a seedable RNG.
The SeedableRng
specified must have the same seed length as the hash's output length.
R
may be set to ()
but the it won't implement ProverTranscript
.
Trait Implementations
impl<H: Clone, R: Clone> Clone for HashTranscript<H, R>
[src]
pub fn clone(&self) -> HashTranscript<H, R>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<H: Debug, R: Debug> Debug for HashTranscript<H, R>
[src]
impl<H: Default, R> Default for HashTranscript<H, R>
[src]
impl<S, H, R> ProverTranscript<S> for HashTranscript<H, R> where
S: Sigma,
H: Update + FixedOutput<OutputSize = U32> + Clone,
R: SeedableRng + CryptoRng + RngCore + Clone,
R::Seed: From<GenericArray<u8, U32>>,
[src]
S: Sigma,
H: Update + FixedOutput<OutputSize = U32> + Clone,
R: SeedableRng + CryptoRng + RngCore + Clone,
R::Seed: From<GenericArray<u8, U32>>,
Implements a prover transcript for a 32-byte hash with a rng that takes a 32-byte seed.
type Rng = R
The type of Rng the transcript generates.
pub fn gen_rng<SysRng: CryptoRng + RngCore>(
&self,
sigma: &S,
witness: &S::Witness,
in_rng: Option<&mut SysRng>
) -> Self::Rng
[src]
&self,
sigma: &S,
witness: &S::Witness,
in_rng: Option<&mut SysRng>
) -> Self::Rng
impl<H, S: Sigma, R: Clone> Transcript<S> for HashTranscript<H, R> where
S::ChallengeLength: IsLessOrEqual<U32>,
<S::ChallengeLength as IsLessOrEqual<U32>>::Output: NonZero,
H: BlockInput<BlockSize = U64> + FixedOutput<OutputSize = U32> + Update + Default + Clone,
[src]
S::ChallengeLength: IsLessOrEqual<U32>,
<S::ChallengeLength as IsLessOrEqual<U32>>::Output: NonZero,
H: BlockInput<BlockSize = U64> + FixedOutput<OutputSize = U32> + Update + Default + Clone,
Implements a transcript for any hash that outputs 32 bytes but with a block size of 64 bytes (e.g. SHA256).
The implementation first tags the SHA256 instance with the Sigma protocol's name.
pub fn initialize(&mut self, sigma: &S)
[src]
pub fn add_statement(&mut self, sigma: &S, statement: &S::Statement)
[src]
pub fn get_challenge(
self,
sigma: &S,
announce: &S::Announcement
) -> GenericArray<u8, S::ChallengeLength>
[src]
self,
sigma: &S,
announce: &S::Announcement
) -> GenericArray<u8, S::ChallengeLength>
Auto Trait Implementations
impl<H, R> RefUnwindSafe for HashTranscript<H, R> where
H: RefUnwindSafe,
R: RefUnwindSafe,
[src]
H: RefUnwindSafe,
R: RefUnwindSafe,
impl<H, R> Send for HashTranscript<H, R> where
H: Send,
R: Send,
[src]
H: Send,
R: Send,
impl<H, R> Sync for HashTranscript<H, R> where
H: Sync,
R: Sync,
[src]
H: Sync,
R: Sync,
impl<H, R> Unpin for HashTranscript<H, R> where
H: Unpin,
R: Unpin,
[src]
H: Unpin,
R: Unpin,
impl<H, R> UnwindSafe for HashTranscript<H, R> where
H: UnwindSafe,
R: UnwindSafe,
[src]
H: UnwindSafe,
R: 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>,