#cryptography #plonk #zk-snarks #zero-knowledge #crypto


A collection of generic gadgets for the PLONK ZK-Proof algorithm

3 unstable releases

0.6.0 Jul 5, 2021
0.6.0-rc.0 Apr 30, 2021
0.5.0 Feb 12, 2021

#4 in #plonk

MPL-2.0 license

266 lines

Plonk Gadgets

Build Status Repository Documentation

This library cointains the gadgets that the Dusk-Network protocol needs to build it's ZK-Circuits. The library contains generic gadgets which are used across Dusk's tech stack, all of the other gadgets used which depend on foreign types are placed on the libraries where this types are defined.


This implementation is not audited. Use under your own responsability.


This library provides:

  • Scalar gadgets: is_non-zero, maybe_equals, conditionally_select_one, conditionally_select_zero.
  • Range gadgets: range_check, max_bound.


  • Conditional selection gadgets and AllocatedScalar structure have been taken from the ZCash sapling circuits and translated to the Plonk Constraint System language.


This code is licensed under Mozilla Public License Version 2.0 (MPL-2.0). Please see LICENSE for further info.


Implementation designed by the dusk team.


  • If you want to contribute to this repository/project please, check CONTRIBUTING.md
  • If you want to report a bug or request a new feature addition, please open an issue on this repository.


~64K SLoC