lib-q-ring 0.0.4

Shared ring arithmetic (R_q = Z_q[X]/(X^n+1)) for FIPS 204 lattice primitives
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# lib-q-ring

Portable negacyclic ring arithmetic for `R_q = Z_q[X]/(X^256 + 1)` with `q = 8_380_417` (FIPS 204 ML-DSA field). Shared by [**lib-q-ml-dsa**](../lib-q-ml-dsa), [**lib-q-lattice-zkp**](../lib-q-lattice-zkp), and related crates.

## Contents

- Montgomery / Barrett reduction and ML-DSA NTT (forward + inverse with Montgomery scaling)
- Polynomial types `Poly` / `NttPoly`, module vectors and matrices
- SHAKE128 matrix expansion (ExpandA-style) and FIPS 204 `SampleInBall` (SHAKE256)

## Features

- `default`: `alloc`
- `alloc`: enables `lib-q-sha3/alloc` for XOF buffering helpers

## Security

This crate is **research-grade** infrastructure: parameter sets and protocol security are not asserted here.