BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News AWS Key Management Service Now Supports ECDH for Secure Communications

AWS Key Management Service Now Supports ECDH for Secure Communications

This summer, AWS announced that the AWS Key Management Service (KMS) supports the Elliptic Curve Diffie-Hellman (ECDH) key agreement. The security team at AWS recently showed how the new DeriveSharedSecret API enables the establishment of secure communication channels by using a derived shared secret.

ECDH is an anonymous key agreement protocol that allows two parties, each with an elliptic-curve public–private key pair, to establish a shared secret over an insecure channel. Patrick Palmer, principal security specialist solutions architect at AWS, Michael Miller, software development manager at AWS, and Raj Puttaiah, senior solutions architect at AWS, demonstrate how AWS KMS and OpenSSL can be used by two parties to derive a shared secret, and they explain:

With this new DeriveSharedSecret API action, customers can take an external party’s public key and, in combination with a private key that resides within AWS KMS, derive a shared secret which can be used to derive a symmetric encryption key with a key derivation function (KDF). Customers can then use this symmetric encryption key to encrypt data locally within their application.

To help developers simplify the choice of Key Derivation Function (KDF) to use with the secret, the AWS Encryption SDK now includes KMS ECDH keyrings—constructs that developers can implement within their code. According to AWS, ECDH key agreement can serve as an important building block for hybrid encryption schemes or for seeding a secret in remote devices and isolated compute environments, such as AWS Nitro Enclaves.

Source: AWS blog

While symmetric keys and algorithms are typically preferred for their speed and efficiency, they are not ideal when exchanging data over an untrusted network, as it is difficult to ensure that only the exchanging parties have access to the same key. Palmer, Miller, and Puttaiah add:

Asymmetric key pairs and algorithms help to solve this problem by allowing a public key to be shared over an untrusted network. And by using a key agreement scheme, two parties can use each other’s public key in combination with their own private key to each derive the same shared secret.

A long-standing request from the community, the support of ECDH is particularly useful for hybrid encryption schemes, or seeding a secret in remote devices and isolated compute environments. Christian Zemella, senior solutions architect at AWS, summarizes:

You can take another party’s public key and your own elliptic-curve KMS key that’s inside AWS Key Management Service (KMS) to derive a shared secret within the security boundary of FIPS 140-2 validated KMS hardware security module (HSM). This shared secret can then be used to derive a symmetric key to encrypt and decrypt data between the two parties using a symmetric encryption algorithm within your application.

The new API supports cross-account usage and is available in all AWS regions. To derive a shared secret, developers must specify a key agreement algorithm, the private key of the caller's asymmetric NIST-recommended elliptic curve, and the public key from the peer's NIST-recommended elliptic curve. The public key can be from another asymmetric KMS key pair or a key pair generated outside of AWS KMS, but both must be on the same elliptic curve.

Developers can audit their AWS KMS key usage, including the new DeriveSharedSecret API, through CloudTrail logs.

About the Author

Rate this Article

Adoption
Style

BT