Package: quantcrypt
QuantCryptDescriptionQuantCrypt is a cross-platform Python library for Post-Quantum Cryptography using precompiled PQClean binaries.QuantCrypt contains only thestrongestvariants of the PQC algorithms from theNIST PQC standardization processas recommended by theCNSA advisory by NSA.MotivationCurrently, 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 wouldjust workfor your project.QuickstartThe full documentation of this library can be found in theWiki.
Because this library is rich in docstrings which provide detailed insight into the library's behavior,
it is suggested to use an IDE which supports autocomplete and intellisense when working with this library.InstallpipinstallquantcryptScript Importsfromquantcryptimport(kem,# Key Encapsulation Mechanism algos   - public-key cryptographydss,# Digital Signature Scheme algos      - secret-key signaturescipher,# The Krypton Cipher                  - symmetric cipher based on AES-256kdf,# Argon2 helpers + KMAC-KDF           - key derivation functionserrors,# All errors QuantCrypt may raise     - also available from other modulesutils# Helper utilities from all modules   - gathered into one module)CLI CommandsThe general functionality of this library is also available from the command-line, which you can access
with theqclibcommand. Keep in mind that if you install QuantCrypt into a venv, you will need to activate
the venv to access the CLI. QuantCrypt usesTyperinternally to provide the CLI experience.
You can use the--helpoption to learn more about each command and subcommand.qclib--help
qclib--info
qclib--version

qclibkeygen--help
qclibencrypt--help
qclibdecrypt--help
qclibsign--help
qclibverify--help
qcliboptimize--helpSecurity StatementThe PQC algorithms used in this library inherit their security from thePQCleanproject.
You can read the security statement of the PQClean project from theirSECURITY.mdfile.
To report a security vulnerability for a PQC algorithm, please create anissuein the PQClean repository.CreditsThis library would be impossible without these essential dependencies:PQClean- C source code of Post-Quantum Cryptography algorithmsCryptodome- AES-256 and SHA3 implementationArgon2-CFFI- Argon2 KDF implementationI thank the creators and maintainers of these libraries for their hard work.