Skip to main content

Cross-platform Python library for Post-Quantum Cryptography using precompiled PQClean binaries

Reason this release was yanked:

Disconnect between supported python versions and compiled binaries

Project description

QuantCrypt

Logo

PyPI - Python Version GitHub Actions Workflow Status codecov PyPI - Downloads

Quality Gate Status Security Rating Reliability Rating Maintainability Rating
Vulnerabilities Bugs Code Smells Lines of Code

Description

QuantCrypt is a cross-platform Python library for Post-Quantum Cryptography using precompiled PQClean binaries.
QuantCrypt contains only the strongest variants of the PQC algorithms from the NIST PQC standardization process as recommended by the CNSA advisory by NSA.

Motivation

Currently, there does not exist any pure-Python implementation of Post-Quantum Cryptographic algorithms, which requires Python developers to first discover where to get reliable C source code of PQC algorithms, then install the necessary C compilers on their system and then figure out how to use CFFI to compile and use the C code in their Python source code. Furthermore, those binaries would be only compatible with the platform that they were compiled on, making it very difficult to use separate platforms for development and deployment workflows, without having to recompile the C source code each time.

This library solves this problem by pre-compiling the C source code of PQC algorithms for Windows, Linux and Darwin platforms in GitHub Actions using CFFI, and it also provides a nice Python wrapper around the PQC binaries. Since I wanted this library to be all-encompassing, it also contains a lot of helper classes which one might need when working with Post-Quantum cryptography. This library places a lot of focus on Developer Experience, aiming to be powerful in features, yet easy and enjoyable to use, so it would just work for your project.

Security Statement

The PQC algorithms used in this library inherit their security from the PQClean project. You can read the security statement of the PQClean project from their SECURITY.md file. To report a security vulnerability for a PQC algorithm, please create an issue in the PQClean repository.

Quickstart

The full documentation of this library can be found in the Wiki.

Install

pip install quantcrypt

Import

from quantcrypt import (
    kem,     # Key Encapsulation Mechanism algos   - public-key cryptography
    dss,     # Digital Signature Scheme algos      - secret-key signatures
    cipher,  # The Krypton Cipher                  - symmetric cipher based on AES-256
    kdf,     # Argon2 helpers + KMAC-KDF           - key derivation functions
    errors,  # All errors QuantCrypt may raise     - also available from other modules
    utils    # Helper utilities from all modules   - gathered into one module
)

Credits

This library would be impossible without these essential dependencies:

  • PQClean - C source code of Post-Quantum Cryptography algorithms
  • Cryptodome - AES-256 and SHA3 implementation
  • Argon2-CFFI - Argon2 KDF implementation

I thank the creators and maintainers of these libraries for their hard work.

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

quantcrypt-0.3.3.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

quantcrypt-0.3.3-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file quantcrypt-0.3.3.tar.gz.

File metadata

  • Download URL: quantcrypt-0.3.3.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for quantcrypt-0.3.3.tar.gz
Algorithm Hash digest
SHA256 84d4c7f8c60941c56b637837b87a586cf7b9733e8fd21158f19079180b193a64
MD5 ea7d6228c8db3a38720ec4debe28f42a
BLAKE2b-256 12cef8abb7cbe1f47626718dcac3d0be322931c921f2c1c9f93df7a2d9bbf933

See more details on using hashes here.

File details

Details for the file quantcrypt-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: quantcrypt-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for quantcrypt-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5f01a46fa96e933d0fd028d289499bdde67098b820d3a4f51a554e38c9df7b38
MD5 e7028a0c19dd0d9456d8cf0232da3129
BLAKE2b-256 299a117bf1b3d75ad3b8c0de49b30d8aab39cb241d906298485590341c8df56f

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