A library for quantum-resistant integer arithmetic developed by MIT. Provides ultra-fast and secure types for quantum operations.
$ dotnet add package QuantumIntegerQuantumInteger is a high-performance library designed for quantum-resistant integer arithmetic. Developed to bridge the gap between classical computing and post-quantum cryptography, it provides ultra-fast, secure types optimized for quantum-native operations.
Quantum-Native Types: Built-in support for specialized widths, including QInt33.
Installation Add the library to your project via the .NET CLI:
dotnet add package QuantumInteger
The following example demonstrates how to generate a 33-bit quantum key and perform secure string encryption. Usage example:
// 1. Prepare your data
string input = "My custom string!!!";
// 2. Generate a 33-bit quantum key from a secret
QInt33 key = QInt33Encryptor.KeyFromString("my secret key");
// 3. Encrypt data (Returns a Base64 encoded string)
string encrypted = QInt33Encryptor.Encrypt(input, key);
Console.WriteLine($"Encrypted: {encrypted}");
// 4. Decrypt data
string decrypted = QInt33Encryptor.Decrypt(encrypted, key);
Console.WriteLine($"Decrypted: {decrypted}");
Also hash calculation is supported.
string input = "My password.";
byte[] passwordHash = QInt33Encryptor.CalculateHash(Encoding.UTF8.GetBytes(input));
Note: the passwordHash will always has length of 32-bytes. It is resistant against GPU bruteforce attacks.
Contributions are welcome! Please feel free to submit a Pull Request.
Developed by Null Software