Bring Your Own Key (BYOK)
What is Bring Your Own Key (BYOK)?
Bring Your Own Key (BYOK)A key-management model where the customer generates or imports its own encryption keys into the cloud provider's KMS instead of relying on provider-generated keys.
BYOK lets the customer control the lifecycle of the master keys used to protect data in a cloud service, while the cloud provider still stores and operates them inside its KMS or HSM. The import follows a wrapping ceremony: the customer downloads a one-time RSA public wrapping key from the provider, uses it to encrypt (wrap) their key material inside their own HSM — typically with RSA-OAEP (AWS KMS, for example, supports RSAES_OAEP_SHA_256) — and uploads only the ciphertext, so the plaintext key never crosses the network. The customer can then rotate, disable, or schedule deletion of the key, giving a stronger audit trail and a fast path to revoke the provider's ability to decrypt.
The crucial limitation is trust boundary: once imported, the key lives in the provider's infrastructure, so BYOK does not cryptographically stop the provider (or a lawful-access order served on it) from using the key. Stronger models move the boundary outward:
flowchart LR
subgraph Customer
HSM[Customer HSM<br/>generates key] -->|RSA-OAEP wrap| W[Wrapped key blob]
end
W -->|import| KMS[Cloud KMS / HSM]
KMS -->|envelope-encrypt data| D[(Customer data at rest)]
subgraph HoldYourOwnKey
XKS[External key store<br/>stays on-prem] -. each decrypt call .- KMS
endWith HYOK / external key stores — AWS KMS External Key Store (XKS), Google Cloud External Key Manager (EKM), or an Azure Managed HSM under customer control — the key material never enters the cloud at all; every cryptographic operation calls back to the customer-controlled store, so revocation is instant and the provider can be cut off unilaterally. Provider HSMs backing these services are validated to FIPS 140-2 or FIPS 140-3 Level 3. Common BYOK implementations include AWS KMS imported key material, Azure Key Vault / Managed HSM BYOK, and Google Cloud Key Management import jobs.
● Examples
- 01
Importing key material into AWS KMS from an on-premises HSM.
- 02
Azure Key Vault BYOK using an FIPS 140-2 HSM for the wrapping ceremony.
● Frequently asked questions
What is Bring Your Own Key (BYOK)?
A key-management model where the customer generates or imports its own encryption keys into the cloud provider's KMS instead of relying on provider-generated keys. It belongs to the Cloud Security category of cybersecurity.
What does Bring Your Own Key (BYOK) mean?
A key-management model where the customer generates or imports its own encryption keys into the cloud provider's KMS instead of relying on provider-generated keys.
How do you defend against Bring Your Own Key (BYOK)?
Defences for Bring Your Own Key (BYOK) typically combine technical controls and operational practices, as detailed in the full definition above.
What are other names for Bring Your Own Key (BYOK)?
Common alternative names include: BYOK, Customer-supplied keys.