Skip to main content

An awesome extractor library

Project description

cryptomite

Build Status PyPI version Downloads Downloads arXiv

image

cryptomite is a modular, extensible high-level Python library of randomness extractors, 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 for performance and numerically precise providing a trade-off of features that suit numerous practical use cases. Find more information in our accompanying paper. For additional examples of usage and guidance on getting started with Cryptomite, see our related blog post and repository documentation.

The library is available for non-commercial use only; see the license for details.

The performance-critical parts of the library (e.g. the number theoretic transform) are implemented in C++, while 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

How to Cite

If you use cryptomite in your research, please cite the accompanying paper:

@article{Foreman2025cryptomite,
  doi = {10.22331/q-2025-01-08-1584},
  url = {https://doi.org/10.22331/q-2025-01-08-1584},
  title = {Cryptomite: {A} versatile and user-friendly library of randomness extractors},
  author = {Foreman, Cameron and Yeung, Richie and Edgington, Alec and Curchod, Florian J.},
  journal = {{Quantum}},
  issn = {2521-327X},
  publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}},
  volume = {9},
  pages = {1584},
  month = jan,
  year = {2025}
}

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

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

cryptomite-0.2.3-cp313-cp313-win_amd64.whl (103.3 kB view details)

Uploaded CPython 3.13Windows x86-64

