BYOK (bring your own key) is a cloud encryption model in which you generate, or control, the root key that a cloud service uses to encrypt your data. The key is created in your own HSM or key manager, or under your policy in the provider's key service, and you decide when it is rotated, disabled or destroyed. The provider's service still uses the key to decrypt your data while it runs, which is what separates BYOK from hold your own key (HYOK).
By default, cloud providers generate, store and manage the keys that protect your data. For regulated data, financial records or intellectual property, many organisations want a say in that key's lifecycle and a technical way to end the provider's access. BYOK gives them both, within limits this guide spells out.
This page is the definition of BYOK. For the stronger model where the provider cannot decrypt without your key service, see BYOK vs HYOK. For Microsoft 365 specifically, see Microsoft Purview Customer Key and Double Key Encryption.
What Is Bring Your Own Key (BYOK) Encryption
Bring Your Own Key (BYOK) encryption is a cloud security model that allows organizations to generate, control and manage their own encryption keys rather than relying entirely on keys generated by the cloud service provider. The concept originated as enterprises began migrating sensitive workloads to public cloud infrastructure and discovered that default encryption options left them without true key ownership.
In a BYOK architecture, the customer generates master encryption keys using their own hardware security modules (HSMs) or key management systems. These keys are then imported into the cloud provider's key management service, where they encrypt and decrypt data within that environment. Critically, the organization retains a copy of the key material and maintains control over the key lifecycle, including rotation, revocation and destruction.
The Technical Foundation of BYOK

