1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) DUSK NETWORK. All rights reserved.
//! # Plonk Gadgets
//! 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.
//!
//!
//! ## WARNING
//! This implementation is not audited. Use under your own responsability.
//!
//! ## Content
//! This library provides:
//!
//! - Scalar gadgets: `is_non-zero`, `maybe_equals`, `conditionally_select_one`, `conditionally_select_zero`.
//! - Range gadgets: `range_check`, `max_bound`.
// We need to perform bitshifting sometimes.
// We have cases where we just have `Variables` which don't have any descriptive name.
extern crate alloc;
pub
pub use crateError;
pub use AllocatedScalar;
pub use range as RangeGadgets;
pub use scalar as ScalarGadgets;