Skip to main content

An awesome extractor library

Project description

cryptomite

cryptomite is a modular, extensible high-level Python library for randomness extractions, created by Quantinuum's Quantum Cryptography team. At a high level, the library offers state-of-the-art randomness extractors that are easy to use, optimized and numerically precise providing a trade-off of features that suits numerous practical use cases today.

The performance critical parts of the library (e.g. NTT) are implemented in C++, but the rest of the library (e.g. parameter estimation) is implemented in Python for accessibility and ease of installation.

The package is available for Python 3.8 and higher on Mac, Windows and Linux. To install, type:

pip install cryptomite

Example Usage

from cryptomite.trevisan import Trevisan
from random import randint

n, m, max_eps = 1000, 200, 0.01

ext = Trevisan(n, m, max_eps)

input_bits = [randint(0, 1) for _ in range(n)]
seed_bits = [randint(0, 1) for _ in range(ext.ext.get_seed_length())]

output_bits = ext.extract(input_bits, seed_bits)

Documentation

To build the docs, run

cd docs
pip install -r requirements.txt
make clean
make html

Testing

Install pytest, then run pytest test.

To run the C++ tests, run

cmake .
make
test/runTest

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

cryptomite-0.1.2-cp312-cp312-win_amd64.whl (101.8 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

cryptomite-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (122.8 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

cryptomite-0.1.2-cp312-cp312-macosx_13_0_arm64.whl (97.2 kB view hashes)

Uploaded CPython 3.12 macOS 13.0+ ARM64

cryptomite-0.1.2-cp312-cp312-macosx_11_0_x86_64.whl (100.7 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ x86-64

cryptomite-0.1.2-cp311-cp311-win_amd64.whl (100.9 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

cryptomite-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (123.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

cryptomite-0.1.2-cp311-cp311-macosx_13_0_arm64.whl (96.3 kB view hashes)

Uploaded CPython 3.11 macOS 13.0+ ARM64

cryptomite-0.1.2-cp311-cp311-macosx_11_0_x86_64.whl (99.6 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ x86-64

cryptomite-0.1.2-cp310-cp310-win_amd64.whl (101.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

cryptomite-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (123.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cryptomite-0.1.2-cp310-cp310-macosx_13_0_arm64.whl (96.3 kB view hashes)

Uploaded CPython 3.10 macOS 13.0+ ARM64

cryptomite-0.1.2-cp310-cp310-macosx_11_0_x86_64.whl (99.6 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ x86-64

cryptomite-0.1.2-cp39-cp39-win_amd64.whl (100.2 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

cryptomite-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.0 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cryptomite-0.1.2-cp39-cp39-macosx_11_0_x86_64.whl (99.7 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ x86-64

cryptomite-0.1.2-cp38-cp38-win_amd64.whl (100.8 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

cryptomite-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (123.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cryptomite-0.1.2-cp38-cp38-macosx_11_0_x86_64.whl (99.7 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ x86-64

Supported by

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