Skip to main content

Crate gr_ntru

Crate gr_ntru 

Source
Expand description

NTRU-style experiments over finite group algebras.

Classical NTRU works in Z[x] / (x^N - 1), which is the group algebra Z[C_N]. This crate replaces the cyclic group by an explicit finite group and runs the same left-sided NTRU-style construction over Z[G].

Structs§

BackendStats
Backend call counters from a run.
FiniteGroup
An explicit finite group with a fixed coefficient ordering.
GroupAlgebraNtru
NTRU-style experiment state over a group algebra.
Lcg
A deterministic pseudo-random generator used to keep examples reproducible without adding a dependency.
PrivateKey
A private key for the NTRU-style construction.
TrialResult
Result of one trial.
TrialSummary
Summary for repeated trials.

Enums§

GroupKind
Group families currently implemented by the crate.
NtruError
Errors returned by the research implementation.

Functions§

add_mod
Modular addition.
center_lift
Center lift one residue.
center_lift_vector
Center lift a vector.
cyclic_convolution_mod
Multiply in (Z/mZ)[x] / (x^n - 1).
cyclic_inverse_mod
Invert an element of (Z/mZ)[x] / (x^n - 1).
cyclic_involution
Apply x -> x^-1 in (Z/mZ)[x] / (x^n - 1).
dihedral_inverse_via_cyclic
Invert in a dihedral group algebra via a cyclic-ring inverse.
gcd
Greatest common divisor.
inv_mod
Multiplicative inverse modulo modulus.
is_prime
Return whether value is prime.
mul_mod
Modular multiplication.
pow_mod
Modular exponentiation.
signed_to_mod
Convert signed coefficients to canonical residues.
solve_modular_linear_system
Solve a modular linear system over Z/modulus Z using unit pivots.
sub_mod
Modular subtraction.
verify_cyclic_group_algebra_model
Check that Z[C_N] multiplication is cyclic polynomial multiplication.