Skip to main content

ReplayTranscript

Struct ReplayTranscript 

Source
pub struct ReplayTranscript<F> { /* private fields */ }
Expand description

ReplayTranscript is a convenience struct that generates specific values as challenges without running the actual hash function.

WARNING: This struct itself is insecure. The caller is responsible for checking the validity of the designated challenge values.

Trait Implementations§

Source§

impl<F: Clone> Clone for ReplayTranscript<F>

Source§

fn clone(&self) -> ReplayTranscript<F>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F: PrimeField, T: Transcript<F>> From<RecordingTranscript<F, T>> for ReplayTranscript<F>

Source§

fn from(value: RecordingTranscript<F, T>) -> Self

Converts to this type from the input type.
Source§

impl<F: PrimeField> Transcript<F> for ReplayTranscript<F>

Source§

type Config = Vec<F>

Transcript::Config is the configuration for the underlying hash function of the transcript.
Source§

type Gadget = ReplayTranscriptVar<F>

Transcript::Gadget is the in-circuit gadget corresponding to this widget.
Source§

fn new(cached_challenges: Self::Config) -> Self

Transcript::new creates a new transcript / sponge under the given configuration config.
Source§

fn add_field_elements(&mut self, _: &[F]) -> &mut Self

Transcript::add_field_elements absorbs a message input that is represented as field elements into the transcript / sponge.
Source§

fn get_field_elements(&mut self, num_elements: usize) -> Vec<F>

Transcript::get_field_elements squeezes num_elements field elements from the transcript / sponge.
Source§

fn new_with_pp_hash(config: Self::Config, pp_hash: F) -> Self

Transcript::new_with_pp_hash is a convenience method for creating a new transcript / sponge under the given configuration config and additionally absorbing a hash of the public parameters pp_hash.
Source§

fn add<A: Absorbable + ?Sized>(&mut self, input: &A) -> &mut Self

Transcript::add absorbs a message input that can be any type implementing the Absorbable trait into the transcript / sponge.
Source§

fn get_bits(&mut self, num_bits: usize) -> Vec<bool>

Transcript::get_bits squeezes num_bits bits from the transcript / sponge.
Source§

fn get_field_element(&mut self) -> F

Transcript::get_field_element squeezes a single field element from the transcript / sponge.
Source§

fn separate_domain(&self, domain: &[u8]) -> Self

Transcript::separate_domain creates a new transcript / sponge by applying domain separation using the provided domain byte sequence.
Source§

fn challenge_field_element(&mut self) -> F

Transcript::challenge_field_element squeezes a challenge from the transcript as a field element. Read more
Source§

fn challenge_bits(&mut self, num_bits: usize) -> Vec<bool>

Transcript::challenge_bits squeezes a challenge from the transcript as a bit vector. Read more
Source§

fn challenge_field_elements(&mut self, n: usize) -> Vec<F>

Transcript::challenge_field_elements squeezes n challenges from the transcript as field elements. Read more

Auto Trait Implementations§

§

impl<F> Freeze for ReplayTranscript<F>

§

impl<F> RefUnwindSafe for ReplayTranscript<F>
where F: RefUnwindSafe,

§

impl<F> Send for ReplayTranscript<F>
where F: Send,

§

impl<F> Sync for ReplayTranscript<F>
where F: Sync,

§

impl<F> Unpin for ReplayTranscript<F>
where F: Unpin,

§

impl<F> UnsafeUnpin for ReplayTranscript<F>

§

impl<F> UnwindSafe for ReplayTranscript<F>
where F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more