lovesh / bulletproofs-amcl

Bulletproofs for a pairing friendly curve using milagro crypto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non power of 2 Inner-product argument

suyash67 opened this issue · comments

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?

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.

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

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