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.2-cp313-cp313-win_amd64.whl (102.7 kB view details)

Uploaded CPython 3.13Windows x86-64

cryptomite-0.2.2-cp313-cp313-macosx_14_0_arm64.whl (97.1 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

cryptomite-0.2.2-cp313-cp313-macosx_13_0_x86_64.whl (101.5 kB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

cryptomite-0.2.2-cp312-cp312-win_amd64.whl (102.7 kB view details)

Uploaded CPython 3.12Windows x86-64

cryptomite-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cryptomite-0.2.2-cp312-cp312-macosx_14_0_arm64.whl (97.2 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

cryptomite-0.2.2-cp311-cp311-win_amd64.whl (101.9 kB view details)

Uploaded CPython 3.11Windows x86-64

cryptomite-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cryptomite-0.2.2-cp311-cp311-macosx_14_0_arm64.whl (96.5 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

cryptomite-0.2.2-cp310-cp310-win_amd64.whl (101.9 kB view details)

Uploaded CPython 3.10Windows x86-64

cryptomite-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cryptomite-0.2.2-cp310-cp310-macosx_14_0_arm64.whl (96.5 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

cryptomite-0.2.2-cp39-cp39-win_amd64.whl (101.2 kB view details)

Uploaded CPython 3.9Windows x86-64

cryptomite-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (125.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cryptomite-0.2.2-cp38-cp38-win_amd64.whl (101.8 kB view details)

Uploaded CPython 3.8Windows x86-64

cryptomite-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for cryptomite-0.2.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 28b47214569fb9c5301bff183509c530be24b3e1fd1ef2c336da215ae28cfe72
MD5 977363d807fb629ba21d7806246677ac
BLAKE2b-256 6ccc11745ee812edd1bced1b4a9b2738f194d2f2ba2b6a1a28ccbf732d9e7d6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9bb5f827fddaeff2628fe4649fde14f3a52eb758c1e1e57a8fdd08e26c7421f7
MD5 f258a98ff1ba30c9d435ca4ab24df8f6
BLAKE2b-256 6bb306c23b6d3a3c5b2a947fa233f3bfbef517efc00467fd0846735cfec96c6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 0f8e2b0e8252637e17acd920e2f14699f75106004bbc1853cfaf48a8b8095d20
MD5 c482af100bfac8c1b6298f1878f180d5
BLAKE2b-256 85bbb9fe15478a4e07c3854f84d4871f66d75cf69858329d33c2f187820ea55f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cryptomite-0.2.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c09979c3ea5bb863baf07f1852542488a63603d7246b7aaf0df77d1d1adb5986
MD5 03c5d43ff4cb263b8ba7a0f66fc5d97b
BLAKE2b-256 0331c41d27e7fe74f8cbeefeb963469389b28e5d35f43819c2b34a0153fba45d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 32e11a99cc4d41a2520b5f233f904bf2ae6ced81e61a2dc0bf872c8f28e79408
MD5 49f39cd6abc5a96210d9a86b1b34b2ab
BLAKE2b-256 d74e736fdd3b948e7c68fec5f6c5e33351bb56c44b1b86389915ac3e79f98455

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 363ec7f279ff559abeb80b9878d430e071e351465a31e3f9751e377ed443fff8
MD5 cbb72c4cabfceb8d5d56606ee04b9e58
BLAKE2b-256 3adc3cca4ee735321ca7a2aa8e09740d6d40824350b104a3c3327f2686310db2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cryptomite-0.2.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b4f8297941dc37c428e8540b5665d127ba431adc33ac639edc49c783100764b5
MD5 24dce5d36b1f2c74c93ce578ac84f394
BLAKE2b-256 a7511b41138ccb06fc074bb7ab2992e7d82de882eef04ab9ac6c7e71f432c8fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df8075bbebabd6207a7a8ebefcd7dfad9b1e4690c4ba249fc45426fbdb0235d4
MD5 77901f49a71f37ac4b4cb8ac95983866
BLAKE2b-256 535f0068ad771280fe03376821c3408b8029fa00de605f3e254dfd0d4e00736d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 32664d0f440cb40072d494a21072b84c31211eb5b136e0ae4e48ec98e4158b56
MD5 4c68d816927f305b922dc631a54344b4
BLAKE2b-256 e7db523a52ff7f505139c1f6309191cd60602054229b751200e92370d219c785

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cryptomite-0.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 914741ee8d16eea1a7ec91ffa3167f5ceceac4d84c2e72cec762ffb65a02445e
MD5 5874d611db310ef2ca44364d405f6836
BLAKE2b-256 184086648d3b9158663b1ed3c0746c1c1d2cc268f407a599c69af9f4986fe02e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7089bc1a772bf536cdc25cf55802c9411fcb9d3ff2f178a14e9b83399e40d360
MD5 8dbde2108d644bec2d67312a60923e4f
BLAKE2b-256 bc87948831f8dbd8b15bff4782e0401d35ff508ad478f9551f7d215527a0eaf0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6bef08bf507b4cf627e426f16624581e8fd43fd666068ce937e59ec29d52027e
MD5 967002918d0b394e264d93d6d1918455
BLAKE2b-256 4e6df64834a70a7564bf2a4f41b873554756a209a364e6767187496a44ecba3d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cryptomite-0.2.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 dc0b2c860894fe15ea862b2b1c6ac2f36c2d7db9f3c9b17ed6a5cbad4ef70864
MD5 9599aa29156ff8f6a30acfec80514a68
BLAKE2b-256 8c47e691e456a4f0ff9ab30069536a40e9d70311d6a774895ceeb40014cf752a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f62138750c3f71b166aead9210a44282a2d57c8cbf54e4edac6c02b50ee08384
MD5 75f071354a57c11823a41235c3b5744e
BLAKE2b-256 336d6951227314417c283730e620b5e6fedf26d08dbe4019001bb4bbcf81ae58

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cryptomite-0.2.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 136082ec81128a4043f5c97578260aa6cfcd06a12ba02837e57946d9bc4f96dc
MD5 148741675ed6ffc23db7968e63b311c4
BLAKE2b-256 08df320e4cf3c7db7474fb9a347711f738b312a4068285e8654639487c352ad7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cryptomite-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2385bedf365ac3123b2faa0530ef4bf848dab5c39c7a37224865fd384524c31d
MD5 dad02e2ed111011ac7f34ae66063789c
BLAKE2b-256 04c68645b2328bd53588c12c297e53d18d030e1c813a78e24ebfe99198f955d9

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