Course contentsShow
← Cloud and Infrastructure
Lesson 2293 of 2,98949. KMS and EncryptionFree lesson

Key Import and External Key Stores

Understand importing your own keys into cloud KMS and using external key managers for regulatory requirements.

Key Import and External Key Stores

What you'll learn: How to bring your own cryptographic keys into cloud KMS or maintain control by keeping keys outside the cloud provider entirely.


Why Import Your Own Keys?

By default, cloud KMS services generate keys within their own infrastructure. However, some organizations need to:

  • Meet regulatory requirements that mandate specific key generation processes or custody
  • Maintain existing keys created in on-premises HSMs without re-encrypting data
  • Retain full lifecycle control over key material for compliance auditing

Cloud providers support key import (also called BYOK - Bring Your Own Key) where you generate a key externally, wrap it securely, and upload it into the cloud KMS.

How Key Import Works

Think of it like putting your house key in a bank's safety deposit box. You created the key, but now the bank (cloud provider) stores and uses it on your behalf:

  1. Generate key material in your own HSM or secure environment
  2. Export and wrap the key using the cloud provider's public wrapping key
  3. Upload the encrypted key material to cloud KMS
  4. The cloud service unwraps it inside its HSM and manages operations

The key now behaves like cloud-native keys—you can encrypt, decrypt, and rotate—but you controlled its origin.

External Key Stores (EKS)

For even stricter control, external key stores keep your keys completely outside the cloud provider's infrastructure. The cloud service calls out to your external HSM or key manager (like an on-premises Vault cluster) for every cryptographic operation.

Trade-offs:

  • ✅ Ultimate control and regulatory compliance
  • ❌ Higher latency (network round-trip per operation)
  • ❌ Dependency on external system availability

Key Takeaway: Key import lets you bring externally-generated keys into cloud KMS while meeting compliance needs; external key stores keep keys entirely outside cloud infrastructure for maximum control at the cost of latency and complexity.