QSSL - Quantum-Safe Secure Layer
A patent-free post-quantum TLS implementation using SPHINCS+ KEM instead of Kyber. Experimental implementation for research and testing quantum-safe protocols without patent concerns.
â ïļ Experimental Research Project
Version 0.2.0 - Now with patent-free SPHINCS+ KEM as default!
QSSL is a research project exploring post-quantum TLS without patent encumbrances:
- Patent-free by default: SPHINCS+ KEM avoids Kyber patent concerns
- Testing quantum-safe algorithms in real protocols
- Quantum-native design with traffic analysis resistance
- Educational and research purposes
For production quantum-safe TLS, consider contributing to rustls or waiting for official TLS PQC extensions.
ð§ Implementation Status
QSSL is actively under development as a research platform. Core cryptographic components are functional with ongoing experimentation.
What's Working
- â Patent-Free SPHINCS+ KEM: Primary key exchange using SPHINCS+ signatures (no Kyber patents!)
- â Post-Quantum Certificates: Full X.509-like certificate support with Falcon-512/SPHINCS+
- â Quantum-Native Mode: Fixed-size frames with traffic analysis resistance
- â Digital Signatures: Falcon-512/1024 and SPHINCS+ implementation
- â Symmetric Encryption: AES-GCM and ChaCha20-Poly1305
- â Transport Layer: Record protocol with authenticated encryption
- â Handshake Protocol: Certificate exchange and key negotiation
- â Test Coverage: All 40 tests passing
In Progress
- ð Connection API: High-level connection management
- ð Session Resumption: 0-RTT support
- ð Integration Tests: End-to-end protocol testing
- ð Performance Optimization: Reducing handshake latency
TODO
- âģ Certificate Chains: Full CA chain validation
- âģ OCSP Stapling: Certificate revocation checking
- âģ Production Hardening: Security audit and fuzzing
Why QSSL Exists
While projects like rustls and OpenSSL are adding PQC support to existing TLS, QSSL explores:
- Patent-free approach: SPHINCS+ KEM avoids Kyber patent issues
- Clean-slate design: TLS reimagined for quantum threats
- Traffic analysis resistance: Fixed-size frames, dummy traffic, timing obfuscation
- Algorithm agility: Easy to swap/test different PQC algorithms
- Research platform: Test ideas too experimental for production TLS
Features
- Patent-Free Key Exchange: SPHINCS+ KEM (no Kyber patent concerns!)
- Legacy Kyber Support: Kyber (512/768/1024) for compatibility
- Post-Quantum Signatures: Falcon, Dilithium, SPHINCS+
- Hybrid Encryption: AES-GCM, ChaCha20-Poly1305
- Memory Safety: Written in Rust with automatic zeroization
- Async/Await: Built on Tokio for high performance
- Session Management: Resumption and 0-RTT support
Quick Start
Running the Echo Server Example
Terminal 1:
Terminal 2:
Using QSSL in Your Project
use ;
// Client
let conn = connect.await?;
conn.send.await?;
let response = conn.recv.await?;
// Server
let listener = bind.await?;
let = listener.accept.await?;
let conn = accept.await?;
Cipher Suites
| Suite | KEM | Signature | Cipher | Hash | Security | Patent-Free |
|---|---|---|---|---|---|---|
| 0x0010 | SPHINCS+ | Falcon512 | AES-128-GCM | SHA256 | 128-bit | â |
| 0x0011 | SPHINCS+ | Falcon512 | AES-256-GCM | SHA384 | 192-bit | â |
| 0x0012 | SPHINCS+ | Falcon1024 | AES-256-GCM | SHA512 | 256-bit | â |
| 0x0013 | SPHINCS+ | SPHINCS-256f | AES-256-GCM | SHA384 | 192-bit | â |
| 0x0014 | SPHINCS+ | Falcon512 | ChaCha20 | SHA384 | 192-bit | â |
| 0x0001 | Kyber512 | Falcon512 | AES-128-GCM | SHA256 | 128-bit | â ïļ |
| 0x0002 | Kyber768 | Falcon512 | AES-256-GCM | SHA384 | 192-bit | â ïļ |
| 0x0003 | Kyber1024 | Falcon1024 | AES-256-GCM | SHA512 | 256-bit | â ïļ |
Architecture
âââââââââââââââââââââââââââââââââââââââââââ
â Application Layer â
âââââââââââââââââââââââââââââââââââââââââââĪ
â QSSL Connection â
â (Handshake, State Machine, Context) â
âââââââââââââââââââââââââââââââââââââââââââĪ
â QSSL Transport â
â (Records, Encryption, Sequencing) â
âââââââââââââââââââââââââââââââââââââââââââĪ
â Post-Quantum Cryptography â
â (Kyber, Falcon, SPHINCS+, etc.) â
âââââââââââââââââââââââââââââââââââââââââââĪ
â Network (TCP/UDP) â
âââââââââââââââââââââââââââââââââââââââââââ
Implementation Status
Core Components â
- Protocol specification
- Handshake implementation
- Transport layer with encryption
- Session management
- Kyber KEM integration
- Falcon signature integration
- Symmetric encryption (AES-GCM, ChaCha20)
- Key derivation (HKDF)
In Progress ð§
- Certificate validation
- Full session resumption
- 0-RTT implementation
- Extension handling
- Alert protocol
Integration
- QSSH adapter created
- QNGINX bindings planned
- C FFI interface
- Python bindings
- WASM support
Building
# Build library
# Run tests
# Run benchmarks
# Build examples
Testing
The project includes comprehensive tests:
- Unit tests for all crypto operations
- Integration tests for handshake
- Session management tests
- Transport layer tests
Run all tests:
Run with logging:
RUST_LOG=debug
Performance
Benchmark results on Apple M1:
- Kyber768 key generation: ~50Ξs
- Kyber768 encapsulation: ~60Ξs
- Kyber768 decapsulation: ~70Ξs
- Falcon512 signing: ~200Ξs
- Falcon512 verification: ~80Ξs
- Full handshake: ~2ms
Security Considerations
- Post-Quantum Security: All algorithms are NIST-approved candidates
- Memory Safety: Rust prevents buffer overflows and use-after-free
- Zeroization: All sensitive data is zeroized on drop
- Forward Secrecy: Ephemeral keys for each session
- Replay Protection: Sequence numbers prevent replay attacks
Integration with Other Projects
QSSH Integration
QSSH can use QSSL as its transport layer:
use QsshTransport;
let transport = connect.await?;
// Use QSSL for quantum-safe SSH
QNGINX Integration
QNGINX can use QSSL for HTTPS:
server {
listen 443 qssl;
qssl_certificate cert.pem;
qssl_certificate_key key.pem;
qssl_ciphers QSSL_KYBER768_FALCON512_AES256_SHA384;
}
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Disclaimer
EXPERIMENTAL SOFTWARE - This is a research project, not production-ready software:
- No security audit has been performed
- Not suitable for protecting real data
- Use at your own risk
- For production TLS, use rustls or OpenSSL
License
This project is dual-licensed under MIT and Apache-2.0.
Acknowledgments
- Built on top of the
pqcryptocrate family - Inspired by rustls and OpenSSL
- Part of the QuantumVerse Protocol Suite
Contact
- GitHub: https://github.com/QuantumVerseProtocols/qssl
- Issues: https://github.com/QuantumVerseProtocols/qssl/issues
QSSL - Securing communications for the quantum era