

# Amazon KMS condition keys for attested platforms
<a name="conditions-attestation"></a>

Amazon KMS provides condition keys to support cryptographic attestation for [Amazon Nitro Enclaves](https://docs.amazonaws.cn/enclaves/latest/user/) and NitroTPM. Amazon Nitro Enclaves is an Amazon EC2 capability that lets you create isolated compute environments called [enclaves](https://docs.amazonaws.cn/enclaves/latest/user/nitro-enclave-concepts.html#term-enclave) to protect and process highly sensitive data. NitroTPM extends similar attestation functionality to EC2 instances.

When you call the [Decrypt](https://docs.amazonaws.cn/kms/latest/APIReference/API_Decrypt.html), [DeriveSharedSecret](https://docs.amazonaws.cn/kms/latest/APIReference/API_DeriveSharedSecret), [GenerateDataKey](https://docs.amazonaws.cn/kms/latest/APIReference/API_GenerateDataKey.html), [GenerateDataKeyPair](https://docs.amazonaws.cn/kms/latest/APIReference/API_GenerateDataKeyPair.html), or [GenerateRandom](https://docs.amazonaws.cn/kms/latest/APIReference/API_GenerateRandom.html) API operations with a signed attestation document, these APIs encrypt the plaintext in the response under the public key from the attestation document, and return ciphertext instead of plaintext. This ciphertext can be decrypted only by using the private key in the enclave. For more information, see [Cryptographic attestation support in Amazon KMS](cryptographic-attestation.md).

**Note**  
If you don't provide a key policy when you create an Amazon KMS key, Amazon creates one for you. This [default key policy](key-policy-default.md) grants the Amazon Web Services accounts that own the KMS key full access to the key and allows the account to use IAM policies to allow access to the key. This policy allows all actions like [Decrypt](https://docs.amazonaws.cn/kms/latest/APIReference/API_Decrypt.html). Amazon recommends applying principal of [Least-privilege permissions](least-privilege.md) to your KMS key policies. You can also restrict access by [modifying the KMS key policy](key-policy-modifying.md) action for `kms:*` to `[NotAction:](https://docs.amazonaws.cn/IAM/latest/UserGuide/reference_policies_elements_notaction.html)kms:Decrypt`.

The following condition keys let you limit the permissions for these operations based on the contents of the signed attestation document. Before allowing an operation, Amazon KMS compares the attestation document to the values in these Amazon KMS condition keys.