AWS KMS 如何确定解密时使用哪个密钥?

xia*_*ing 5 security amazon-web-services aws-kms

我对如何aws-kms选择使用哪个密钥来解密 ciphertextblob感到困惑?

调用decrypt方法时,不提供密钥信息。

sud*_*udo 5

加密时,KMS 将 CMK 信息作为元数据存储在 ciphertextblob(CiphertextBlob:包含元数据的密文)中。因此,在调用解密时,KMS 知道要使用哪个 CMK。

更多详细信息请参见:https://d1.awsstatic.com/whitepapers/aws-kms-best-practices.pdf https://docs.aws.amazon.com/cli/latest/reference/kms/encrypt.html

  • 密文元数据的格式未公开定义。如果解密操作成功,结果将包括用于解密密文的 CMK 的 Arn。https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html#API_Decrypt_ResponseSyntax (2认同)