hyperledger-archives / ursa

Hyperledger Ursa (a shared cryptographic library) has moved to end-of-life status, with the components of Ursa still in use moved to their relevant Hyperledger projects (AnonCreds, Indy, Aries and Iroha).
https://wiki.hyperledger.org/display/ursa
Apache License 2.0
323 stars 142 forks source link

Update to use pairing_plus vs milagro #119

Closed mikelodder7 closed 4 years ago

mikelodder7 commented 4 years ago

Sorry, this looks like a BIG PR which it is, but the biggest change is switching from Apache Milagro which is no longer under development to pairing-plus. Because of this change, it touched 90% of the BBS+ code. This PR only touches the BBS+ code. I have not applied it to the rest of ZMix yet.

Using pairing-plus offers the following advantages:

1- It's under active development 2- It's slightly faster overall about 5-10% faster than milagro in every case. 3- It's significantly faster for HashToCurve, about 100X faster. 4- Built-in compression methods rather than manually doing it. 5- ABI agnostic, it runs the same speed on 64-bit and 32-bit. 6- Unified function names i.e. to_bytes_compressed_form everywhere vs just in BBS