Metadata-Version: 2.4
Name: ntruprime
Version: 20241021.5
Summary: Python wrapper around implementation of the Streamlined NTRU Prime cryptosystems
Author-email: Jan Mojžíš <jan.mojzis@gmail.com>
License: SPDX-License-Identifier: CC0-1.0 OR 0BSD OR MIT-0 OR MIT
        
        - [CC0-1.0](https://spdx.org/licenses/CC0-1.0.html)
        - [0BSD](https://spdx.org/licenses/0BSD.html)
        - [MIT-0](https://spdx.org/licenses/MIT-0.html)
        - [MIT](https://spdx.org/licenses/MIT.html)
        
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

Python wrapper around [ntruprime](https://libntruprime.cr.yp.to) library,
wrapper around 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)
