Horizen Introduces Ginger-lib: A New zk-SNARK Library Widens the Zero-Knowledge Base


We are excited to announce that Horizen’s development contribution to zk-SNARKs, Ginger-lib, is now public! Ginger-lib is a new zk-SNARK library that enables developers to build scalable privacy solutions into their applications while maintaining the speed and security of the network.


What is Ginger-lib

Ginger-lib is a general-purpose toolkit to enable developers to implement zk-SNARKs supporting full recursive proof composition. Ginger in Italian is “Zenzero” and so it is an appropriate name for Horizen’s “Zen zero-knowledge” library, which is a  contribution to the global zk-SNARK movement. Ginger-lib, a fork of ZEXE, is not focused on Decentralized Private Computation (“DPC”) but on being a generic library that can be leveraged for different use cases. It introduces several new cryptographic primitives and gadgets that can be used by developers based on their needs.

Alberto Garoffolo, Horizen’s Director of R&D

We want people to use this technology to improve it together. Ginger-lib is designed to be a general-purpose library to allow developers to implement zero-knowledge applications meeting the requirements of their own use cases.”

Said Alberto Garoffolo, Horizen’s Director of R&D.

Let’s talk a little more technical details…

Some of the key additions to the library are the MNT4-753 and MNT6-753 elliptic curve cycles with all the fields, groups, primitives and gadgets necessary to implement recursive SNARKs. For example, Ginger-lib includes a specific implementation of the POSEIDON hash, the Schnorr signature, a VRF, and a Merkle tree implementation based on POSEIDON.

For all of these primitives, the Ginger-lib is shipped with the corresponding gadgets, which are the components for tailoring specific purpose circuits. For example, it includes a proof verifier gadget for proofs built on the MNT4 and MNT6 curves, a Merkle proof verifier gadget, a VRF output verifier gadget, and more. The library comes with several unit tests to improve implementation quality.

The release and utilization of Ginger-lib will contribute to the privacy-orientation of ZEN in addition to the many other cryptographic features the new library has to offer,” stated Uri Stav, Chief Security and Development Officer of Genesis, a leading digital asset trading and lending firm.

“In my opinion, the most interesting feature of Ginger-lib is Recursive Proof Composition (a proof that can verify other proofs). For cryptographers and engineers, this feature will allow one to verify the state of a sidechain or an entire mainchain in a fast, succinct and inexpensive way without needing to synchronize the entire chain history.” 

Horizen is releasing two other libraries with Ginger-lib that are part of their Sidechain development,  Zendoo, that diversifies the usage of Ginger-lib:

  • zendoo-sc-cryptolib offers sidechain support for POSEIDON hash computation, fast Merkle tree processing, and Sidechain Beta circuit proof generation. Zendoo-sc-cryptolib also contains a circuit for proving a threshold signature that will be used in the Horizen Sidechain Beta release to provide proof of a valid certificate to the mainchain. 
  • zendoo-mc-cryptolib makes available the Ginger-lib cryptographic primitives to mainchain core and allows mainchain nodes to validate certificate proofs to enable sidechain backward transfers.
Rob Viglione, Co-founder of Horizen

The release of our Ginger-lib is a monumental step for our team. We want to bring the world together through technology and creating this open-source library for developers is one step closer to actualizing that goal.”

Stated Rob Viglione, Co-founder and Team Lead of Horizen.

“The library is a fantastic way for developers around the world to engage with and utilize zero-knowledge cryptography. We hope they will use this library to improve the security of their systems” 

Ginger-lib is Horizen’s first original contribution to the zero-knowledge space. Horizen is releasing the original technical documentation explaining design choices and security implications for some of the gadgets and circuits included. After this release, the development of Ginger-lib will continue in public. 

Check out Ginger-lib on Github now!

The post Horizen Introduces Ginger-lib: A New zk-SNARK Library Widens the Zero-Knowledge Base appeared first on Horizen.

Disclaimer: The Information on this website is provided for education and informational purposes only, without any express or implied warranty of any kind. Anyone wishing to invest should seek his or her own independent financial or professional advice