A powerful post-quantum cryptography encryption library combining CRYSTALS-Kyber768 with multi-layer symmetric encryption.
Originally developed for Bardo Notes for People (available on Google Play) and released in Bardo 1.1 Beta.
- CRYSTALS-Kyber768 KEM (NIST Post-Quantum Cryptography standard)
- Security Level 3 (192-bit equivalent)
- Quantum-computer resistant protection
- Forward secrecy through ephemeral Kyber keys
- AES-256-GCM (first layer)
- ChaCha20 (second layer)
- Enhanced Quantum Layer (16 rounds of SHA-512)
- Dynamic obfuscation
- HKDF-Extract with Kyber shared secret
- Multi-round hashing (3-5 rounds)
- PBKDF2 with 300,000 iterations
- Independent keys for each encryption layer
- Noise injection (10-15% of data size)
- Enhanced entropy from system parameters
- Timing attack protection (constant-time comparison)
- HMAC-SHA512 checksums
- Multiple key systems
- Decoy checksums for stealth
- v2.0 (current): CRYSTALS-Kyber768 + Enhanced protection
- v1.1 (legacy): Optimized quantum layer
- v1.0 (legacy): Full power mode
Add to your build.gradle.kts:
| Post-Quantum KEM | CRYSTALS-Kyber768 | N/A | NIST Level 3 (192-bit) |
| Symmetric Layer 1 | AES-256-GCM | 256 bits | 256-bit |
| Symmetric Layer 2 | ChaCha20 | 256 bits | 256-bit |
| Key Derivation | HKDF-SHA512 | N/A | 512-bit |
| Key Enhancement | PBKDF2-HMAC-SHA256 | 256 bits | 300k iterations |
| Quantum Layer | SHA-512 (16 rounds) | 512 bits | Quantum-resistant |
| Checksum | HMAC-SHA512 | 512 bits | 512-bit |
Protected Against:
- ✅ Quantum computer attacks (Shor's algorithm)
- ✅ Brute-force attacks
- ✅ Timing attacks (constant-time comparison)
- ✅ Side-channel attacks
- ✅ Known-plaintext attacks
- ✅ Chosen-plaintext attacks
- ✅ Man-in-the-middle attacks (forward secrecy)
Assumptions:
- Secure key storage (user's responsibility)
- Secure random number generation (system entropy)
- No malicious code execution environment
BardoQuant was originally developed for Bardo Notes for People, a secure note-taking application available on Google Play.
App Features:
- Post-quantum encryption for your notes
- Secure local storage
- Privacy-focused design
- No data collection
Download: Bardo Notes for People on Google Play
Version History:
- Bardo 1.1 Beta - BardoQuant v2.0 with Kyber768 released
Example test:
- Kotlin 1.9.20+
- Bouncy Castle 1.77+ (PQC provider)
- Gson 2.10.1+ (JSON serialization)
- Kotlinx Coroutines 1.7.3+ (optional, for async operations)
This project is licensed under the MIT License - see the LICENSE file for details.
Main Functions:
Result Types:
- Key Management: Always store encryption keys securely
- Production Use: Test thoroughly before production deployment
- Backward Compatibility: v2.0 can decrypt v1.0 and v1.1 encrypted data
- Performance: Quantum-resistant encryption is computationally intensive
- Updates: Keep dependencies updated for security patches
Typical performance on modern hardware:
| Key Generation | 10-50ms | Kyber768 keypair |
| Encryption (1KB) | 50-150ms | Full multi-layer |
| Decryption (1KB) | 50-150ms | Full verification |
| Encryption (1MB) | 500ms-2s | Scales with data size |
- Add support for stream encryption
- Implement key rotation mechanisms
- Add support for additional PQC algorithms
- Performance optimizations
- Hardware security module (HSM) integration
- Mobile-specific optimizations
Q: Is this library production-ready?
A: Yes, it has been used in production in Bardo Notes for People app.
Q: What is the performance impact?
A: Post-quantum encryption is more computationally intensive than traditional encryption. Expect 2-5x overhead compared to AES-only encryption.
Q: Can I use this with Android?
A: Yes! This library was originally designed for Android. Just ensure Bouncy Castle is properly configured.
Q: How do I migrate from v1.x?
A: v2.0 automatically detects and decrypts v1.0 and v1.1 formats. Simply decrypt old data and re-encrypt with v2.0.
Q: Is the encrypted data portable?
A: Yes, encrypted data is JSON-formatted and can be transferred between systems.
- NIST for standardizing post-quantum cryptography
- Bouncy Castle team for excellent cryptographic library
- The CRYSTALS-Kyber team for the KEM algorithm
- All contributors and users of Bardo Notes for People
For questions, issues, or collaboration opportunities:
- Email: [email protected]
Made with ❤️ by the BardoQuantum Security Team
Protecting your data in the post-quantum era.
.png)
