Research code for NTRU-style encryption over finite group algebra.
Project description
NTRU Group Algebra
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 a checkout:
python -m pip install -e .
With optional FFT backends:
python -m pip install -e ".[fft]"
Run Experiments
From a checkout:
python NTRU_group_algebra.py
python NTRU_group_algebra.py --profile larger --seed 20260506 --skip-cyclic-check
python NTRU_group_algebra.py --profile fft --seed 20260506 --skip-cyclic-check
After editable install:
ntru-group-algebra --profile larger --seed 20260506 --skip-cyclic-check
python -m ntru_group_algebra.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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ntru_group_algebra-0.1.0.tar.gz.
File metadata
- Download URL: ntru_group_algebra-0.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a02b1329f8d86f4f98ec7b94e34ef1dbee92e3774aa4cba6b28cf1aba3d6f04
|
|
| MD5 |
d7f6102034f892d51527f8e83c7b45bf
|
|
| BLAKE2b-256 |
03edb7e2114289b66ce478d12f7a42f1982b77f19d50c98fb1ac05210cdc3e1d
|
File details
Details for the file ntru_group_algebra-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ntru_group_algebra-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4a25919de9c6d6e5bdfe6b49eb18e05f663b6b461521ee73c6b8a00b750ba52
|
|
| MD5 |
2acfe8088ed876fa46de215bf7195db0
|
|
| BLAKE2b-256 |
31b3a46b491b9a150656a84ee1e91976dc69dece1ebdbedd6f399b51470692b8
|