pub struct PcsProverTranscript {
pub fs_transcript: Blake3Transcript,
pub stream: Cursor<Vec<u8>>,
}Expand description
A transcript for Polynomial Commitment Scheme (PCS) operations. Manages both Fiat-Shamir transformations and serialization/deserialization of proof data.
Fields§
§fs_transcript: Blake3TranscriptHandles Fiat-Shamir transformations for non-interactive zero-knowledge proofs. Used to absorb field elements and generate cryptographic challenges.
stream: Cursor<Vec<u8>>Manages serialization and deserialization of proof data as a byte stream.
Implementations§
Source§impl PcsProverTranscript
impl PcsProverTranscript
pub fn new_from_commitment(comm: &ZipPlusCommitment) -> Self
pub fn new_from_commitments<'a>( comms: impl Iterator<Item = &'a ZipPlusCommitment>, ) -> Self
pub fn reserve_capacity(&mut self, additional_capacity: usize)
Sourcepub fn into_verification_transcript(self) -> PcsVerifierTranscript
pub fn into_verification_transcript(self) -> PcsVerifierTranscript
Transform the prover transcript into a verifier transcript by resetting the stream. Note that the commitment must be absorbed again into the verifier transcript. This would normally be done by the verifier, but this allows us more flexibility in how we use the transcript.
Sourcepub fn squeeze_challenge_idx(&mut self, cap: usize) -> usize
pub fn squeeze_challenge_idx(&mut self, cap: usize) -> usize
Generates a pseudorandom index based on the current transcript state. Used to create deterministic challenges for zero-knowledge protocols. Returns an index between 0 and cap-1.
pub fn write_field_elements<F>(&mut self, elems: &[F]) -> Result<(), ZipError>where
F: PrimeField,
F::Inner: Transcribable,
F::Modulus: Transcribable,
pub fn write<T: Transcribable>(&mut self, v: &T) -> Result<(), ZipError>
pub fn write_const_many<T: ConstTranscribable>( &mut self, vs: &[T], ) -> Result<(), ZipError>
pub fn write_const_many_iter<'a, T, I>( &mut self, vs: I, vs_len: usize, ) -> Result<(), ZipError>
pub fn write_merkle_proof( &mut self, proof: &MerkleProof, ) -> Result<(), ZipError>
Trait Implementations§
Source§impl Clone for PcsProverTranscript
impl Clone for PcsProverTranscript
Source§fn clone(&self) -> PcsProverTranscript
fn clone(&self) -> PcsProverTranscript
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PcsProverTranscript
impl RefUnwindSafe for PcsProverTranscript
impl Send for PcsProverTranscript
impl Sync for PcsProverTranscript
impl Unpin for PcsProverTranscript
impl UnsafeUnpin for PcsProverTranscript
impl UnwindSafe for PcsProverTranscript
Blanket Implementations§
§impl<T> AsMaybeUninit for T
impl<T> AsMaybeUninit for T
§type Uninit = MaybeUninit<T>
type Uninit = MaybeUninit<T>
§fn as_ref_uninit(&self) -> &<T as AsMaybeUninit>::Uninit
fn as_ref_uninit(&self) -> &<T as AsMaybeUninit>::Uninit
&self to its maybe-initialized equivalent.§unsafe fn as_mut_uninit(&mut self) -> &mut <T as AsMaybeUninit>::Uninit
unsafe fn as_mut_uninit(&mut self) -> &mut <T as AsMaybeUninit>::Uninit
&mut T to its maybe-initialized equivalent. Read more§unsafe fn raw_as_uninit<'a>(raw: *const T) -> &'a <T as AsMaybeUninit>::Uninit
unsafe fn raw_as_uninit<'a>(raw: *const T) -> &'a <T as AsMaybeUninit>::Uninit
§unsafe fn raw_mut_as_uninit<'a>(
raw: *mut T,
) -> &'a mut <T as AsMaybeUninit>::Uninit
unsafe fn raw_mut_as_uninit<'a>( raw: *mut T, ) -> &'a mut <T as AsMaybeUninit>::Uninit
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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