Skip to content

Commit d578ff7

Browse files
committed
lint: move Transcript type definition to traits
1 parent 921d592 commit d578ff7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/traits.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ pub trait SigmaProtocol {
8383
fn instance_label(&self) -> impl AsRef<[u8]>;
8484
}
8585

86+
87+
type Transcript<P> = (
88+
<P as SigmaProtocol>::Commitment,
89+
<P as SigmaProtocol>::Challenge,
90+
<P as SigmaProtocol>::Response,
91+
);
92+
93+
8694
/// A trait defining the behavior of a Sigma protocol for which simulation of transcripts is necessary.
8795
///
8896
/// All Sigma protocols can technically simulate a valid transcript, but this mostly serve to prove the security of the protocol and is not used in the real protocol execution.
@@ -112,5 +120,5 @@ pub trait SigmaProtocolSimulator: SigmaProtocol {
112120
fn simulate_transcript<R: Rng + CryptoRng>(
113121
&self,
114122
rng: &mut R,
115-
) -> Result<(Self::Commitment, Self::Challenge, Self::Response), Error>;
123+
) -> Result<Transcript<Self>, Error>;
116124
}

0 commit comments

Comments
 (0)