Skip to content

Update PC::check_combinations to optional rng #96

Closed
@vlopes11

Description

@vlopes11

Summary

PC::check is implemented with optional rng:

poly-commit/src/lib.rs

Lines 225 to 233 in 9da67e2

fn check<'a>(
vk: &Self::VerifierKey,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
point: &'a P::Point,
values: impl IntoIterator<Item = F>,
proof: &Self::Proof,
challenge_generator: &mut ChallengeGenerator<F, S>,
rng: Option<&mut dyn RngCore>,
) -> Result<bool, Self::Error>

However, rng is mandatory for check_combinations

rng: &mut R,

Even tho PC::batch_check forwards that as optional

Some(rng),

Problem Definition

This creates downstream conflicts for types that comply with PC::check and will have the rng as optional. In case the user will not provide the rng, we can defer to

impl<R: RngCore> RngCore for OptionalRng<R> {

Proposal

Update PC::check_combinations and PC::batch_check to take the rng as optional


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions