Skip to content

Commit 90b7811

Browse files
committed
more cleanup
1 parent f495e1f commit 90b7811

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

src/ietf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub trait IetfSuite: Suite {}
1010

1111
impl<T> IetfSuite for T where T: Suite {}
1212

13-
/// VRF proof generic over the suite.
13+
/// IETF VRF proof.
1414
#[derive(Debug, Clone)]
1515
pub struct Proof<S: IetfSuite> {
1616
pub c: ScalarField<S>,

src/pedersen.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub trait PedersenSuite: IetfSuite {
3232
}
3333
}
3434

35+
/// Pedersen proof.
3536
#[derive(Debug, Clone, CanonicalSerialize, CanonicalDeserialize)]
3637
pub struct Proof<S: PedersenSuite> {
3738
pk_com: AffinePoint<S>,

src/ring.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,13 @@ pub type RingProver<S> = ring_proof::ring_prover::RingProver<BaseField<S>, Pcs<S
6868
pub type RingVerifier<S> =
6969
ring_proof::ring_verifier::RingVerifier<BaseField<S>, Pcs<S>, CurveConfig<S>>;
7070

71-
/// Actual ring proof.
71+
/// Raw ring proof.
72+
///
73+
/// This is the primitive ring proof used in conjunction with Pedersen proof to
74+
/// construct the actual ring vrf proof [`Proof`].
7275
pub type RingProof<S> = ring_proof::RingProof<BaseField<S>, Pcs<S>>;
7376

77+
/// Define type aliases for the given ring suite.
7478
#[macro_export]
7579
macro_rules! ring_suite_types {
7680
($suite:ident) => {
@@ -87,7 +91,9 @@ macro_rules! ring_suite_types {
8791
#[allow(dead_code)]
8892
pub type RingVerifier = $crate::ring::RingVerifier<$suite>;
8993
#[allow(dead_code)]
90-
pub type RingProof = $crate::ring::Proof<$suite>;
94+
pub type RingProof = $crate::ring::RingProof<$suite>;
95+
#[allow(dead_code)]
96+
pub type Proof = $crate::ring::Proof<$suite>;
9197
};
9298
}
9399

@@ -105,13 +111,14 @@ where
105111
pub ring_proof: RingProof<S>,
106112
}
107113

114+
/// Ring VRF prover.
108115
pub trait Prover<S: RingSuite>
109116
where
110117
BaseField<S>: ark_ff::PrimeField,
111118
CurveConfig<S>: TECurveConfig,
112119
AffinePoint<S>: TEMapping<CurveConfig<S>>,
113120
{
114-
/// Generate a proof for the given input/output and user additional data.
121+
/// Generate a proof for the given input/output and additional data.
115122
fn prove(
116123
&self,
117124
input: Input<S>,
@@ -145,6 +152,7 @@ where
145152
}
146153
}
147154

155+
/// Ring VRF verifier.
148156
pub trait Verifier<S: RingSuite>
149157
where
150158
BaseField<S>: ark_ff::PrimeField,

0 commit comments

Comments
 (0)