penumbra-zone / decaf377

decaf377 is a prime-order group designed for use in SNARKs over BLS12-377
https://protocol.penumbra.zone/main/crypto/decaf377.html
12 stars 12 forks source link

r1cs: add `EncodingVar` representing a compressed `ElementVar` #43

Closed redshiftzero closed 3 months ago

redshiftzero commented 1 year ago

After #42 we should add another type in the R1CS feature that represents the encoding of a decaf377 Element in circuit. This type will be called EncodingVar.

Internally, EncodingVar will hold a LazyElementVar created using LazyElementVar::new_from_encoding.

EncodingVar should be public, and used anywhere in the ElementVar API where the encoding is returned or taken as an argument, i.e. compression/decompression.

redshiftzero commented 3 months ago

circuits are final