Skip to main content

Python wrapper around implementation of the Classic Mceliece cryptosystems

Project description

Python wrapper around implementation of the Classic McEliece cryptosystem.

To access the Python functions provided by mceliece, import the library (for, e.g., mceliece6960119):

from mceliece import mceliece6960119

To generate a key pair:

pk,sk = mceliece6960119.keypair()

To generate a ciphertext c encapsulating a randomly generated session key k:

c,k = mceliece6960119.enc(pk)

To recover a session key from a ciphertext:

k = mceliece6960119.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 mceliece
kem = mceliece.mceliece6960119
pk,sk = kem.keypair()
c,k = kem.enc(pk)
assert k == kem.dec(c,sk)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mceliece-20241009.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mceliece-20241009.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file mceliece-20241009.1.tar.gz.

File metadata

  • Download URL: mceliece-20241009.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mceliece-20241009.1.tar.gz
Algorithm Hash digest
SHA256 013fbe43d95c0eced26c1fb0f6c25d823e84ac963b25853680506118d33c5cbb
MD5 30eeef486dace3d940b5d79f7a8985bb
BLAKE2b-256 478d84cc40ff178668c0155aff8b1110d87ef594253d3bd17ed594b3dfd037b3

See more details on using hashes here.

File details

Details for the file mceliece-20241009.1-py3-none-any.whl.

File metadata

  • Download URL: mceliece-20241009.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mceliece-20241009.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e01262b4edab34344016367b4e4f444b26f0d0c3eda114fee7d6497449f378fc
MD5 64944dca67a245915cd26be556b2141f
BLAKE2b-256 9599ec72fd16da4d7314d9cb87a0096db876a60cc53017ff2dd031fd612d8776

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page