{"id":22882485,"url":"https://github.com/cqcl/cryptomite","last_synced_at":"2025-05-07T04:48:31.519Z","repository":{"id":182267530,"uuid":"613902942","full_name":"CQCL/cryptomite","owner":"CQCL","description":"Python library of efficient and numerically-precise randomness extractors","archived":false,"fork":false,"pushed_at":"2025-03-12T11:09:51.000Z","size":3968,"stargazers_count":28,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T04:48:24.822Z","etag":null,"topics":["cryptographic-algorithms","cryptography","ntt","privacy-amplification","quantum-cryptography","quantum-key-distribution","quantum-random-number-generator","random-number-generators","randomness-extraction","toeplitz-hash"],"latest_commit_sha":null,"homepage":"https://cqcl.github.io/cryptomite/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CQCL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-14T13:56:44.000Z","updated_at":"2025-05-03T09:54:13.000Z","dependencies_parsed_at":"2023-07-19T11:15:54.414Z","dependency_job_id":"17afc8da-3221-429a-b239-fa61d6ba518d","html_url":"https://github.com/CQCL/cryptomite","commit_stats":null,"previous_names":["cqcl/cryptomite"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fcryptomite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fcryptomite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fcryptomite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fcryptomite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CQCL","download_url":"https://codeload.github.com/CQCL/cryptomite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816522,"owners_count":21808702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptographic-algorithms","cryptography","ntt","privacy-amplification","quantum-cryptography","quantum-key-distribution","quantum-random-number-generator","random-number-generators","randomness-extraction","toeplitz-hash"],"created_at":"2024-12-13T18:17:54.448Z","updated_at":"2025-05-07T04:48:31.509Z","avatar_url":"https://github.com/CQCL.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cryptomite\n\n![Build Status](https://github.com/CQCL/cryptomite/actions/workflows/build_test.yml/badge.svg)\n[![PyPI version](https://img.shields.io/pypi/v/cryptomite)](//pypi.org/project/cryptomite)\n[![Downloads](https://static.pepy.tech/badge/cryptomite)](https://pepy.tech/project/cryptomite)\n[![Downloads](https://static.pepy.tech/badge/cryptomite/month)](https://pepy.tech/project/cryptomite)\n[![arXiv](https://img.shields.io/badge/arXiv-2402.09481-green)](//arxiv.org/abs/2402.09481)\n\n\n![image](https://github.com/CQCL/cryptomite/assets/13847804/671c8eec-0f2a-46b0-92ba-3a0c040492e8)\n\n`cryptomite` is a modular, extensible high-level Python library \nof randomness extractors, created by Quantinuum's Quantum Cryptography team. \nAt a high level, the library offers state-of-the-art randomness extractors that are easy to use, optimized for performance and numerically precise\nproviding a trade-off of features that suit numerous practical use cases. Find more information in our accompanying [paper](https://quantum-journal.org/papers/q-2025-01-08-1584/).\nFor additional examples of usage and guidance on getting started with Cryptomite, see our related [blog post](https://medium.com/quantinuum/introducing-cryptomite-randomness-extraction-simplified-857fc2f87673)\nand repository [documentation](https://cqcl.github.io/cryptomite/).\n\n\nThe library is available for non-commercial use only; see the [license](https://github.com/CQCL/cryptomite/blob/main/LICENSE) for details.\n\nThe 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.\n\nThe package is available for Python 3.8 and higher on Mac, Windows and Linux. To install, type:\n\n```bash \npip install cryptomite\n```\n\n\n\n## Example Usage\n\n```python\nfrom cryptomite.trevisan import Trevisan\nfrom random import randint\n\nn, m, max_eps = 1000, 200, 0.01\n\next = Trevisan(n, m, max_eps)\n\ninput_bits = [randint(0, 1) for _ in range(n)]\nseed_bits = [randint(0, 1) for _ in range(ext.ext.get_seed_length())]\n\noutput_bits = ext.extract(input_bits, seed_bits)\n```\n\n## Documentation\n\nTo build the docs, run\n\n```bash\ncd docs\npip install -r requirements.txt\nmake clean\nmake html\n```\n\n## Testing\n\nInstall `pytest`, then run `pytest test`.\n\nTo run the C++ tests, run\n\n```bash\ncmake .\nmake\ntest/runTest\n```\n\n## How to Cite\nIf you use `cryptomite` in your research, please cite the accompanying [paper](https://arxiv.org/abs/2402.09481):\n\n```\n@article{Foreman2025cryptomite,\n  doi = {10.22331/q-2025-01-08-1584},\n  url = {https://doi.org/10.22331/q-2025-01-08-1584},\n  title = {Cryptomite: {A} versatile and user-friendly library of randomness extractors},\n  author = {Foreman, Cameron and Yeung, Richie and Edgington, Alec and Curchod, Florian J.},\n  journal = {{Quantum}},\n  issn = {2521-327X},\n  publisher = {{Verein zur F{\\\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}},\n  volume = {9},\n  pages = {1584},\n  month = jan,\n  year = {2025}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcqcl%2Fcryptomite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcqcl%2Fcryptomite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcqcl%2Fcryptomite/lists"}