darkfi/zk/gadget/
mod.rs

1/* This file is part of DarkFi (https://dark.fi)
2 *
3 * Copyright (C) 2020-2026 Dyne.org foundation
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17 */
18
19/// Base field arithmetic gadget
20pub mod arithmetic;
21
22/// Small range check, 0..8 bits
23pub mod small_range_check;
24
25/// Field-native range check gadget with a lookup table
26pub mod native_range_check;
27
28/// Field-native less than comparison gadget with a lookup table
29pub mod less_than;
30
31/// is_zero comparison gadget
32pub mod is_zero;
33
34/// is_equal comparison gadget
35pub mod is_equal;
36
37/// Conditional selection
38pub mod cond_select;
39
40/// Conditional selection based on lhs (will output lhs if lhs==0, otherwise rhs)
41pub mod zero_cond;
42
43/// Poseidon-based sparse Merkle tree chip
44pub mod smt;