An awesome extractor library
Project description
cryptomite
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:
@misc{foreman2024cryptomite,
title={Cryptomite: A versatile and user-friendly library of randomness extractors},
author={Cameron Foreman and Richie Yeung and Alec Edgington and Florian J. Curchod},
year={2024},
eprint={2402.09481},
archivePrefix={arXiv},
primaryClass={cs.CR}
}
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
Built Distributions
File details
Details for the file cryptomite-0.2.1-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 102.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e87cd3c96cff9f8c0738e38d7db7ec9ccbddfe5b10e2b27929583b73e2c0ec |
|
MD5 | 6a549cbc994b4c76383645169a4d9eb7 |
|
BLAKE2b-256 | ebdfa8d364204e59d55577776ecd42b8eb6d58042831ca65654399317275fdff |
File details
Details for the file cryptomite-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 123.4 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa2198ff6693af2ea7b983b935e8ab96252dbcb630cb1d9ab9b2c1dac0f06774 |
|
MD5 | 4085fb53f084ee655aa45795b6ea9a78 |
|
BLAKE2b-256 | f3a1b472b8d5ec6129d914759d43995070b4cc0bc32ac75e9b496422ef3f05ba |
File details
Details for the file cryptomite-0.2.1-cp312-cp312-macosx_14_0_arm64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 97.0 kB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a658345e497513de13e151032455644665b9c53e8c954b8a40151570c36967 |
|
MD5 | 5eced8f6068b22a39b079d4d692d099c |
|
BLAKE2b-256 | dfa10c6f52a3bc77088d6aee64d5a007b117e64da24f7441197e282f45a9a731 |
File details
Details for the file cryptomite-0.2.1-cp312-cp312-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp312-cp312-macosx_13_0_x86_64.whl
- Upload date:
- Size: 101.4 kB
- Tags: CPython 3.12, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 601163926e90e83b0771edfa777edc950d9ed83493289243895c8412de9dae35 |
|
MD5 | 33c37396400a5209f5d788dca28ada5f |
|
BLAKE2b-256 | bc535787baf1c6349479ecac30f246ad7b2ebf25c540cb204ff38e418962970d |
File details
Details for the file cryptomite-0.2.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 101.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeab04a31d54d15dddf9af8d053a1600099b5f57d8f80e7904b252ff8d5ac192 |
|
MD5 | 8483a507e2222fa3ca55bda9ffe15c7e |
|
BLAKE2b-256 | 9e741c60b707ecf3618103ca1a60761143b421578a117b3fa4854a55cef0619f |
File details
Details for the file cryptomite-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 124.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5de9a7082fb227e78101c5f1095b8463dc495e8ee5bed939898ddd4f160194a |
|
MD5 | 135381a2a617e50b833ea3925bb0a21b |
|
BLAKE2b-256 | d5270dbb865dfb6f0d1614961546631af6be2b14aca514efd0dfa722a6e277a2 |
File details
Details for the file cryptomite-0.2.1-cp311-cp311-macosx_14_0_arm64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp311-cp311-macosx_14_0_arm64.whl
- Upload date:
- Size: 96.4 kB
- Tags: CPython 3.11, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b681a34d73fd8ae824f243e2b0897309cd53311b913c41921930edb16047f49 |
|
MD5 | 131859a583d611de91917b7de7e8e34f |
|
BLAKE2b-256 | 90bb420d89af18a4bde0c95a4495b783337ea774a0ef83baa8e464c1bb68b08e |
File details
Details for the file cryptomite-0.2.1-cp311-cp311-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp311-cp311-macosx_13_0_x86_64.whl
- Upload date:
- Size: 100.6 kB
- Tags: CPython 3.11, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a28749fe49c4aaa9b21b4c95b1109258645bf21300f101177cd2e1933dc90547 |
|
MD5 | e9da7812ab524854f299b693b2ed656c |
|
BLAKE2b-256 | cfc37b4e59232233a12f7d01ddd31b3b760096b627ec765dd8823dab10e5dfea |
File details
Details for the file cryptomite-0.2.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 101.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2081ba8dbef889320f4ebec42e3f124bc78c51c485b5bd768e5e9c64921b79bd |
|
MD5 | 273c216c0057eb8af6507963ef73841b |
|
BLAKE2b-256 | 4b1fb9bacf0f8a7e02b6a5bd27de16348cd1f14e01c9e674fe1dc6cf60706756 |
File details
Details for the file cryptomite-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 124.1 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 688094a2e6776b7324588db6320f187c5fbd5e46853778622a78e843d36c0d80 |
|
MD5 | 677a2d27813a16c593f66a78fc80db2d |
|
BLAKE2b-256 | bc778e69e3d2a3caea66ce3a316cd9322922eaf167131f966eb60c56dfa96a75 |
File details
Details for the file cryptomite-0.2.1-cp310-cp310-macosx_14_0_arm64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp310-cp310-macosx_14_0_arm64.whl
- Upload date:
- Size: 96.4 kB
- Tags: CPython 3.10, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b79ed72904af6a4fcd85fafe65845ba3bc77bced2f1ffc6ac36775032b4ef71d |
|
MD5 | fc5fd814beea1cbdd72e4effb2651c63 |
|
BLAKE2b-256 | bb2b4634f1c254371c2bb341868b4b79392b467bdec285a41b99737a1dd1cf57 |
File details
Details for the file cryptomite-0.2.1-cp310-cp310-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp310-cp310-macosx_13_0_x86_64.whl
- Upload date:
- Size: 100.6 kB
- Tags: CPython 3.10, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e6dcff3b995e438010de68dc54da592d6ab167f3127ebae1d5fb17a41f44e09 |
|
MD5 | 064280b6fe4a1f1253d517fbe1eee70d |
|
BLAKE2b-256 | 56df9884a408aa5060a5641be8733d487463c1fcefb43e840a9e94379c163aa8 |
File details
Details for the file cryptomite-0.2.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 101.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84eb03f57a5498505deef5cc856cca4686d3c8eae6dfee4feaf159dbae219895 |
|
MD5 | 79d4d6b0f3f93b7e1f5e168299116b49 |
|
BLAKE2b-256 | e9c25ad3dac66f47890a6b5298775f58f87b0b6ccecc9ead6cc987b983ccc978 |
File details
Details for the file cryptomite-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 124.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d486b84702fe20f859058637db861163220eaed9a0897b1123a127d75144868d |
|
MD5 | e5e428a7109ebdda91d70679eac358df |
|
BLAKE2b-256 | ef782016d46d3b8302bf41d195ac1c70b4f1bd6edd21155f139731fb8a41fe8d |
File details
Details for the file cryptomite-0.2.1-cp39-cp39-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp39-cp39-macosx_13_0_x86_64.whl
- Upload date:
- Size: 100.7 kB
- Tags: CPython 3.9, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3103694f7bd3098eaf2b2e5042036ed8fb69b1b0217b3087046283b96de0170b |
|
MD5 | 07d6a7bd32d382adb7282ece79c65c1e |
|
BLAKE2b-256 | 9a1b4b57fe9dd5165a3826f5aba8c382e07481d1cb8e441cfd1c49e1728669fd |
File details
Details for the file cryptomite-0.2.1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 101.6 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b332217b58891e2e6a41d570049152e74db54311c4a54e5ae6cca8052059f438 |
|
MD5 | 0306255e340c11d93fc0b51a183c432b |
|
BLAKE2b-256 | afd81e2916a6268ff380e877c3e72fb4a541a522762ed190a6828089b768d78b |
File details
Details for the file cryptomite-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 124.5 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 204f2fbbcb88fb45704be86ce4771330dc8810ffe8f0573b388d5dd347586576 |
|
MD5 | 380b4ee62bc6bf56df5f9b8508cce87c |
|
BLAKE2b-256 | 5132e7ef5ed80fbb8e85c3e7950b357663bb2e53fa6ac776f0a4c4e7b2d53fba |
File details
Details for the file cryptomite-0.2.1-cp38-cp38-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: cryptomite-0.2.1-cp38-cp38-macosx_13_0_x86_64.whl
- Upload date:
- Size: 100.5 kB
- Tags: CPython 3.8, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 305de0d95b59b4aeef1b79bc123aefd5905c5c0de13293d1bcd981fea8485ebb |
|
MD5 | fd8a6b2b862acf1e4cbad807cda35af6 |
|
BLAKE2b-256 | 0d3f2fc0a5919e96dbfc9c29728fb4bd6d3cc50c4a16cc42ca46f82a310a3de3 |