arkworks-rs / ripp

Argument systems for inner pairing products
https://eprint.iacr.org/2019/1177
Apache License 2.0
41 stars 15 forks source link

Extract out duplicated TIPA code into common functions #5

Open Pratyush opened 4 years ago

Pratyush commented 4 years ago

The problem with using TIPA black-box as I am right now is that it attempts to calculate the structured KZG polynomial commitment proof for both left and right. We would want to extract the polynomial commitment proving and verification code from the main prove and verify methods, so that they can be called separately for left and right.

Then to do TIPA for left and a structured scalar message for right, we can first run GIPA using a PlaceholderCommitment that has null commitment keys and null commitments. Then run the TIPA polynomial commitment code on just left.

I haven't made this change yet, but commenting here to make note of this as a possible plan forward.

_Originally posted by @nirvantyagi in https://github.com/scipr-lab/ripp/pull/3#discussion_r485342930_

nirvantyagi commented 3 years ago

This extraction has been done in https://github.com/arkworks-rs/ripp/commit/a3b6609ffeded167c70969aed1cf8a204358b027 and https://github.com/arkworks-rs/ripp/commit/daa6b41797827206abeb358d116b9dc8dab58330 .

But as currently implemented, the placeholder commitment which represents the scalar value, is empty, which means that the scalar value is not included in the challenge generation for GIPA.

https://github.com/arkworks-rs/ripp/blob/master/ip_proofs/src/tipa/structured_scalar_message.rs#L39

Originally, the placeholder commitment would return the scalar message to ensure it was included in the challenge. However, this makes the placeholder commitment non-doubly-homomorphic and so when extending the structured scalar message implementation to work without trusted setup (for the transparent polynomial implementation), this was removed.

https://github.com/arkworks-rs/ripp/commit/a3b6609ffeded167c70969aed1cf8a204358b027#diff-05adfa33df4f8d9ee9d41d9117b48ec51cc5f296bbe2bedb5070f4ed853bbaddR52