mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Restrict visibility of PLONK challenges to plonk module
This commit is contained in:
parent
7422efca72
commit
a63e6e25d8
3 changed files with 18 additions and 14 deletions
16
src/plonk.rs
16
src/plonk.rs
|
|
@ -93,20 +93,20 @@ impl<C: CurveAffine> VerifyingKey<C> {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub(crate) struct Beta;
|
||||
pub(crate) type ChallengeBeta<F> = ChallengeScalar<F, Beta>;
|
||||
struct Beta;
|
||||
type ChallengeBeta<F> = ChallengeScalar<F, Beta>;
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub(crate) struct Gamma;
|
||||
pub(crate) type ChallengeGamma<F> = ChallengeScalar<F, Gamma>;
|
||||
struct Gamma;
|
||||
type ChallengeGamma<F> = ChallengeScalar<F, Gamma>;
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub(crate) struct Y;
|
||||
pub(crate) type ChallengeY<F> = ChallengeScalar<F, Y>;
|
||||
struct Y;
|
||||
type ChallengeY<F> = ChallengeScalar<F, Y>;
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub(crate) struct X;
|
||||
pub(crate) type ChallengeX<F> = ChallengeScalar<F, X>;
|
||||
struct X;
|
||||
type ChallengeX<F> = ChallengeScalar<F, X>;
|
||||
|
||||
#[test]
|
||||
fn test_proving() {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,11 @@ pub(crate) struct Evaluated<C: CurveAffine> {
|
|||
}
|
||||
|
||||
impl Argument {
|
||||
pub(crate) fn commit<C: CurveAffine, HBase: Hasher<C::Base>, HScalar: Hasher<C::Scalar>>(
|
||||
pub(in crate::plonk) fn commit<
|
||||
C: CurveAffine,
|
||||
HBase: Hasher<C::Base>,
|
||||
HScalar: Hasher<C::Scalar>,
|
||||
>(
|
||||
params: &Params<C>,
|
||||
pk: &ProvingKey<C>,
|
||||
advice: &[Polynomial<C::Scalar, LagrangeCoeff>],
|
||||
|
|
@ -181,7 +185,7 @@ impl Argument {
|
|||
}
|
||||
|
||||
impl<C: CurveAffine> Committed<C> {
|
||||
pub(crate) fn construct<'a>(
|
||||
pub(in crate::plonk) fn construct<'a>(
|
||||
self,
|
||||
pk: &'a ProvingKey<C>,
|
||||
advice_cosets: &'a [Polynomial<C::Scalar, ExtendedLagrangeCoeff>],
|
||||
|
|
@ -295,7 +299,7 @@ impl<C: CurveAffine> super::ProvingKey<C> {
|
|||
}
|
||||
|
||||
impl<C: CurveAffine> Constructed<C> {
|
||||
pub(crate) fn evaluate<HBase: Hasher<C::Base>, HScalar: Hasher<C::Scalar>>(
|
||||
pub(in crate::plonk) fn evaluate<HBase: Hasher<C::Base>, HScalar: Hasher<C::Scalar>>(
|
||||
self,
|
||||
pk: &ProvingKey<C>,
|
||||
x: ChallengeX<C::Scalar>,
|
||||
|
|
@ -336,7 +340,7 @@ impl<C: CurveAffine> Constructed<C> {
|
|||
}
|
||||
|
||||
impl<C: CurveAffine> Evaluated<C> {
|
||||
pub fn open<'a>(
|
||||
pub(in crate::plonk) fn open<'a>(
|
||||
&'a self,
|
||||
pk: &'a ProvingKey<C>,
|
||||
x: ChallengeX<C::Scalar>,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ impl<C: CurveAffine> Proof<C> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn expressions<'a>(
|
||||
pub(in crate::plonk) fn expressions<'a>(
|
||||
&'a self,
|
||||
vk: &'a VerifyingKey<C>,
|
||||
advice_evals: &'a [C::Scalar],
|
||||
|
|
@ -109,7 +109,7 @@ impl<C: CurveAffine> Proof<C> {
|
|||
.chain(self.permutation_evals.iter().flat_map(|evals| evals.iter()))
|
||||
}
|
||||
|
||||
pub(crate) fn queries<'a>(
|
||||
pub(in crate::plonk) fn queries<'a>(
|
||||
&'a self,
|
||||
vk: &'a VerifyingKey<C>,
|
||||
x: ChallengeX<C::Scalar>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue