Python wrapper around implementation of the Streamlined NTRU Prime cryptosystem.
To access the Python functions provided by ntruprime, import the library (for, e.g., sntrup1277):
from ntruprime import sntrup1277
To generate a key pair:
pk,sk = sntrup1277.keypair()
To generate a ciphertext c encapsulating a randomly generated session key k:
c,k = sntrup1277.enc(pk)
To recover a session key from a ciphertext:
k = sntrup1277.dec(c,sk)
As a larger example, the following test script creates a key pair, creates a ciphertext and session key, and then recovers the session key from the ciphertext:
import ntruprime
kem = ntruprime.sntrup1277
pk,sk = kem.keypair()
c,k = kem.enc(pk)
assert k == kem.dec(c,sk)
Metadata
Release files for ntruprime 20241021.4
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 |
|---|---|---|---|---|
| ntruprime-20241021.4.tar.gz | 6.6 kB | Without provenance | Details for ntruprime-20241021.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ntruprime-20241021.4-py3-none-any.whl | Python 3 | none | any | Details for ntruprime-20241021.4-py3-none-any.whl |
Total release size: 15.9 kB
Release files / ntruprime-20241021.4.tar.gz
| Download URL | ntruprime-20241021.4.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac03fe506f4c752fa7436a9fa6b05c555864313aaf60dff5b7ce9d642ed504be
|
|
BLAKE2b-256 checksum How to use checksums |
f8ab9de370fa8494b74767d6f9074445bf06d577716ffaa36be173103353919e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / ntruprime-20241021.4-py3-none-any.whl
| Download URL | ntruprime-20241021.4-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c933a43727c834ae3af5c3b5ee34f6949da474e109b51f6468337c3096c093ca
|
|
BLAKE2b-256 checksum How to use checksums |
101249366ac8a739464dc3a398c4d4278a7f4dae53e78e019a632fe5738444f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for ntruprime 20241021.4
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.