← Glossaire · Identité et cryptographie KMS et HSM Key Management Service / Hardware Security Module
Identité et cryptographie · Avancé
Des services et boîtiers dédiés à garder les clés de chiffrement et à les utiliser sans jamais les exposer.
Comment ça marche Un HSM est un matériel inviolable qui stocke la clé racine. Un KMS (service cloud) gère des clés dérivées. Avec le chiffrement « enveloppe », une clé de données chiffre le contenu et est elle-même chiffrée par la clé du KMS ; on peut ainsi faire tourner les clés sans tout rechiffrer.
Root key
never leaves the AWS KMS HSMs
alias/app-donnees
KMS key in AWS KMS; never exported
wraps
Data key
one per object; plaintext used in memory only
wraps
Encrypt (write)
• GenerateDataKey on the KMS key → plaintext data key + encrypted copy • encrypt the object locally with the plaintext data key (AES-256-GCM) • erase the plaintext key from memory • store the ciphertext with the encrypted data key
Decrypt (read)
• read the encrypted data key stored with the object • Decrypt: the service unwraps it with the KMS key (access policy and audit log apply) • decrypt the object locally with the plaintext key, then erase it
STORED WITH THE OBJECT
ciphertext of the object
encrypted data key
KMS key id + encryption context
Never stored: the plaintext data key or the KMS key itself.
OBJECTS: 200,000
GENERATEDATAKEY CALLS
DECRYPT CALLS
TOTAL REQUESTS
Without caching
200,000
200,000
400,000
Cache 1 key per 100 objects
2,000
2,000
4,000 (−99.0%)
calls = N without caching; calls = ⌈N / R⌉ with caching, where N = objects written (each read once) and R = objects encrypted per cached data key. Caching cuts requests (quota and per-request price) but widens what one leaked key exposes.
ROTATION: every 365 days, key age 200 days
0 rotations so far → 1 key version (the old ones are kept to decrypt older data); next rotation in 165 days. Rotation changes the key material only: the key id stays, existing data is not re-encrypted.
Chiffrement « enveloppe » avec un service de gestion des clés
Root key
never leaves the AWS KMS HSMs
alias/app-donnees
KMS key in AWS KMS; never exported
wraps
Data key
one per object; plaintext used in memory only
wraps
Encrypt (write)
• GenerateDataKey on the KMS key → plaintext data key + encrypted copy • encrypt the object locally with the plaintext data key (AES-256-GCM) • erase the plaintext key from memory • store the ciphertext with the encrypted data key
Decrypt (read)
• read the encrypted data key stored with the object • Decrypt: the service unwraps it with the KMS key (access policy and audit log apply) • decrypt the object locally with the plaintext key, then erase it
STORED WITH THE OBJECT
ciphertext of the object
encrypted data key
KMS key id + encryption context
Never stored: the plaintext data key or the KMS key itself.
OBJECTS: 200,000
GENERATEDATAKEY CALLS
DECRYPT CALLS
TOTAL REQUESTS
Without caching
200,000
200,000
400,000
Cache 1 key per 100 objects
2,000
2,000
4,000 (−99.0%)
calls = N without caching; calls = ⌈N / R⌉ with caching, where N = objects written (each read once) and R = objects encrypted per cached data key. Caching cuts requests (quota and per-request price) but widens what one leaked key exposes.
ROTATION: every 365 days, key age 200 days
0 rotations so far → 1 key version (the old ones are kept to decrypt older data); next rotation in 165 days. Rotation changes the key material only: the key id stays, existing data is not re-encrypted.
Chiffrement « enveloppe » avec un service de gestion des clés
Qui l'utilise, et pourquoi Banques, fournisseurs cloud, toute donnée sensible ; souvent exigé pour les clients souverains.