mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Remove transcript forking API.
This commit is contained in:
parent
f308eb969c
commit
e1a772d6e1
1 changed files with 0 additions and 17 deletions
|
|
@ -32,18 +32,11 @@ pub trait TranscriptRead<C: CurveAffine>: Transcript<C> {
|
||||||
/// Transcript view from the perspective of a prover that has access to an
|
/// Transcript view from the perspective of a prover that has access to an
|
||||||
/// output stream of messages from the prover to the verifier.
|
/// output stream of messages from the prover to the verifier.
|
||||||
pub trait TranscriptWrite<C: CurveAffine>: Transcript<C> {
|
pub trait TranscriptWrite<C: CurveAffine>: Transcript<C> {
|
||||||
/// Forked transcript that does not write to the proof structure.
|
|
||||||
type ForkedTranscript: TranscriptWrite<C>;
|
|
||||||
|
|
||||||
/// Write a curve point to the proof and the transcript.
|
/// Write a curve point to the proof and the transcript.
|
||||||
fn write_point(&mut self, point: C) -> io::Result<()>;
|
fn write_point(&mut self, point: C) -> io::Result<()>;
|
||||||
|
|
||||||
/// Write a scalar to the proof and the transcript.
|
/// Write a scalar to the proof and the transcript.
|
||||||
fn write_scalar(&mut self, scalar: C::Scalar) -> io::Result<()>;
|
fn write_scalar(&mut self, scalar: C::Scalar) -> io::Result<()>;
|
||||||
|
|
||||||
/// Fork the transcript, creating a variant of this `TranscriptWrite` which
|
|
||||||
/// does not output anything to the writer.
|
|
||||||
fn fork(&self) -> Self::ForkedTranscript;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This is just a simple (and completely broken) transcript reader
|
/// This is just a simple (and completely broken) transcript reader
|
||||||
|
|
@ -161,8 +154,6 @@ impl<W: Write, C: CurveAffine> DummyHashWrite<W, C> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<W: Write, C: CurveAffine> TranscriptWrite<C> for DummyHashWrite<W, C> {
|
impl<W: Write, C: CurveAffine> TranscriptWrite<C> for DummyHashWrite<W, C> {
|
||||||
type ForkedTranscript = DummyHashWrite<io::Sink, C>;
|
|
||||||
|
|
||||||
fn write_point(&mut self, point: C) -> io::Result<()> {
|
fn write_point(&mut self, point: C) -> io::Result<()> {
|
||||||
self.common_point(point)?;
|
self.common_point(point)?;
|
||||||
let compressed = point.to_bytes();
|
let compressed = point.to_bytes();
|
||||||
|
|
@ -175,14 +166,6 @@ impl<W: Write, C: CurveAffine> TranscriptWrite<C> for DummyHashWrite<W, C> {
|
||||||
let data = scalar.to_bytes();
|
let data = scalar.to_bytes();
|
||||||
self.writer.write_all(&data[..])
|
self.writer.write_all(&data[..])
|
||||||
}
|
}
|
||||||
fn fork(&self) -> Self::ForkedTranscript {
|
|
||||||
DummyHashWrite {
|
|
||||||
base_state: self.base_state,
|
|
||||||
scalar_state: self.scalar_state,
|
|
||||||
written_scalar: self.written_scalar,
|
|
||||||
writer: io::sink(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<W: Write, C: CurveAffine> Transcript<C> for DummyHashWrite<W, C> {
|
impl<W: Write, C: CurveAffine> Transcript<C> for DummyHashWrite<W, C> {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue