Upcoming webinar | 9 April 2026 Securing Agentic AI: Closing Access Gaps | Register now

What is bring your own key (BYOK)?

What is BYOK?

Bring your own key (BYOK) is an encryption key management approach where customers of a cloud service provider (CSP) generate and manage their own encryption keys. In cloud computing environments, BYOK offers organizations greater control over data security, visibility and compliance requirements.

Often, a cloud service provider controls the encryption keys that provide data protection for an organization’s cloud-hosted assets. However, in a BYOK model, the organization controls its own encryption keys so no external entity can access its cloud data without its authorization.

Encryption keys transform plain text into unreadable ciphertext to protect sensitive data from unauthorized access. They can also decrypt ciphertext back into readable form for authorized users.

BYOK helps ensure that encryption keys are managed according to an organization’s security policies and are aligned with industry standards such as NIST guidelines and FIPS 140–2, regardless of cloud provider.

Most major cloud providers—including IBM Cloud®, Microsoft Azure, Amazon Web Services (AWS) and Google Cloud—offer BYOK to their customers.

How does BYOK work?

BYOK typically follows a process called “envelope encryption,” which uses a hierarchy of keys to protect data. The cloud provider’s key management system (KMS) manages this function, creating, storing and controlling access to encryption keys. 

Here are the basic steps for BYOK.

Generate a master key

The customer generates a master key in their own environment, often by using an on-premises hardware security module (HSM) for enhanced security. The HSM is a tamper-resistant device that securely generates and stores cryptographic keys.

Transfer the key

Using a public key provided by the cloud provider, the customer encrypts their master key to protect it during transit. The master key is then imported into the cloud provider’s key management service through a secure application programming interface (API). The key is typically stored in the cloud provider’s own hardware security module.

Encrypt the customer data

The cloud provider’s KMS generates a temporary, single-use data encryption key (DEK). This key is used to encrypt the customer’s data. The customer’s master key is then used to encrypt the DEK. The result is an encrypted DEK (EDEK). The EDEK is stored alongside the encrypted data, while the DEK is discarded from memory.

Decrypt the data

When the customer needs to access the data, the process is reversed. The cloud provider retrieves the encrypted data and the EDEK. The cloud provider’s KMS uses the customer’s master key to decrypt the EDEK, retrieving the DEK. The DEK is then used to decrypt the data so the customer can access it.

Example: BYOK in action

Consider a financial services firm that wants to move its customer transaction histories, account details and other sensitive records to a public cloud. However, due to stringent industry regulations such as the Payment Card Industry Data Security Standard (PCI DSS), it cannot cede control of its encryption keys to a third party.

With BYOK, the firm can use its own encryption keys to maintain strict control over its data, even though it is stored on the cloud provider’s infrastructure. Because an attacker would not have access to the master key needed to decrypt the data, the risk of a data breach is minimized. The firm can also prove to regulators that it has full control over the keys that secure customer data.

Security Intelligence | 25 March, episode 26

Your weekly news podcast for cybersecurity pros

Whether you're a builder, defender, business leader or simply want to stay secure in a connected world, you'll find timely updates and timeless principles in a lively, accessible format. New episodes on Wednesdays at 6am EST.

Benefits of BYOK

Data protection

Data encryption is a core tool for protecting sensitive information, especially information stored and processed in the cloud. According to the IBM Cost of a Data Breach Report, organizations that use encryption can reduce the financial impact of a data breach by over USD 200,000.

BYOK further enhances data protection by giving organizations direct control over the encryption keys used to secure sensitive data in the cloud. This control reduces the risk of unauthorized access to encrypted data. It prevents cloud providers or third parties from decrypting the data.

Many enterprises use BYOK to protect sensitive customer data stored in a software-as-a-service (SaaS) platform such as Salesforce.

Regulatory compliance

Regulations like the Health Insurance Portability and Accountability Act (HIPAA), the General Data Protection Regulation (GDPR) and PCI DSS often require strict control over data access and encryption practices. By using their own keys, organizations can help ensure they meet these standards and maintain audit trails for key access and usage.

Healthcare providers often use BYOK when encrypting patient records, which helps them demonstrate compliance with HIPAA by ensuring that only authorized parties can decrypt the data.

Multicloud key management

In multicloud and hybrid cloud environments, BYOK helps organizations centralize key management across platforms, maintaining consistency and control without relying on each cloud service provider’s separate key system.

For example, a business that uses AWS, Azure and Google Cloud can centrally manage encryption keys for all platforms, reducing complexity and improving the security posture.

Increased trust

For SaaS companies and other vendors, offering BYOK sends a signal to customers that they take data privacy and ownership seriously. This signal is important for enterprise customers and regulated industries where transparency is a critical component of security.

Ongoing tasks for BYOK

Because the customer owns the master key in a BYOK model, they are responsible for its full lifecycle management. This lifecycle includes a series of ongoing tasks to help maintain the security and integrity of the key. Organizations often automate these tasks to reduce operational burden and minimize the risk of human error.

Key rotation

Organizations regularly replace encryption keys with new ones to reduce the risk of unauthorized access, exposure or theft. Limiting the lifespan of a key helps improve cloud security.

Key backup

Securely backing up master keys is essential to prevent data loss in case the original key is lost or corrupted. Without a valid master key, encrypted data can become permanently inaccessible.

Auditing

Monitoring key usage through audit logs helps detect unauthorized data access or misuse. Auditing key management policies also helps verify compliance with regulatory requirements such as GDPR and HIPAA.

Recovery planning

Having a clear, documented plan helps organizations prepare for situations such as the accidental deletion of a key, hardware failures or cyberattacks. Because cloud providers can’t recover the master key, it’s up to the organization to be prepared.

BYOK versus HYOK

Bring your own key (BYOK) and hold your own key (HYOK) both give organizations more control over encryption, but they differ in how and where the keys are stored and managed.

With BYOK, the organization creates and owns the encryption keys but uploads them to the cloud provider’s key management system to use with cloud services.

With HYOK, the organization keeps the encryption keys entirely in its own environment. At no point does it share them with the cloud provider. This arrangement offers a higher level of control and privacy, but it’s more complex to manage and not supported by all cloud services.

BYOK offers convenience with control, while HYOK offers maximum control but with more responsibility.

Authors

Gregg Lindemulder

Staff Writer

IBM Think

Matthew Kosinski

Staff Editor

IBM Think

3d sphere and cube shapes surrounded by locks
Related solutions
IBM® Hashicorp®

Helps simplify complex hybrid environments with unified infrastructure and security management.

Explore IBM HashiCorp
AI cybersecurity solutions

Boost security team speed, accuracy and productivity with AI-powered solutions.

Explore AI cybersecurity solutions
Managed infrastructure and network security services

Defend your infrastructure and network from advanced threats with proven expertise and modern security solutions.

Explore infrastructure security services
Take the next step

Discover how HashiCorp® and AI cybersecurity solutions simplify hybrid infrastructure while boosting security speed, accuracy and productivity.

  1. Discover IBM HashiCorp
  2. Explore AI cybersecurity solutions