Post-quantum keys in AWS KMS
Most of the public-key cryptography in use today, such as RSA and elliptic curve
cryptography (ECC), relies on mathematical problems that are computationally infeasible for
classical computers to solve. A sufficiently large, fault-tolerant quantum computer could
use Shor's algorithm
Post-quantum cryptography, also called quantum-resistant cryptography, uses algorithms
that are designed to remain secure against attacks from both classical and quantum
computers. The U.S. National Institute of Standards and Technology (NIST) began a public
standardization effort for these algorithms in 2016. In August 2024, NIST published its
first post-quantum cryptography standards. These include FIPS 203
-
ML-DSA keys in AWS KMS: choose these keys when you need post-quantum digital signatures.
-
ML-KEM keys in AWS KMS: choose these keys when you need post-quantum key establishment.
Post-quantum KMS keys protect the data and signatures that you use them for. To also protect the confidentiality of the requests and responses that you exchange with AWS KMS itself, use post-quantum TLS. For more information, see Using hybrid post-quantum TLS with AWS KMS.
ML-DSA keys in AWS KMS
AWS Key Management Service (AWS KMS) supports Module-Lattice Digital Signature Algorithm (ML-DSA) for
post-quantum cryptographic signatures. This implementation follows the FIPS 204 standard
AWS KMS supports asymmetric key signatures for messages up to 4 KB using the
RAW message type. For larger messages, you must externally compute the
64-byte message representation μ used in ML-DSA signing as defined in NIST FIPS 204
section 6.2. Use the EXTERNAL_MU message type in the AWS KMS Sign operation to specify this pre-processed
64-byte message. The signatures produced by the externally computed μ are the same as
the RAW ones when using the same message and private key. Note that this
signing is different from the "pre-hash" ML-DSA or HashML-DSA from section 5.4 of NIST
FIPS 204.
For more information about using ML-DSA and the EXTERNAL_MU message type, see ML-DSA key specs.
For an example of using ML-DSA and the EXTERNAL_MU message type, see Offline verification with ML-DSA key pairs.
ML-KEM keys in AWS KMS
AWS Key Management Service (AWS KMS) supports the Module-Lattice-Based Key Encapsulation Mechanism
(ML-KEM) for post-quantum key establishment. This implementation follows the FIPS 203 standard
Note
ML-KEM keys are not available in the China Regions.
The following workflow shows how two parties, Alice and Bob, establish a shared secret over an insecure channel using ML-KEM.
-
Alice calls CreateKey to create an asymmetric KMS key with a
KeyUsagevalue ofENCAPSULATE_DECAPSULATEand an ML-KEM key spec (ML_KEM_512,ML_KEM_768, orML_KEM_1024). -
Alice sends her public key to Bob over an insecure channel. Alternatively, Alice can authorize Bob to call GetPublicKey to download her public key.
Note
AWS KMS strongly recommends verifying that the public key you receive came from the expected party before using it to encapsulate a shared secret.
-
Bob calls Encapsulate with Alice's public key. AWS KMS generates a random 32-byte shared secret and its encapsulated (ciphertext) form. Bob keeps the shared secret and sends only the encapsulated form to Alice. Because encapsulation requires only the public key, Bob can also encapsulate the shared secret outside of AWS KMS with his own cryptographic library.
-
Alice calls Decapsulate with her KMS key and the encapsulated shared secret she received from Bob. AWS KMS uses the private key to recover the same 32-byte shared secret that Bob generated. The private key never leaves AWS KMS unencrypted. Alice and Bob now share a secret they can use to derive symmetric keys for encrypting data or for generating and verifying HMACs.
Unlike a key agreement mechanism such as Elliptic Curve Diffie-Hellman (ECDH), which derives a shared secret from a key contributed by each party, a key encapsulation mechanism generates the shared secret using only the recipient's public key. The shared secret that ML-KEM returns is cryptographically random and can be used directly as key material. It can also be processed using a key derivation function to produce multiple distinct keys and nonces.
Note
Post-Quantum Hybrid Public Key Encryption (PQ-HPKE), as described in the PQ-HPKE
draft
For more information about the ML-KEM key specs, see ML-KEM key specs.