A Customer-Managed Key (CMK) is a cryptographic key generated, stored, and governed entirely within the customer's exclusive control plane, typically inside a dedicated Hardware Security Module (HSM) or sovereign key management service. Unlike provider-managed keys, the cloud operator has no technical ability to access the plaintext key material or the data it protects, enforcing a strict separation of duties.
Glossary
Customer-Managed Key (CMK)

What is Customer-Managed Key (CMK)?
A Customer-Managed Key (CMK) is a cryptographic key whose lifecycle, access policy, and storage are fully controlled by the data owner within their own sovereign boundary, preventing the cloud provider from accessing the plaintext data.
This model implements a Hold Your Own Key (HYOK) architecture, where key operations like rotation, revocation, and auditing are executed against the customer's own infrastructure. By integrating CMKs with envelope encryption, the data encryption key (DEK) is wrapped by the CMK, ensuring that disabling the CMK at the customer's layer renders all dependent ciphertext immediately and cryptographically inaccessible to any external actor.
Core Characteristics of a CMK
A Customer-Managed Key (CMK) is the cryptographic anchor of a sovereign data strategy. It transfers ultimate control over data access from the infrastructure provider to the data owner by ensuring the plaintext encryption key exists exclusively within the customer's logical and physical security boundary.
Full Lifecycle Control
The defining characteristic of a CMK is that the customer, not the cloud provider, governs the entire cryptographic lifecycle. This includes:
- Key Generation: Created inside a customer-controlled Hardware Security Module (HSM) or key management server.
- Rotation: Automated periodic replacement of cryptographic material without provider intervention.
- Revocation: The ability to instantly destroy the key, rendering all dependent data cryptographically inaccessible (crypto-shredding).
- Disablement: Temporarily suspending key access to pause all encryption/decryption operations immediately.
Strict Access Policy Enforcement
A CMK is governed by a resource-based policy document defined and managed exclusively by the customer. This policy enforces the principle of least privilege by:
- Defining which principals (users, roles, services) can administer the key versus use the key.
- Enforcing separation of duties: a user with 'usage' permissions cannot delete or modify the key's schedule.
- Requiring explicit authorization for cross-account access, preventing the cloud provider's administrative root accounts from decrypting data.
- Integrating with external authorization systems to mandate just-in-time approval workflows before key usage.
External Key Store Origin
For true sovereignty, the CMK's authoritative copy must reside outside the cloud provider's default infrastructure. This is achieved by:
- External Key Store (XKS): The key material is generated and stored in an on-premises HSM or a sovereign cloud HSM.
- Proxy Architecture: The cloud service communicates with the external HSM via a secure, authenticated API to request cryptographic operations.
- No Key Export: The private key material never leaves the customer's HSM boundary; only the results of cryptographic operations are returned.
- This architecture ensures that even if the cloud's control plane is compromised, the key material remains physically isolated.
Envelope Encryption Integration
CMKs rarely encrypt bulk data directly due to performance constraints. Instead, they operate within an envelope encryption hierarchy:
- Data Encryption Keys (DEKs) are generated locally to encrypt the actual data at high speed.
- The CMK acts as a Key Encryption Key (KEK) that wraps (encrypts) the DEK.
- This creates a secure, efficient system where the CMK protects a hierarchy of thousands of data keys.
- Rotating the CMK only requires re-wrapping the DEKs, not re-encrypting petabytes of stored data, enabling seamless cryptographic agility without massive data processing jobs.
Auditability and Tamper-Proof Logging
Every operation involving a CMK generates an immutable audit record, providing the forensic trail required for regulatory compliance. Key logging characteristics include:
- Write-Once-Read-Many (WORM) storage for all key access logs to prevent tampering.
- Recording of every Encrypt, Decrypt, ReEncrypt, and Rotate API call, including the requesting principal and source IP.
- Integration with Security Information and Event Management (SIEM) systems to trigger real-time alerts on anomalous key usage patterns.
- This log provides non-repudiation, proving definitively who accessed the key and when, which is critical for data lineage and provenance metadata verification.
Crypto-Shredding for Instant Data Deletion
A CMK provides a unique security property known as crypto-shredding, which is a highly reliable method for secure data deletion in distributed systems. The process works as follows:
- Instead of attempting to reliably overwrite every replica of a data object across a distributed storage cluster, the data owner simply revokes and deletes the CMK.
- All data encrypted under that CMK, and its derived DEKs, instantly becomes indecipherable ciphertext.
- This is functionally equivalent to deletion but is instantaneous and verifiable via the key management audit log.
- This technique is particularly powerful for enforcing data residency requirements by ensuring that data which accidentally replicated to a non-compliant region is rendered permanently inaccessible.
CMK vs. Provider-Managed Keys vs. HYOK
Comparison of key ownership, control, and security boundaries across the three primary cloud encryption key management strategies.
| Feature | Provider-Managed Keys | Customer-Managed Key (CMK) | Hold Your Own Key (HYOK) |
|---|---|---|---|
Key Generation Location | Cloud provider HSM | Cloud provider HSM (customer-initiated) | Customer on-premises HSM |
Key Storage Location | Provider-managed key store | Provider HSM, isolated per customer | Customer-owned HSM only |
Key Exportability | |||
Provider Access to Plaintext Key | |||
Customer Controls Key Lifecycle | |||
Automatic Key Rotation | |||
Revocation Latency | < 1 second | < 1 second | Depends on HSM availability |
Typical Use Case | Default storage encryption | Regulated workloads requiring auditability | Sovereign data with zero provider trust |
Frequently Asked Questions
Explore the critical technical and operational questions surrounding Customer-Managed Keys, the cornerstone of cryptographic sovereignty in sovereign AI infrastructure.
A Customer-Managed Key (CMK) is a cryptographic key whose entire lifecycle—including generation, rotation, access policy, and storage—is fully controlled by the data owner within their own sovereign boundary, not by the cloud provider. Unlike provider-managed keys, a CMK ensures the cloud provider has no technical ability to access the plaintext data. The mechanism relies on a strict separation of duties: the cloud service holds the encrypted data, but the customer holds the key in an external, customer-controlled Hardware Security Module (HSM) or Key Management Service (KMS). When a service needs to decrypt data, it must make an authorized request to the customer's KMS. The KMS validates the request against the customer's defined Identity and Access Management (IAM) policies before performing the cryptographic operation, logging every access attempt in an immutable audit log. This architecture is fundamental to Hold Your Own Key (HYOK) strategies, ensuring that even if a subpoena is served on the cloud provider, the data remains inaccessible without the customer's explicit cryptographic authorization.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
A Customer-Managed Key (CMK) is the cornerstone of a sovereign encryption strategy. The following concepts define the technical and operational landscape surrounding full key lifecycle control.
Hold Your Own Key (HYOK)
An encryption architecture where the cryptographic key material is generated and stored entirely within the customer's on-premises or sovereign Hardware Security Module (HSM). Unlike CMK models where the key might be imported into a cloud provider's boundary, HYOK ensures the key never leaves the customer's physical custody. The cloud provider performs cryptographic operations by sending a request to the external HSM, which returns the result without ever exposing the key.
Hardware Security Module (HSM)
A dedicated, tamper-resistant hardware appliance that safeguards and manages digital keys for strong authentication and provides cryptoprocessing. For a true CMK architecture, the HSM must be FIPS 140-2 Level 3 validated and deployed within the customer's sovereign boundary. It performs all cryptographic operations internally, ensuring that plaintext key material is never exposed to the application or the cloud provider's shared memory.
Envelope Encryption
The standard practice used with CMKs to balance security and performance. A Data Encryption Key (DEK) encrypts the actual data locally, while the CMK (acting as a Key Encryption Key, or KEK) wraps the DEK. This allows large datasets to be encrypted efficiently without constantly calling the HSM. The wrapped DEK is stored alongside the ciphertext, ensuring the data remains inaccessible without the sovereign-controlled CMK.
Key Rotation Policy
An automated lifecycle management rule that generates a new version of the CMK at a defined interval (e.g., annually) without re-encrypting the underlying data. The new key version is used for future encryption operations, while older versions remain available for decryption of legacy ciphertext. This limits the blast radius of a potential key compromise and satisfies cryptoperiod requirements defined in NIST SP 800-57.
Bring Your Own Key (BYOK)
A precursor to full CMK control where the customer generates a key in their own HSM and securely imports a copy into the cloud provider's key management service. While the customer controls the key origin, the cloud provider technically holds a copy within its infrastructure. This contrasts with a pure CMK model where the key is generated and stored exclusively inside the customer's sovereign boundary, often using an external key store proxy.
External Key Store (XKS)
A cloud provider API proxy that allows a CMK stored in an external, sovereign HSM to be used for encrypting resources in the cloud without ever copying the key material into the provider's infrastructure. When a cloud service needs to encrypt data, it calls the XKS endpoint. The XKS forwards the request to the sovereign HSM, which performs the operation and returns the ciphertext. This is the critical architectural component for enforcing data plane isolation.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us