Default encryption keeps keys inside the cloud provider's infrastructure. External key management (BYOK) moves the root key material to infrastructure you control, outside the provider's reach.
BYOK relies on a process called key wrapping. When you import your key into a cloud platform, your key (the target key) is encrypted using a separate wrapping key provided by the cloud service. This protects your key material during transit. Once imported, your key resides within the cloud provider's HSM infrastructure but was generated under your control.
The standard BYOK workflow follows these steps:
- Key generation: The organization generates a symmetric encryption key using a FIPS 140-2 validated HSM or certified key management system
- Wrapping: The key is encrypted using the cloud provider's public wrapping key
- Secure transfer: The wrapped key is transmitted to the cloud provider via API or secure upload
- Import and activation: The provider unwraps the key within their HSM and makes it available for cryptographic operations
- Ongoing management: The organization monitors key usage and manages rotation schedules
What BYOK Does and Does Not Guarantee
Understanding BYOK's boundaries is essential for security planning. BYOK guarantees that you generated the key material and can revoke access by deleting the key. It does not guarantee that the cloud provider cannot access your key once imported, in most implementations, the provider's infrastructure does have access to the unwrapped key during cryptographic operations.
This distinction matters significantly for compliance and risk assessment. BYOK improves your control posture compared to provider-generated keys, but it does not achieve the same level of isolation as more advanced approaches like Double Key Encryption (DKE) or external key management (EKM), where the provider never holds usable key material.
How BYOK Works in Cloud Environments
Each major cloud platform implements BYOK differently, with varying levels of control, supported algorithms and integration patterns. Understanding these platform-specific architectures helps organizations plan realistic deployments.
Microsoft Azure BYOK Implementation
Azure Key Vault supports BYOK through its key import functionality. Organizations generate RSA-HSM or EC-HSM keys locally and import them into Key Vault's HSM-backed tier. Azure uses a Key Exchange Key (KEK) system where Microsoft provides a public RSA key that wraps your target key for secure import.
Once imported, keys can protect Azure Storage, Azure SQL Database, Azure Disk Encryption and other services. Microsoft's implementation maintains the key within FIPS 140-2 Level 2 or Level 3 HSMs (depending on tier), but Microsoft's infrastructure can access the key for processing operations.
AWS BYOK Architecture
AWS Key Management Service (KMS) implements BYOK through its custom key store and imported key material features. Customers can import 256-bit symmetric keys into KMS, which are then protected by AWS's HSM infrastructure. AWS also offers CloudHSM integration for organizations requiring dedicated, single-tenant hardware.
With imported key material, you keep the original copy outside AWS, and you can delete the imported material or set it to expire. During active use, AWS KMS performs the cryptographic operations inside its own HSMs. The AWS option where key material never enters AWS is the External Key Store (XKS), which is a hold-your-own-key design rather than BYOK.
Google Cloud BYOK Options
Google Cloud Platform offers BYOK through Cloud KMS with customer-managed encryption keys (CMEK). Google also provides Cloud HSM for hardware-backed key storage and External Key Manager (EKM) for keys that never enter Google's infrastructure.
The EKM option represents a significant step beyond traditional BYOK, as cryptographic operations occur outside Google's environment. This architecture aligns more closely with true data sovereignty requirements.
Enterprise SaaS platforms have implemented their own BYOK models. Salesforce Shield Platform Encryption lets customers supply tenant secrets and, with the Cache-Only Key Service, fetch key material from a service they host (Salesforce BYOK guide).
Microsoft 365 has two BYOK options and one HYOK option:
- Customer Key encrypts Exchange, SharePoint, OneDrive, Teams and Windows 365 data at rest under root keys you hold in Azure Key Vault or Managed HSM. Microsoft 365 services still decrypt the data for search, eDiscovery and anti-malware. See Microsoft Purview Customer Key.
- BYOK for the Azure Rights Management root key puts a customer-generated key behind Purview Information Protection encryption. The key is transferred to Azure Key Vault. (Microsoft Learn)
- Double Key Encryption protects selected items with a second key Microsoft never holds. It is the hold-your-own-key option. See what Double Key Encryption is.
The difference matters in an audit: with the two BYOK options, Microsoft's services can still read the data while your key is active. Only DKE removes that.
BYOK vs HYOK in short
| BYOK | HYOK |
|---|
| Where the key lives at runtime | In the provider's key service (imported or created under your policy) | In your own key manager, outside the provider |
| Who performs decryption | The provider's service | The provider asks your key service for each operation |
| Can the provider decrypt alone while the key is active? | Yes | No |
| Typical examples | Microsoft 365 Customer Key, AWS KMS imported key material, Azure Key Vault BYOK | Microsoft 365 Double Key Encryption, AWS XKS, Google Cloud EKM |
| Cost of the extra control | Lifecycle and backup work | You run a highly available key service, and some provider features stop |
The full comparison, platform by platform, is in Hold Your Own Key (HYOK): BYOK vs HYOK explained.
BYOK vs Cloud-Native Key Management: Key Differences
The choice between BYOK and cloud-native key management involves tradeoffs across control, compliance, operational complexity and cost. Security leaders must evaluate these factors against their specific risk profile and regulatory requirements.
Control and Ownership Comparison
| Aspect | Cloud-Native KMS | BYOK | External Key Management |
|---|
| Key generation | Provider | Customer | Customer |
| Key storage | Provider HSM | Provider HSM | Customer-controlled |
| Cryptographic operations | Provider | Provider | Customer or external service |
| Key access during processing | Provider has access | Provider has access | Provider may not have access |
| Revocation control | Customer-initiated | Customer-initiated | Immediate customer control |
| Audit visibility | Provider logs | Provider logs + customer logs | Full customer visibility |
The fundamental difference between BYOK vs native encryption lies in provenance and lifecycle control. With cloud-native KMS, you trust the provider completely, they generate, store and use the keys. With BYOK, you verify key generation but still trust the provider for storage and use. Only external key management eliminates provider access entirely.
Compliance and Audit Implications
Regulatory frameworks increasingly distinguish between encryption that uses provider-controlled keys and encryption under customer control. GDPR Article 32 requires "appropriate technical measures" for data protection and regulators have begun asking whether provider-held keys satisfy this standard when the provider is subject to foreign government access requests.
BYOK cloud security provides documented evidence that your organization generated the encryption keys, which satisfies some audit requirements. However, for frameworks like TISAX (automotive) or FINMA (Swiss financial services), auditors may require proof that even the cloud provider cannot access key material, pushing organizations toward DKE or external key management architectures.
Operational Complexity
BYOK introduces operational responsibilities that cloud-native KMS handles automatically:
- Key generation infrastructure: You need certified HSMs or KMS software to generate keys securely
- Backup and recovery: Losing your key material means permanent data loss, robust backup procedures are essential
- Rotation planning: Keys must be rotated on schedule, requiring coordination between your systems and the cloud platform
- Incident response: If a key is compromised, you manage the response across both your infrastructure and the cloud environment
These requirements demand skilled personnel and mature processes. Organizations without established cryptographic operations capabilities face a significant learning curve.
Why Enterprises Need BYOK for Data Sovereignty

BYOK enables geographic key sovereignty: your encryption keys can be anchored to specific jurisdictions, ensuring that cross-border data access requests cannot reach the cryptographic root of your data.
Data sovereignty, the concept that data is subject to the laws and governance structures of the jurisdiction where it resides, has become a primary driver for BYOK adoption. Three intersecting forces make this increasingly urgent for European enterprises.
Regulatory Pressure and Cross-Border Data Access
The 2020 Schrems II ruling invalidated the EU-US Privacy Shield and created uncertainty around data transfers to US cloud providers. While the EU-US Data Privacy Framework (2023) provides a new legal basis, its long-term stability remains uncertain. More fundamentally, US laws including the CLOUD Act allow US government agencies to compel US-headquartered companies to produce data stored anywhere in the world.
For organizations bound by GDPR, NIS2, or sector-specific regulations like DORA (financial services), this creates genuine legal exposure. If a US cloud provider holds both your data and your encryption keys, a US legal order could theoretically compel access, regardless of where the data is physically stored.
BYOK provides partial mitigation by ensuring you control key generation and can demonstrate that encryption was implemented under your governance. However, since the provider still accesses the key during processing, BYOK alone may not satisfy strict data sovereignty interpretations.
The Multi-Cloud Sovereignty Challenge
Most enterprises operate across multiple cloud platforms, Azure for productivity, AWS for infrastructure, Salesforce for CRM. Each platform has its own key management system, creating a fragmented control plane. Centralized cloud encryption key management through an external KMS allows organizations to maintain consistent policy enforcement and audit trails across all environments.
This unified approach delivers several advantages:
- Single source of truth: All key lifecycle events logged in one system
- Consistent rotation policies: Enforce the same standards regardless of platform
- Simplified compliance: Demonstrate key management practices to auditors once, not per-platform
- Reduced attack surface: Fewer systems with access to root key material
Swiss Neutrality as a Trust Anchor
Switzerland's position outside the EU and its privacy law make it a common choice of jurisdiction for key management infrastructure. Switzerland has not concluded a CLOUD Act agreement with the United States (US Department of Justice: CLOUD Act resources).
Organizations that host their key management systems in Switzerland, or use Swiss-operated key management services, add a jurisdictional protection layer that purely technical controls cannot provide.
BYOK Benefits for Regulated Industries
Specific industries face regulatory requirements that make BYOK benefits enterprise-critical rather than optional. Understanding these sector-specific drivers helps prioritize implementation.
Financial Services: DORA and FINMA Requirements
The Digital Operational Resilience Act (DORA) has applied to EU financial entities since 17 January 2025. Its Article 9 requires ICT security policies, and the detail sits in Commission Delegated Regulation (EU) 2024/1774, whose Articles 6 and 7 cover encryption and cryptographic key management. See the DORA encryption checklist.
Swiss banks and insurers that outsource to the cloud remain responsible for the outsourced function and the data. Whether BYOK is sufficient for client-identifying data, or whether the key must stay outside the provider, is a question supervisors and auditors examine case by case. See data sovereignty in Switzerland.
Healthcare: HIPAA and Patient Data Protection
HIPAA's Security Rule requires covered entities to implement encryption for electronic protected health information (ePHI). While HIPAA does not mandate specific key management architectures, the Office for Civil Rights has emphasized that encryption is only effective if keys are properly protected.
For healthcare organisations, the practical question is the same as elsewhere: who can use the key that protects ePHI, and can that access be shown in an audit.
Automotive: TISAX Certification Requirements
The automotive industry's TISAX framework (based on ISO 27001) includes specific controls for information security. Automotive manufacturers and suppliers handling prototype data, engineering specifications, or connected vehicle information often require TISAX certification.
TISAX assessments examine encryption practices in detail, including who controls key material and whether keys could be accessed by unauthorized parties.
Common BYOK Implementation Challenges
BYOK deployments frequently encounter obstacles that delay projects or compromise security outcomes. Anticipating these challenges enables more realistic planning.
HSM Infrastructure Requirements
Proper BYOK implementation requires FIPS 140-2 (or FIPS 140-3) validated hardware for key generation. On-premises HSMs like Thales Luna or Entrust nShield involve significant capital expense, specialized skills and ongoing maintenance. Cloud HSM services (Azure Dedicated HSM, AWS CloudHSM) reduce operational burden but introduce their own dependencies.
Organizations without existing HSM infrastructure face a critical decision: invest in on-premises hardware, adopt cloud HSM services, or partner with a managed key management provider. Each path has different cost, control and compliance implications.
Key Lifecycle Management Complexity
BYOK transfers responsibility for key lifecycle management to the customer. This includes:
- Rotation: Industry best practice recommends rotating encryption keys annually or more frequently. Coordinating rotation across multiple cloud platforms while maintaining data accessibility requires careful orchestration.
- Backup: Key material must be backed up securely, with geographic redundancy and access controls. Backup restoration procedures must be tested regularly.
- Revocation: When incidents occur, organizations need the capability to revoke keys immediately. This requires pre-established procedures and technical integration.
- Destruction: At end-of-life, keys must be destroyed securely, including all backup copies.
Cryptographic operations add latency. When keys are managed externally, every encryption or decryption operation may require a round-trip to the key management system. For high-throughput workloads, this can impact application performance.
Availability is equally critical. If your key management system is unreachable, cloud applications cannot decrypt data. This creates a single point of failure that must be addressed through redundancy and geographic distribution.
Organizational Readiness
BYOK success depends on skilled personnel and mature processes. Organizations need:
- Cryptographic expertise to design and operate key management infrastructure
- Security operations capability to monitor key usage and respond to incidents
- Compliance resources to document controls and support audits
- Change management discipline to coordinate key rotation and updates
Many organizations underestimate these requirements, leading to implementations that create compliance documentation without delivering actual security improvement.
How to Evaluate BYOK Solutions for Your Organization
Selecting the right BYOK approach requires systematic evaluation of your requirements, risk tolerance and operational capabilities.
Assessment Framework
Begin by answering these foundational questions:
- What data requires protection? Classify your data by sensitivity and identify which workloads need customer-controlled encryption.
- What regulations apply? Map applicable frameworks (GDPR, DORA, HIPAA, TISAX) to specific encryption and key management requirements.
- What cloud platforms do you use? Inventory current and planned cloud services, noting their BYOK capabilities and limitations.
- What is your risk tolerance for provider access? Determine whether BYOK's control level satisfies your requirements or whether you need external key management.
- What operational capabilities exist? Honestly assess your team's cryptographic expertise and capacity.
Vendor Evaluation Criteria
When evaluating BYOK solutions and managed key management providers, examine:
| Criterion | Questions to Ask |
|---|
| Key generation | Does the vendor support HSM-backed key generation? What certification levels are supported (FIPS 140-2, FIPS 140-3)? |
| Key storage | Where is key material stored? Is it customer-controlled or provider-controlled? Can keys be stored in your own HSM? |
| Multi-cloud support | Does the solution integrate with all your cloud platforms (Azure, AWS, GCP, Salesforce, Microsoft 365)? |
| Audit and logging | Are all key operations logged? Can logs be exported to your SIEM? Are logs tamper-evident? |
| Compliance documentation | Does the vendor provide compliance reports (SOC 2, ISO 27001)? Have they been assessed against DORA or TISAX requirements? |
| Key lifecycle automation | Does the solution automate rotation, expiration alerts and revocation workflows? |
| Jurisdiction | Where is the vendor incorporated? What laws govern their data access obligations? Do they have Swiss or EU-based operations? |
| Support and SLA | What are the availability guarantees for the key management service? What is the incident response time? |
Beyond BYOK: When to Consider External Key Management
For organizations with the most stringent sovereignty requirements, traditional BYOK may not be sufficient. External key management (EKM) solutions, where the cloud provider never holds usable key material, offer stronger guarantees than standard BYOK implementations.
DuoKey's approach combines external key management with Multi-Party Computation (MPC) technology, ensuring that no single party, including DuoKey itself, holds complete key material at any point. This architecture addresses the fundamental limitation of standard BYOK: that the cloud provider can access your key during processing.
For organizations operating under Swiss financial regulations (FINMA), automotive industry certification requirements (TISAX), or strict GDPR interpretations, this level of cryptographic separation provides auditable proof that cloud providers cannot access unencrypted data, even under legal compulsion.
Key Takeaways
Bring Your Own Key encryption represents a significant improvement over cloud-native key management, but it is not a complete solution to data sovereignty challenges. Understanding its boundaries helps organizations make informed decisions:
- BYOK gives you control over key generation and lifecycle, but most implementations still allow the cloud provider to access key material during cryptographic operations
- Compliance value varies by framework: BYOK satisfies many audit requirements but may not meet the strictest interpretations of FINMA, TISAX, or GDPR for cross-border data transfers
- Operational complexity is real: successful BYOK implementation requires dedicated infrastructure, skilled personnel and mature key management processes
- Multi-cloud environments benefit most from centralized key management: a unified KMS spanning all cloud platforms provides consistent policy enforcement and simplified compliance demonstration
- Jurisdiction matters: hosting key management infrastructure in Switzerland or another privacy-protective jurisdiction adds a legal protection layer that technical controls alone cannot provide
Organizations that take BYOK seriously, implementing it with proper HSM infrastructure, documented processes and centralized oversight, achieve meaningful risk reduction and stronger compliance posture. Those that treat it as a checkbox exercise gain compliance documentation without genuine security improvement.
The decision to move beyond BYOK to external key management depends on your specific regulatory obligations, risk tolerance and the sensitivity of the data you are protecting. For most enterprises, BYOK is the right starting point. For those operating under the most demanding sovereignty requirements, it is the first step toward a more comprehensive cryptographic control architecture.
FAQ
What is BYOK in simple terms?
Bring your own key means you supply or control the encryption key a cloud service uses for your data, instead of letting the provider generate and manage it. You decide on rotation and revocation. The provider's service still uses the key to process your data.
Is BYOK the same as customer-managed keys (CMK)?
Close, but not always. Customer-managed key usually means a key in the provider's key service whose policy and lifecycle you control. BYOK adds that you generated the key material yourself and imported it. In both cases the provider's service performs the decryption.
What is the difference between BYOK and HYOK?
With BYOK the provider holds a usable copy of your key while it is active. With HYOK the key stays in your key manager and the provider must ask for each operation, so it cannot decrypt on its own. See BYOK vs HYOK.
Does Microsoft 365 support BYOK?
Yes, through Microsoft Purview Customer Key for service encryption and through BYOK for the Azure Rights Management root key. For content Microsoft must not be able to read alone, Microsoft 365 offers Double Key Encryption. See Microsoft Purview Customer Key.
What happens if I lose a BYOK key?
Data encrypted under it becomes unrecoverable. That is why providers require backups, soft delete or purge protection before they accept a customer key, and why key backup belongs in the project plan from day one.
Further reading