cryptomite-0.2.3-cp313-cp313-macosx_14_0_arm64.whl (97.7 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

cryptomite-0.2.3-cp313-cp313-macosx_13_0_x86_64.whl (102.1 kB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

cryptomite-0.2.3-cp312-cp312-win_amd64.whl (103.3 kB view details)

Uploaded CPython 3.12Windows x86-64

cryptomite-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cryptomite-0.2.3-cp312-cp312-macosx_14_0_arm64.whl (97.7 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

cryptomite-0.2.3-cp311-cp311-win_amd64.whl (102.4 kB view details)

Uploaded CPython 3.11Windows x86-64

cryptomite-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (125.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cryptomite-0.2.3-cp311-cp311-macosx_14_0_arm64.whl (97.0 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

cryptomite-0.2.3-cp310-cp310-win_amd64.whl (102.5 kB view details)

Uploaded CPython 3.10Windows x86-64

cryptomite-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (125.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cryptomite-0.2.3-cp310-cp310-macosx_14_0_arm64.whl (97.0 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

cryptomite-0.2.3-cp39-cp39-win_amd64.whl (101.8 kB view details)

Uploaded CPython 3.9Windows x86-64

cryptomite-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (125.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cryptomite-0.2.3-cp38-cp38-win_amd64.whl (102.4 kB view details)

Uploaded CPython 3.8Windows x86-64

cryptomite-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (125.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file cryptomite-0.2.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cryptomite-0.2.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 103.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cryptomite-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c35d02cbdb93abfb2308696c925803f549e0b43ac40169e8553047711e7a9006
MD5 1d3bb71b428a171f1f4a7b970ba28dd0
BLAKE2b-256 28f509a3057621e47705c8ef95af66291f11ea572ba87dc7013240c0452e953b

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5c7b4ca75967dc4411564dfca986d7d02d6bb53f569341e49c2791932c3b3f6d
MD5 8317c4976746acd591e5b52340a2e2eb
BLAKE2b-256 ae07bd60ec5d4ab00c469289a88ee0721a1dc7cf5d1daa89f10b2a6f1316246b

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 b87ba4940426f44a513a51901fdcc8d22277ce37dd2691a8c13c8ec4bc15fe6f
MD5 325c163f63c4d2a7547302608bc51161
BLAKE2b-256 c3a061772447ea42ba164430da618efa24fdbac891900f109b3a7f5f5d5bd1ef

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cryptomite-0.2.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 103.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cryptomite-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4290065fa24497cea21bde8ad1d26c00ccea2d5e58ca5b8703f513d56b1926c3
MD5 05b3737cd6f24801b8dae6eb830a2d10
BLAKE2b-256 256d4d9a7eec0f9e9102fe606c5a58dd18a424250af325c1c4804310b1e6de6f

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3b64de736e40231d596d6542cc6957b8c9d12d7ca4c49ae1adb5cc31b1fe6cfd
MD5 296b14498287d26f502dc173ff4e0c3c
BLAKE2b-256 f374594d27a2b31639d7d84532104c83745e882505dbba631a6fc2171ef6445f

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 bbd46428f749e5ed5e7bb39b14356d0a9d3271b93fb0d11ef520ee5035aabfad
MD5 f7b794f8d4cf26c98b8838ac2efce0cd
BLAKE2b-256 03d847f9d3a7093d82b25d28f8445f8e5b483506d3acdc6638d6646161b41b05

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cryptomite-0.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 102.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cryptomite-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3530f6030438482f9927856d296df7e5cd35298e58f53fff35c1b6262ddd1e49
MD5 10e3c888ae3a507a4661ad639f021467
BLAKE2b-256 2af64e6602597a65e4e76596eeb9e4cdccdcdde5ce1732e69a55278269318c32

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc4cb6fcf358f6429aa033aa9343b5b3799a11b0848fecf15911bf3c2d286333
MD5 c59d7430dd71796c1990e5c859d452a3
BLAKE2b-256 83ace5e8636f9007bf99322affe17e0a6d7504aa7b111b4842bc26cdbc3e22a3

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c3c001d2ad322257acb9f99bd8d0e1be10676dbd7542f1f78934615dcfd50050
MD5 90f4cd6fb037dbde259890f21ec76ed9
BLAKE2b-256 5b820961babd4bd453f41e3d38d245b5d07743d2adb1f7ed919310d449fbeb5a

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cryptomite-0.2.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 102.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cryptomite-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 23a8bd9c99c803c41b2ca677bc79a465411bc02330afd248b1045d341aff686c
MD5 0149bd80e6fc627f5fe1957dd32e981a
BLAKE2b-256 a1ba4c8523c2267b009c8e08f9df4328858b2e02b4d7f230330d4d9437f04a54

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c41aa1b28a93a3caffdf1dd4c10fc5b63935fd7861b8166ad262fddf981939fc
MD5 78248dcbcff832c8a62925710ad60f16
BLAKE2b-256 fe4e74ce7d6b0408ba5f9facf711f4173885d09e08e070b1d3f98c2f6fbfe86a

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b6d9576c867c3c4d32623f7ce9885abbd6c7100f62f7a35b4d4510a7356ec8e4
MD5 e87235446bd20d6ab144f0cbe231d07e
BLAKE2b-256 33334dee5f1122d351e1640726fb14e13622acfb02a70fed274afbd7e6ec6d93

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: cryptomite-0.2.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 101.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cryptomite-0.2.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b24defd0efe860b83976c2373af9e90d9048b599d437077354baf3df038cbc3b
MD5 a243420ba21fa5ac41d64dc19b57787a
BLAKE2b-256 10d8ca4682143c7b777773fb4e80f9594b04d40ca0244ad5a1476d25a854fba8

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3067631652c4b499625d75e5065c7ca4c05a9f73ef63128ea2405a01bcbf1537
MD5 de66cf94af67216ed9ef1d76f37256c0
BLAKE2b-256 5b3e3c606ba360204961aeb803cff0c4f4d72c427f007f93afb8d98308312b0a

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: cryptomite-0.2.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 102.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cryptomite-0.2.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 fd01ceb57ced80dd272282ac016e4efa6361f21212660d16ca21b53727c902c1
MD5 c71962ed803bed409b93678903017560
BLAKE2b-256 e6ef90a04e4065b1b5038b872352bdb8e949f1de8d1eae17f4f68fb47af93fce

See more details on using hashes here.

File details

Details for the file cryptomite-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cryptomite-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03a8ecc241e258276ee3afca7576ec861af65ca7085c3213984f9b7b2b1e0cec
MD5 69f82df637b54991f94e72c97cc3410a
BLAKE2b-256 b9eca55d63a802b57c72b969ad0f6dc8d6a19b964b7d08620a5637ebe1d8dbeb

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