What Is BYOK? Bring Your Own Key Encryption Explained
Jan 15, 2025
ArticleBYOK explained for security and risk leaders: when customer-held keys reduce cloud concentration risk and when provider-managed encryption is not enough.
Read article
Hold your own key (HYOK) explained: BYOK vs HYOK vs provider-managed keys, how Microsoft 365 DKE, AWS XKS and Google CSE implement it, and how to choose.
Hold your own key (HYOK) is a cloud encryption model in which the keys that protect your data never leave infrastructure you control. The cloud provider stores only ciphertext and must ask your key service to perform each cryptographic operation, so if your key service refuses, or is unreachable, the provider cannot read the data. Key availability becomes data availability.
That is the difference a board, regulator or data protection officer cares about. With provider-managed keys and with bring your own key (BYOK), the provider holds a usable key, so it can be compelled, breached or misconfigured into decrypting your data. With HYOK, decryption needs a step only you can perform. Legal requests addressed to cloud providers, including under the US CLOUD Act, are one reason "who can decrypt?" is now a procurement question.
This guide compares HYOK with BYOK and provider-managed keys, shows how Microsoft 365, AWS, Google Workspace, Salesforce, Snowflake and Oracle implement it (or don't), based on each vendor's documentation, and ends with a decision table.
HYOK rests on three properties:
AWS uses the term directly: operations with a KMS key in an external key store "are performed by your external key manager using your cryptographic key material, a feature known as hold your own keys (HYOKs)," and "your cryptographic key material never leaves your external key manager" (AWS KMS: External key stores).
You will also see CYOK ("control your own key") in vendor material. It isn't a standardized category: some vendors use it as an umbrella for any customer-controlled key, others as a synonym for HYOK. When comparing HYOK vs BYOK vs CYOK offers, ignore the label and ask who holds the key at runtime and who can decrypt without asking you.
The models differ less in algorithms than in custody. For BYOK on its own, see what BYOK (bring your own key) is and how it works.
| Provider-managed keys | BYOK (bring your own key) | HYOK (hold your own key) | |
|---|---|---|---|
| Who generates the key | Cloud provider | You, then imported into or created under your policy in the provider's KMS | You, in your own key manager |
| Who holds the key at runtime | Provider | Provider's service, under your policy | Only your key manager; the provider holds ciphertext and key references |
| Who can decrypt | Provider services, on their own | Provider services, using the key you authorized | Provider services only after your key service performs the operation |
| Effect of revocation | Not available to you | Provider stops using the key; caches and purge processes apply per service | New decryptions fail as soon as your service refuses |
| Exposure to legal requests addressed to the provider | Provider can produce plaintext | Provider can usually produce plaintext while the key is active | Provider can produce only ciphertext |
| Operational cost | Lowest | Moderate: lifecycle, rotation, access policy | Highest: you run a highly available, low-latency key service |
| Features kept | All | Almost all (search, indexing, AI features) | Reduced: the provider can't process what it can't read |
BYOK is a real improvement: you own the lifecycle and can revoke. But because the provider uses the key inside its service, BYOK doesn't change who can decrypt while the key is active. HYOK does, and you pay for it in availability responsibility and lost features.
Almost every implementation uses envelope encryption:
Your key service sits in the read path: it enforces policy, keeps the audit trail, and if it is down, the data is down.
AWS adds double encryption: AWS KMS first encrypts with AWS-held key material, then your external key manager encrypts the result, so "neither AWS KMS nor the owner of the external key material can decrypt double-encrypted ciphertext alone" (AWS KMS). Microsoft's Double Key Encryption follows the same "two keys, both required" logic.
Microsoft Purview Double Key Encryption (DKE) "uses two keys to protect data; one key in your control and a second key you store securely in Microsoft Azure," and viewing protected data "requires access to both keys." You host the DKE service on-premises or in the cloud (Microsoft Learn: Double Key Encryption). From the same page:
Deployment steps: Microsoft 365 Double Key Encryption setup guide.
Customer Key is service encryption under root keys you control, covering Exchange, SharePoint, OneDrive, Teams and Windows 365 Cloud PCs. Microsoft is explicit about who uses the key: "You explicitly authorize Microsoft 365 to use your encryption keys to deliver value-added services like eDiscovery, anti-malware, anti-spam, and search indexing" (Microsoft Learn: Customer Key overview).
That is BYOK. Microsoft 365 services decrypt content in normal operation, which is why every feature keeps working, and each data encryption policy includes an availability key that Microsoft protects. Your control shows at exit: "Revoking access to your keys triggers deletion of the availability key, resulting in cryptographic deletion of your data." Many programmes use Customer Key broadly and DKE for a small labelled slice; see DKE vs Microsoft 365 Customer Key.
Each KMS key in an external key store maps to a 256-bit AES "external key" in your external key manager, reached through an XKS proxy you supply; "AWS KMS cannot create, delete, or manage any external keys." Applications use the same KMS APIs, and AWS services that support customer managed symmetric keys support XKS keys (AWS KMS). AWS documents the trade-offs itself:
Details: AWS XKS implementation guide.
Workspace CSE encrypts content in the client with a DEK, then sends that DEK to your external key service (the Key Access Control List Service, KACLS) to be encrypted; your identity provider authenticates users first (Google Workspace CSE API overview). Google states that "Google servers and third parties can't access your encryption keys and decrypt your data." Coverage includes Drive and Docs editors files, the Gmail body and attachments, Calendar event descriptions, and Meet audio, video and chat; Gmail headers and Calendar titles, times and attendees are not encrypted (Google: Protect your organization's data with CSE). Editions: Frontline Plus, Enterprise Plus, Education Standard and Education Plus (Google: About client-side encryption).
The Cache-Only Key Service lets you "store your key material outside of Salesforce and have the Cache-Only Key Service fetch your key on demand from a key service that you control," and "Salesforce doesn't retain or persist your cache-only keys in any system of record or backups." Keys are 256-bit AES, wrapped in JSON Web Encryption and fetched over a named-credential callout; the encrypted cache is flushed at least every 72 hours. It requires Salesforce Shield or Shield Platform Encryption plus the Cache-Only Key Service (Salesforce Platform Encryption Implementation Guide).
To be precise: the key is used inside Salesforce while cached, so this isn't HYOK in the strict XKS sense. What you hold is the off switch: destroy the key and "related data isn't accessible" until you reactivate it.
Tri-Secret Secure "combines a Snowflake-maintained key and a customer-managed key (CMK)" into a composite master key. It requires Business Critical edition or higher, and if the CMK is revoked Snowflake can no longer decrypt your data (Snowflake: Tri-Secret Secure). By default the CMK lives in the KMS of the cloud platform hosting your account, and you "must release this key to decrypt data stored in your Snowflake account" (Snowflake: Encryption key management).
Honestly classified, that is BYOK with a kill switch: Snowflake uses your key while you allow it. For AWS-hosted accounts Snowflake documents an external key store behind the CMK, which moves the root closer to HYOK; check Snowflake's current list of tested key managers. Setup: Snowflake Tri-Secret Secure guide.
In Oracle Transparent Data Encryption, "the TDE master encryption key protects the TDE table keys and tablespace encryption keys" (Oracle: Configuring TDE). Moving the master key off the database host gives you HYOK-style control wherever the database runs. Oracle's supported external keystores are Oracle Key Vault and OCI Vault. The HSM value of TDE_CONFIGURATION still configures a hardware security module, but Oracle's reference states that "Oracle does not support the use of HSMs for TDE key management" and points to My Oracle Support note KB593570 (Oracle: TDE_CONFIGURATION). Read that note before production. Step by step: Oracle TDE external keystore guide.
| Platform option | Where the customer key operates | Model |
|---|---|---|
| Microsoft 365 Double Key Encryption | Your DKE service; Microsoft holds the second key | HYOK |
| Microsoft 365 Customer Key | Used by Microsoft 365 services; Microsoft also protects an availability key | BYOK |
| AWS KMS External Key Store | Your external key manager, via your XKS proxy | HYOK |
| Google Workspace CSE | Your external key service (KACLS) | HYOK |
| Salesforce Cache-Only Key Service | Hosted by you; fetched and cached encrypted by Salesforce, not persisted | Between BYOK and HYOK |
| Snowflake Tri-Secret Secure | Your CMK combined with a Snowflake key | BYOK (closer to HYOK with an external key store) |
| Oracle TDE, external keystore | Master key in the external keystore | Customer-held master key (check Oracle's HSM support position) |
Start from the data class and the threat, not the product. This is a planning aid, not legal advice; whether a model satisfies a specific law or contract is a question for your counsel.
| Data class | Main threat | Suggested model |
|---|---|---|
| Public and general business data | Accidental exposure, disk theft | Provider-managed keys |
| Regulated personal or financial data needing full productivity features | Loss of control over key lifecycle; need for exit and cryptographic deletion | BYOK (e.g. Microsoft 365 Customer Key, Snowflake Tri-Secret Secure) |
| Crown-jewel data: M&A, board material, trade secrets | Provider insider access or compromise | HYOK (DKE, Google CSE, AWS XKS) |
| Data the provider must not be able to produce under foreign legal process | Requests addressed to the provider, e.g. under the US CLOUD Act | HYOK, with keys under an operator and jurisdiction you choose |
| Databases you run yourself | Theft of database files, backups or hosts | Master key in an external keystore (e.g. Oracle TDE) |
Why the CLOUD Act row matters: the US Department of Justice explains that the Act covers data "within such provider's possession, custody, or control, regardless of whether such communication, record, or other information is located within or outside of the United States," and calls the Act "encryption neutral" (DOJ white paper: The Purpose and Impact of the CLOUD Act). Data location alone doesn't answer the question; whether the provider holds the key does.
DuoKey provides the customer-side key service for these platform options from one key management layer. DuoKey KMS splits keys with multi-party computation (MPC), so no cloud provider, operator or compromised host holds a complete key.
For deployment location, availability design or certifications, contact DuoKey.
Q: What is hold your own key (HYOK)?
Hold your own key is a cloud encryption model in which encryption keys stay in a key manager you control, and the cloud provider must ask that key manager to perform each wrap or unwrap operation. The provider stores only ciphertext, so it cannot decrypt without your key service. Revoke access and the data becomes unreadable to the provider.
Q: What is the difference between BYOK and HYOK?
With BYOK you own the key, but the provider's service uses it to decrypt your data in normal operation. With HYOK the key never leaves your infrastructure and the provider can only request operations from it. BYOK gives lifecycle control and revocation; HYOK also removes the provider's ability to decrypt on its own, at the cost of availability responsibility and some features.
Q: Does Microsoft 365 support HYOK?
Yes, through Microsoft Purview Double Key Encryption. DKE protects labelled content with two keys, one in your DKE service and one in Microsoft Azure, and both are needed to open it. It runs in Microsoft 365 Apps for enterprise on Windows and comes with Microsoft 365 E5; protected content can't be searched, co-authored on the web or used by Copilot.
Q: Is Microsoft 365 Customer Key HYOK?
No. Customer Key is service encryption under root keys you control, a BYOK model. Microsoft states that you authorize Microsoft 365 to use your keys for eDiscovery, anti-malware, anti-spam and search indexing. Its main control is revocation, which leads to cryptographic deletion of your data.
Q: What does HYOK vs BYOK vs CYOK mean?
BYOK: you supply the key and the provider uses it. HYOK: you keep the key and the provider requests operations from it. CYOK ("control your own key") isn't standardized, so ask who holds the key at runtime and who can decrypt without your approval.
Q: What happens if my HYOK key service goes down?
New decryptions fail, so protected data is unavailable to the cloud service until the key service returns. Some services cache data keys briefly. HYOK key services therefore need redundancy, monitoring and a tested recovery plan.
Q: Does HYOK protect against the CLOUD Act?
HYOK changes what a provider can technically produce: without a usable key it can hand over only ciphertext. The US Department of Justice describes the Act as encryption neutral. Whether HYOK meets a specific legal requirement is a question for your counsel.
Use hold your own key when the question is not "is my data encrypted?" but "who can decrypt it?" BYOK covers most regulated workloads; HYOK is for the slice the provider itself must not read.
Written by
DuoKey Team
Related Resources
Tell us where control is difficult today. We will help you identify a practical next step.