Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted Inner Product Based Range Proofs #21

Merged
merged 21 commits into from Jul 2, 2020
Merged

Conversation

suyash67
Copy link
Contributor

@suyash67 suyash67 commented Jun 29, 2020

Implementing range proofs with size 15% shorter than that of the original Bulletproofs protocol using weighted inner product argument introduced in Bulletproofs+ paper.

  • Write weighted inner product (wip) prover and verifier functions.

  • Fasten verification using multi-exponentiation in wip.

  • Scalar power and multiplication optimisations in wip.

  • Range proof using wip protocol and comparison with Bulletproofs.

  • Benchmark wip and the associated range proof.

@omershlo omershlo self-requested a review June 30, 2020 07:02
@omershlo omershlo added the enhancement New feature or request label Jun 30, 2020
hi_tag: &[GE],
g: &GE,
h: &GE,
P: &GE,
Copy link
Contributor

Choose a reason for hiding this comment

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

the prover is not using P explicitly, I wonder if we should input P to the prover and maybe sanity check the witness against it ?

Copy link
Contributor Author

@suyash67 suyash67 Jul 1, 2020

Choose a reason for hiding this comment

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

I think instead of passing P as a paramter to the prover function, it would be a better idea to let the prove function compute P using the witnesses. What do you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, make sense

use Errors::{self, RangeProofError};

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct RangeProofWIP {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider adding a statement struct that includes all the g_vec,h_vec,G,H etc... This way the verifier takes a proof and a statement and produce 0/1 .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. I have not added the ped_com (commitments to amounts) in the struct as they need to be generated only by prover using secrets. I hope that is okay.

Copy link
Contributor

Choose a reason for hiding this comment

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

What I am usually doing is defining a struct for Witness struct for Statement and struct for Proof.
prover gets as input Witness and Statement and output a Proof
verifier : is either a function of the Proof . Or gets Statement and Proof and outputs Result

@omershlo omershlo merged commit 4d2347a into ZenGo-X:master Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants