Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Comments

Remove ctant witness inclusions for Pedersen Comm#41

Merged
CPerezz merged 1 commit intomasterfrom
remove_ctant_wit
Aug 17, 2020
Merged

Remove ctant witness inclusions for Pedersen Comm#41
CPerezz merged 1 commit intomasterfrom
remove_ctant_wit

Conversation

@CPerezz
Copy link
Contributor

@CPerezz CPerezz commented Aug 15, 2020

As mentioned in #38 That's actually a problem since we
define value and bid_value as constant witnesses
(constraint to a constant).
This means that we're harcoding these values in the
ProverKey & VerifierKey and therefore,
the circuit is not reusable.

Solved it by assigning a normal witness inclusion for these
values.

Closes #38

As mentioned in #38 That's actually a problem since we
define `value` and `bid_value` as constant witnesses
(constraint to a constant).
This means that we're harcoding these values in the
`ProverKey` & `VerifierKey` and therefore,
the circuit is not reusable.

Solved it by assigning a normal witness inclusion for these
values.

Closes #38
@CPerezz CPerezz added area:cryptography anything related to cryptographic primitives, hashing and ZKP type:refactor labels Aug 15, 2020
@CPerezz CPerezz requested a review from LukePearson1 August 15, 2020 09:10
@CPerezz CPerezz self-assigned this Aug 15, 2020
Copy link
Contributor

@LukePearson1 LukePearson1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. The prover and verifier key will no longer be concrete.

One thing that could be changed is to import EXTENDED_GENERATOR from JubJub and also define an extended GENERATOR_NUMS in JubJub. This way the from doesn't need to be computed at compile time.

As the suggested changes can both done in JubJub, thus addressed in another issue and PR combo - this PR can be merged.

@CPerezz
Copy link
Contributor Author

CPerezz commented Aug 17, 2020

This looks good to me. The prover and verifier key will no longer be concrete.

One thing that could be changed is to import EXTENDED_GENERATOR from JubJub and also define an extended GENERATOR_NUMS in JubJub. This way the from doesn't need to be computed at compile time.

As the suggested changes can both done in JubJub, thus addressed in another issue and PR combo - this PR can be merged.

  1. The import of GENERATOR_EXTENDED is a good idea, I'll open a followup issue for it.
  2. The Exteneded generators are already exported from jubjub. See: Implements #31 - Generators available as extended jubjub#34

@CPerezz CPerezz merged commit de7651e into master Aug 17, 2020
@CPerezz CPerezz deleted the remove_ctant_wit branch August 17, 2020 08:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area:cryptography anything related to cryptographic primitives, hashing and ZKP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove wrong constant witnesses added for the Pedersen Commitment check

2 participants