密钥管理服务

Key Management Services

亚马逊密钥管理服务背后使用了哪些算法或加密方法?

我搜索了一下,但只找到配置相关信息,没有找到集成信息。

AWS KMS 在 Galois/Counter 模式 (GCM) 中使用高级加密标准 (AES) 算法,称为 AES-GCM 并将此算法与 256 位密钥(从 KMS document 复制)一起使用。

我会在这个答案的开头说,如果您真的有兴趣,KMS Cryptographic Details document 非常好而且很详细,我建议您阅读它。

有两种类型的 KMS 密钥,客户主密钥 (CMK) 和数据密钥 (DK)。客户主密钥永远不会离开 AWS 基础设施,它们是通过 API call. There's a caveat: they can be provided by AWS customers (aka you), via this and this API calls. Data keys are generated via API call 生成的。 API returns 既是 "plain" 又是密钥的加密版本。此加密是使用 CMK 完成的。

KMS 根据 developer guide.

仅使用对称加密

所以,为了回答您的问题(KMS 使用什么算法),请看一下这张图(摘自 here):

图片底部的加密算法是用来加密DK的算法。来自上面链接的加密详细信息文档:

AWS KMS uses configurable cryptographic algorithms so that the system can quickly migrate from one algorithm, or mode, to another. The initial default set of cryptographic algorithms has been selected from Federal Information Processing Standard (FIPS-approved algorithms) for their security properties and performance.

还有:

All symmetric key encrypt commands used within the HSA use the Advanced Encryption Standards (AES), in Galois Counter Mode (GCM) using 256-bit keys. The analogous calls to decrypt use the inverse function.

你生成DK后,自己加解密,用你想要的算法和标准(就是上图最上面的加密算法)。但是你今天唯一可以生成的 DK 类型是 AES,你只能选择你想要 128 位还是 256 位 (docs)。

为了完整起见,当您导入主密钥时,通常 wrap your key material 使用 RSA(2048 位)。