pub struct Transcript { /* private fields */ }Expand description
Incremental transcript. Clone yields an independent fork, so a caller can seed a base
transcript with the ssid and public parameters and fork it for every proof.
Implementations§
Source§impl Transcript
impl Transcript
Sourcepub fn new(domain: &str) -> Self
pub fn new(domain: &str) -> Self
Starts a transcript for domain, e.g. zk/sig (the version prefix is added here).
Sourcepub fn append(&mut self, label: &str, bytes: &[u8]) -> &mut Self
pub fn append(&mut self, label: &str, bytes: &[u8]) -> &mut Self
0x01 ‖ u32be(len(label)) ‖ label ‖ u64be(len(bytes)) ‖ bytes.
pub fn append_u64(&mut self, label: &str, v: u64) -> &mut Self
Sourcepub fn append_uint(
&mut self,
label: &str,
x: &BoxedUint,
len: usize,
) -> Result<&mut Self>
pub fn append_uint( &mut self, label: &str, x: &BoxedUint, len: usize, ) -> Result<&mut Self>
Big-endian, left-padded to len bytes; fails if the value does not fit.
Sourcepub fn append_residue(
&mut self,
label: &str,
m: &Modulus,
x: &Residue,
) -> Result<&mut Self>
pub fn append_residue( &mut self, label: &str, m: &Modulus, x: &Residue, ) -> Result<&mut Self>
Residue of m, encoded with the fixed width of the modulus.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Transcript
impl RefUnwindSafe for Transcript
impl Send for Transcript
impl Sync for Transcript
impl Unpin for Transcript
impl UnsafeUnpin for Transcript
impl UnwindSafe for Transcript
Blanket Implementations§
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
Mutably borrows from an owned value. Read more