Cameron Foreman,Richie Yeung,Alec Edgington,Florian J. Curchod
Abstract:We present Cryptomite, a Python library of randomness extractor implementations. The library offers a range of two-source, seeded and deterministic randomness extractors, together with parameter calculation modules, making it easy to use and suitable for a variety of applications. We also present theoretical results, including new extractor constructions and improvements to existing extractor parameters. The extractor implementations are efficient in practice and tolerate input sizes of up to $2^{40} > 10^{12}$ bits. They are also numerically precise (implementing convolutions using the Number Theoretic Transform to avoid floating point arithmetic), making them well suited to cryptography. The algorithms and parameter calculation are described in detail, including illustrative code examples and performance benchmarking.
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to design and implement an efficient, easy - to - use and flexible randomness extractor library to meet the randomness requirements in various application scenarios. Specifically, the paper addresses the following key issues:
1. **Selecting appropriate randomness extractors and their parameters**: In practical applications, selecting randomness extractors and their parameters suitable for specific tasks is a major challenge. The authors developed the Cryptomite library, which provides a series of advanced randomness extractors and simplifies the selection and use process for users.
2. **Improving the efficiency and precision of randomness extractors**: Many existing randomness extractors can only be used for theoretical analysis or are inefficient in practical applications. The Cryptomite library improves computational efficiency by optimizing algorithms (such as using the number - theoretic transform (NTT) instead of the fast Fourier transform (FFT)), while avoiding the numerical imprecision problems caused by floating - point operations.
3. **Supporting multiple types of randomness extractors**:
- **Deterministic extractors**: Only handle weakly random inputs.
- **Seeded extractors**: Require an additional independent random seed.
- **Multi - source extractors**: Require multiple independent weakly random sources.
4. **Ensuring security**: In particular, in a quantum - adversarial environment, some randomness extractors may fail. The Cryptomite library provides quantum - secure extractor constructions, such as the new Circulant extractor, which ensures effectiveness under quantum attacks.
5. **Adapting to different application scenarios**: Including but not limited to privacy amplification, quantum key distribution (QKD), random number generation (RNG), etc. The Cryptomite library helps users select the most appropriate extractor according to specific requirements by providing detailed parameter calculation modules and code examples.
### Specific contributions of the paper
1. **Efficient implementation of the two - source Dodis et al. extractor**: Based on existing work, a two - source Dodis et al. extractor with quasi - linear time complexity \(O(n \log n)\) is implemented.
2. **Construction of a new seeded Circulant extractor**: This is an extended Dodis et al. extractor with direct quantum security, and compared with the Toeplitz extractor, it only requires a seed with the same length as the weak input while maintaining the same entropy loss and error.
3. **Efficient implementation of Toeplitz and Trevisan extractors**: Extractors with time complexities of \(O(n \log n)\) and \(O(n^{2}\log \log n)\) are implemented respectively. In addition, a deterministic Von Neumann extractor with a time complexity of \(O(n)\) is also implemented.
4. **Using the number - theoretic transform (NTT) to improve performance**: For Circulant, Dodis et al. and Toeplitz extractors, NTT is used to achieve higher throughput, especially excellent performance for large input lengths.
5. **Collating and improving existing results**: The results in existing literature are aggregated in one place, providing techniques for obtaining optimal (approximate) perfect randomness under different adversarial models and experimental settings, and providing related parameter calculation tools.
In summary, this paper aims to provide a series of efficient, secure and easy - to - use randomness extractors through the Cryptomite library to meet the needs of different application scenarios.