dalek-cryptography / bulletproofs

A pure-Rust implementation of Bulletproofs using Ristretto.
MIT License
1.02k stars 218 forks source link

Strip down allocation in serialization of R1CSProof #298

Closed AnthonyMikh closed 4 years ago

AnthonyMikh commented 5 years ago

This PR adds InnerProductProof::to_bytes_iter which similar to proof.to_bytes().into_iter(), but doesn't allocate, and uses it in serialization of R1CSProof.

Unresolved questions:

oleganza commented 4 years ago

LGTM, i'd only make it pub(crate) for now. In a separate PR we can roll out public to_bytes_iter() APIs for both IPP, R1CS and rangeproofs. Then we'll probably know how to better name all of them.