lovesh / bulletproofs-amcl

Bulletproofs for a pairing friendly curve using milagro crypto
Apache License 2.0
2 stars 0 forks source link

Non power of 2 Inner-product argument #1

Open suyash67 opened 4 years ago

suyash67 commented 4 years ago

Hi @lovesh. Can you help me out in figuring out how to go about using inner product argument for input vectors of sizes other than powers of 2?

lovesh commented 4 years ago

Hi @suyash67, sorry for the delay. You can safely pad with 0s to make the vectors of size power of 2. That will increase the size of L and R by 1. The commitment P would not change since the elements of the vectors are either as exponents or part of inner product. Added a test showing this.

suyash67 commented 4 years ago

Hey! Thanks a lot for your response and help. I am working with a different elliptic curve group. I will try the approach you suggested. Hope it would work. Will let you know if I need any further assistance!

Thanks again,

Regards, Suyash Bagad,

On Tue, 4 Feb 2020 at 19:47, Lovesh Harchandani notifications@github.com wrote:

Hi @suyash67 https://github.com/suyash67, sorry for the delay. You can safely pad with 0s to make the vectors of size power of 2. That will increase the size of L and R by 1. The commitment P would not change since the elements of the vectors are either as exponents or part of inner product. Added a test https://github.com/lovesh/bulletproofs-amcl/blob/master/src/ipp.rs#L394 showing this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lovesh/bulletproofs-amcl/issues/1?email_source=notifications&email_token=AEVWN5NSB3FZSLWOFSJYF3DRBF2HNA5CNFSM4JZ3FT4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKXYXKI#issuecomment-581929897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVWN5OFMVIQIF3QDMWGFOLRBF2HNANCNFSM4JZ3FT4A .

lovesh commented 4 years ago

You are welcome. May I ask which curve you are using?

suyash67 commented 4 years ago

I am working with secp256k1 curve using KZen Network's elliptic curve cryptography package.

Regards, Suyash Bagad Final year Dual Degree Student, EE, IIT Bombay

On Wed, 5 Feb 2020, 9:27 pm Lovesh Harchandani, notifications@github.com wrote:

You are welcome. May I ask which curve you are using?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lovesh/bulletproofs-amcl/issues/1?email_source=notifications&email_token=AEVWN5J4PLGCAZFHEIJ3M53RBLOXNA5CNFSM4JZ3FT4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK36GYQ#issuecomment-582476642, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVWN5L2ZODBS7CZZ6SAAI3RBLOXNANCNFSM4JZ3FT4A .

lovesh commented 4 years ago

That seems nice. Btw, just wanted to make you aware that this wrapper can be used with secp curve by compiling with the secp256k1 feature. Check here for more curves https://github.com/lovesh/bulletproofs-amcl/blob/master/Cargo.toml#L22

suyash67 commented 4 years ago

That's great! Will try out.

Regards, Suyash Bagad Final year Dual Degree Student, EE, IIT Bombay

On Wed, 5 Feb 2020, 9:54 pm Lovesh Harchandani, notifications@github.com wrote:

That seems nice. Btw, just wanted to make you aware that this wrapper can be used with secp curve by compiling with the secp256k1 feature. Check here for more curves https://github.com/lovesh/bulletproofs-amcl/blob/master/Cargo.toml#L22

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lovesh/bulletproofs-amcl/issues/1?email_source=notifications&email_token=AEVWN5LGZF5U2M4YXYXDMCDRBLR5XA5CNFSM4JZ3FT4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK4BOQY#issuecomment-582489923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVWN5M3AD3DH5HFP7HR4ILRBLR5XANCNFSM4JZ3FT4A .