GR-NTRU
Research code for an NTRU-style encryption experiment over finite group algebra. Classical NTRU uses
Z[x]/(x^N - 1) ~= Z[C_N].
This package replaces the cyclic group C_N with a finite group G and
works in Z[G], with reductions modulo p and q. For noncommutative
groups it fixes a left-sided convention:
h = f^{-1} g mod q
e = p h r + m mod q
f e = p g r + f m mod q
After center lifting, multiplying by f^{-1} modulo p recovers m
when coefficients have not wrapped modulo q.
Status
This is research software, not production cryptography. The package is now pure Python and does not depend on SageMath. It includes direct finite-group arithmetic for cyclic, dihedral, and symmetric groups.
Optional FFT acceleration is used when compatible packages are installed:
fft-dihedral>=0.2.0accelerates dihedral multiplication and inversion over compatible prime fields.fft-symmetric>=0.2.0accelerates symmetric-group multiplication and inversion over prime fields with characteristicp > n.
Composite NTRU-style moduli such as q = 2048 still use the pure-Python
fallback path.
For dihedral groups, the fallback path also includes a faster inverse routine:
when FFTs are unavailable over a small prime field such as F_3, inversion is
reduced to a cyclic-polynomial inverse instead of a dense 2n x 2n linear
solve.
Install
From PyPI:
python -m pip install gr-ntru
From a checkout:
python -m pip install -e .
With optional FFT backends:
python -m pip install -e ".[fft]"
Run Experiments
From a checkout:
python run_gr_ntru.py
python run_gr_ntru.py --profile larger --seed 20260506 --skip-cyclic-check
python run_gr_ntru.py --profile fft --seed 20260506 --skip-cyclic-check
After editable install:
gr-ntru --profile larger --seed 20260506 --skip-cyclic-check
python -m gr_ntru.cli --group symmetric --n 5 --p 7 --q 4099 --d 15 --trials 5
Test
PYTHONPATH=src python -m unittest discover -s tests
Near-Term Research Directions
- Separate parameter sets from experiment dictionaries.
- Extend acceleration to
Z/2^k Zor add Hensel lifting for NTRU-likeq. - Decide whether a Rust crate should own fast arithmetic kernels while Python remains the research interface.
Metadata
Release files for gr-ntru 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gr_ntru-0.1.0.tar.gz | 15.0 kB | Without provenance | Details for gr_ntru-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gr_ntru-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for gr_ntru-0.1.0-py3-none-any.whl |
Total release size: 28.3 kB
Release files / gr_ntru-0.1.0.tar.gz
| Download URL | gr_ntru-0.1.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8db181c1c5a58867ed6ffe4e7638f7ab63572a03ee50822e6a5788988b68d7b5
|
|
BLAKE2b-256 checksum How to use checksums |
bb95fda9a953461a70a7450332711281bc244c96e41d9ea78d8cf8842dff878f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / gr_ntru-0.1.0-py3-none-any.whl
| Download URL | gr_ntru-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32738dd16056c59fbbcfcceac2770a3b2787d842b1bacb2cb6b9f9a6c235b20d
|
|
BLAKE2b-256 checksum How to use checksums |
427a3ebc05ce3e05b209552b45b85eb9ef2ce7f367dab9d2fcd8880bb8104609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for gr-ntru 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.