Skip to main content

class_groups/crypto_bigint/
mod.rs

1/// A signed integer type.
2///
3/// The `Choice` represents if the number is positive. The other term represents the absolute
4/// value of the number. When the number is zero, whether or not the number is considered positive
5/// is undefined.
6pub(super) type I<U> = (crypto_bigint::Choice, U);
7
8mod c;
9use c::c;
10
11mod reduction;
12pub(crate) use reduction::{partial_reduce, reduce};
13
14mod composition;
15pub(super) use composition::{add, double};
16
17mod element;
18pub use element::CryptoBigintElement;
19
20mod uint;
21#[cfg(feature = "alloc")]
22mod boxed_uint;
23
24mod encoding;
25#[cfg(feature = "std")]
26pub(crate) use encoding::{
27  encode_compressed_binary_quadratic_form, decode_compressed_binary_quadratic_form,
28};
29pub use encoding::Error;
30
31mod sqrt;
32#[cfg_attr(not(feature = "alloc"), expect(unused_imports))]
33pub(crate) use sqrt::{legendre_symbol, sqrt_mod_p_vartime};