snarkvm_algorithms/polycommit/mod.rs
1// Copyright 2024-2025 Aleo Network Foundation
2// This file is part of the snarkVM library.
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at:
7
8// http://www.apache.org/licenses/LICENSE-2.0
9
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! A crate for polynomial commitment schemes.
17#![forbid(unsafe_code)]
18#![allow(clippy::module_inception)]
19#![allow(clippy::too_many_arguments)]
20#![allow(clippy::type_complexity)]
21
22/// The core [\[KZG10\]][kzg] construction.
23///
24/// [kzg]: http://cacr.uwaterloo.ca/techreports/2010/cacr2010-10.pdf
25pub mod kzg10;
26
27/// Polynomial commitment scheme based on the construction in [\[KZG10\]][kzg],
28/// modified to obtain batching and to enforce strict
29/// degree bounds by following the approach outlined in [[MBKM19,
30/// “Sonic”]][sonic] (more precisely, via the variant in [[Gabizon19,
31/// “AuroraLight”]][al] that avoids negative G1 powers).
32///
33/// [kzg]: http://cacr.uwaterloo.ca/techreports/2010/cacr2010-10.pdf
34/// [sonic]: https://eprint.iacr.org/2019/099
35/// [al]: https://eprint.iacr.org/2019/601
36pub mod sonic_pc;
37
38/// Errors pertaining to query sets.
39pub mod error;
40pub use error::*;
41
42/// A random number generator that bypasses some limitations of the Rust borrow
43/// checker.
44pub mod optional_rng;
45
46#[cfg(test)]
47pub mod test_templates;