quantcrypt


Namequantcrypt JSON
Version 0.4.2 PyPI version JSON
download
home_page
SummaryCross-platform Python library for Post-Quantum Cryptography using precompiled PQClean binaries
upload_time2024-02-05 09:01:49
maintainer
docs_urlNone
authorMattias Aabmets
requires_python>=3.12,<3.13
licenseMIT
keywords post-quantum crypto cryptography security pqclean
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # QuantCrypt

<img src="https://raw.githubusercontent.com/aabmets/quantcrypt/main/docs/images/quantcrypt-logo.jpg" alt="Logo" width="500">


[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/quantcrypt)](https://pypi.org/project/quantcrypt/)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/aabmets/quantcrypt/pypi_publish_pipeline.yaml)](https://github.com/aabmets/quantcrypt/actions/workflows/pypi_publish_pipeline.yaml)
[![codecov](https://codecov.io/gh/aabmets/quantcrypt/graph/badge.svg?token=jymcRynp2P)](https://codecov.io/gh/aabmets/quantcrypt)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/quantcrypt)](https://pypistats.org/packages/quantcrypt)


[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)<br/>
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=bugs)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)


### 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](https://csrc.nist.gov/projects/post-quantum-cryptography) as recommended by the [CNSA advisory by NSA](https://en.wikipedia.org/wiki/Commercial_National_Security_Algorithm_Suite).


### 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.


### Quickstart

The full documentation of this library can be found in the [Wiki](https://github.com/aabmets/quantcrypt/wiki).
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.


#### Install

```shell
pip install quantcrypt
```

#### Script Imports

```python
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
)
```

#### CLI Commands

The general functionality of this library is also available from the command-line, which you can access 
with the `qclib` command. Keep in mind that if you install QuantCrypt into a venv, you will need to activate 
the venv to access the CLI. QuantCrypt uses [Typer](https://typer.tiangolo.com/) internally to provide the CLI experience. 
You can use the `--help` option to learn more about each command and subcommand.

```shell
qclib --help
qclib --info
qclib --version

qclib keygen --help
qclib encrypt --help
qclib decrypt --help
qclib sign --help
qclib verify --help
qclib optimize --help
```

### Security Statement

The PQC algorithms used in this library inherit their security from the [PQClean](https://github.com/PQClean/PQClean) project. 
You can read the security statement of the PQClean project from their [SECURITY.md](https://github.com/PQClean/PQClean/blob/master/SECURITY.md) file. 
To report a security vulnerability for a PQC algorithm, please create an [issue](https://github.com/PQClean/PQClean/issues) in the PQClean repository.


### Credits

This library would be impossible without these essential dependencies:

* [PQClean](https://github.com/PQClean/PQClean) - C source code of Post-Quantum Cryptography algorithms
* [Cryptodome](https://pypi.org/project/pycryptodome/) - AES-256 and SHA3 implementation
* [Argon2-CFFI](https://pypi.org/project/argon2-cffi/) - Argon2 KDF implementation

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


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "quantcrypt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.12,<3.13",
    "maintainer_email": "",
    "keywords": "post-quantum,crypto,cryptography,security,pqclean",
    "author": "Mattias Aabmets",
    "author_email": "mattias.aabmets@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1f/c9/909021c48bdb533b17e2b8fb06e8accc7f3749c9d52092ede6e14a1e6ff2/quantcrypt-0.4.2.tar.gz",
    "platform": null,
    "description": "# QuantCrypt\n\n<img src=\"https://raw.githubusercontent.com/aabmets/quantcrypt/main/docs/images/quantcrypt-logo.jpg\" alt=\"Logo\" width=\"500\">\n\n\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/quantcrypt)](https://pypi.org/project/quantcrypt/)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/aabmets/quantcrypt/pypi_publish_pipeline.yaml)](https://github.com/aabmets/quantcrypt/actions/workflows/pypi_publish_pipeline.yaml)\n[![codecov](https://codecov.io/gh/aabmets/quantcrypt/graph/badge.svg?token=jymcRynp2P)](https://codecov.io/gh/aabmets/quantcrypt)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/quantcrypt)](https://pypistats.org/packages/quantcrypt)\n\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)<br/>\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=bugs)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=aabmets_quantcrypt&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=aabmets_quantcrypt)\n\n\n### Description\n\nQuantCrypt is a cross-platform Python library for Post-Quantum Cryptography using precompiled PQClean binaries.  \nQuantCrypt contains only the **strongest** variants of the PQC algorithms from the [NIST PQC standardization process](https://csrc.nist.gov/projects/post-quantum-cryptography) as recommended by the [CNSA advisory by NSA](https://en.wikipedia.org/wiki/Commercial_National_Security_Algorithm_Suite).\n\n\n### Motivation\n\nCurrently, there does not exist any pure-Python implementation of Post-Quantum Cryptographic algorithms, \nwhich requires Python developers to first discover where to get reliable C source code of PQC algorithms, \nthen install the necessary C compilers on their system and then figure out how to use CFFI to compile and \nuse the C code in their Python source code. Furthermore, those binaries would be only compatible with the \nplatform that they were compiled on, making it very difficult to use separate platforms for development \nand deployment workflows, without having to recompile the C source code each time.\n\nThis library solves this problem by pre-compiling the C source code of PQC algorithms for Windows, Linux and \nDarwin platforms in GitHub Actions using CFFI, and it also provides a nice Python wrapper around the PQC binaries. \nSince I wanted this library to be all-encompassing, it also contains a lot of helper classes which one might need \nwhen working with Post-Quantum cryptography. This library places a lot of focus on Developer Experience, aiming \nto be powerful in features, yet easy and enjoyable to use, so it would _just work_ for your project.\n\n\n### Quickstart\n\nThe full documentation of this library can be found in the [Wiki](https://github.com/aabmets/quantcrypt/wiki).\nBecause this library is rich in docstrings which provide detailed insight into the library's behavior, \nit is suggested to use an IDE which supports autocomplete and intellisense when working with this library.\n\n\n#### Install\n\n```shell\npip install quantcrypt\n```\n\n#### Script Imports\n\n```python\nfrom quantcrypt import (\n    kem,     # Key Encapsulation Mechanism algos   - public-key cryptography\n    dss,     # Digital Signature Scheme algos      - secret-key signatures\n    cipher,  # The Krypton Cipher                  - symmetric cipher based on AES-256\n    kdf,     # Argon2 helpers + KMAC-KDF           - key derivation functions\n    errors,  # All errors QuantCrypt may raise     - also available from other modules\n    utils    # Helper utilities from all modules   - gathered into one module\n)\n```\n\n#### CLI Commands\n\nThe general functionality of this library is also available from the command-line, which you can access \nwith the `qclib` command. Keep in mind that if you install QuantCrypt into a venv, you will need to activate \nthe venv to access the CLI. QuantCrypt uses [Typer](https://typer.tiangolo.com/) internally to provide the CLI experience. \nYou can use the `--help` option to learn more about each command and subcommand.\n\n```shell\nqclib --help\nqclib --info\nqclib --version\n\nqclib keygen --help\nqclib encrypt --help\nqclib decrypt --help\nqclib sign --help\nqclib verify --help\nqclib optimize --help\n```\n\n### Security Statement\n\nThe PQC algorithms used in this library inherit their security from the [PQClean](https://github.com/PQClean/PQClean) project. \nYou can read the security statement of the PQClean project from their [SECURITY.md](https://github.com/PQClean/PQClean/blob/master/SECURITY.md) file. \nTo report a security vulnerability for a PQC algorithm, please create an [issue](https://github.com/PQClean/PQClean/issues) in the PQClean repository.\n\n\n### Credits\n\nThis library would be impossible without these essential dependencies:\n\n* [PQClean](https://github.com/PQClean/PQClean) - C source code of Post-Quantum Cryptography algorithms\n* [Cryptodome](https://pypi.org/project/pycryptodome/) - AES-256 and SHA3 implementation\n* [Argon2-CFFI](https://pypi.org/project/argon2-cffi/) - Argon2 KDF implementation\n\nI thank the creators and maintainers of these libraries for their hard work.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Cross-platform Python library for Post-Quantum Cryptography using precompiled PQClean binaries",
    "version": "0.4.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/aabmets/quantcrypt/issues",
        "Documentation": "https://github.com/aabmets/quantcrypt/wiki",
        "Repository": "https://github.com/aabmets/quantcrypt"
    },
    "split_keywords": [
        "post-quantum",
        "crypto",
        "cryptography",
        "security",
        "pqclean"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4ab6b9cd2ef1cbd3166db05eafbdabaaea066f420354d72f26612c6629a42b2",
                "md5": "023f9b0b82a4ca2e9459cf5f538d1b16",
                "sha256": "2bad06f125a5736cfe576ddb5d591fef7d07e8f2d34cce059aec9edafaf95fe7"
            },
            "downloads": -1,
            "filename": "quantcrypt-0.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "023f9b0b82a4ca2e9459cf5f538d1b16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12,<3.13",
            "size": 1954392,
            "upload_time": "2024-02-05T09:01:47",
            "upload_time_iso_8601": "2024-02-05T09:01:47.577290Z",
            "url": "https://files.pythonhosted.org/packages/a4/ab/6b9cd2ef1cbd3166db05eafbdabaaea066f420354d72f26612c6629a42b2/quantcrypt-0.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1fc9909021c48bdb533b17e2b8fb06e8accc7f3749c9d52092ede6e14a1e6ff2",
                "md5": "f3abcc3230172e2761db236a036e33d7",
                "sha256": "466560b54e3b3f297e8fb3af859ed7db2430c74b3d112aab5becfc7b3a23b437"
            },
            "downloads": -1,
            "filename": "quantcrypt-0.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f3abcc3230172e2761db236a036e33d7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12,<3.13",
            "size": 1918103,
            "upload_time": "2024-02-05T09:01:49",
            "upload_time_iso_8601": "2024-02-05T09:01:49.295158Z",
            "url": "https://files.pythonhosted.org/packages/1f/c9/909021c48bdb533b17e2b8fb06e8accc7f3749c9d52092ede6e14a1e6ff2/quantcrypt-0.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 09:01:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aabmets",
    "github_project": "quantcrypt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "quantcrypt"
}
        
Elapsed time: 0.17445s