Algorithm Agility
QNSP is designed for algorithm agility to adapt to cryptographic advances.
Algorithm Agility
QNSP is designed for algorithm agility to adapt to cryptographic advances.
Why algorithm agility
- New attacks may weaken algorithms
- Standards evolve
- Compliance requirements change
- Quantum computing advances
Implementation
Algorithm identifiers
All cryptographic operations include algorithm ID:
{
"algorithm": "aes-256-gcm",
"keyId": "key-uuid"
}
Ciphertext format
Ciphertext includes metadata:
[version][algorithm][key-id][iv][ciphertext][tag]
Key metadata
Keys store algorithm information:
{
"keyId": "uuid",
"algorithm": "dilithium-3",
"parameters": {...}
}
Migration process
- Add support for new algorithm
- Generate new keys with new algorithm
- Re-encrypt/re-sign with new keys
- Deprecate old algorithm
- Remove old algorithm support
Supported algorithms
Current
- AES-256-GCM, ChaCha20-Poly1305
- Ed25519, Dilithium, Falcon
- X25519, Kyber
Deprecated
- Listed in
/changes/crypto-sunset.md
Configuration
Algorithm preferences configurable:
PREFERRED_SYMMETRIC=aes-256-gcm
PREFERRED_SIGNATURE=dilithium-3
PREFERRED_KEM=kyber-768