Customer-Managed Keys for AI: What They Are and When You Need Them
2026-11-22

A customer-managed key (CMK) is an encryption key you control instead of one your AI provider controls. You decide who can use it, when it rotates and when it is switched off. For an AI service, that decides who can read the data it stores: your prompts, files, memory and fine-tuning material. The practical question is not whether the encryption is strong, because it usually is. It is who holds the key, and whether the setup around it is one you can actually run. If you want a private AI assistant without running key infrastructure yourself, a dedicated, encrypted, managed server such as the ones we host for OpenClaw gets you most of the privacy benefit with none of the key-vault work.
TL;DR
- A customer-managed key is a key you control, usually stored in the cloud provider's key service. A provider-managed key is controlled by the provider.
- "Bring your own key" (BYOK) is a variant of CMK: you generate the key yourself and import it. It also gets used loosely to mean pasting your own API key into an AI tool, which is a different thing.
- A CMK gives you a revocation switch and an audit trail. It does not stop the provider from decrypting data while the key is in use inside its own systems.
- AES-256 is not in danger from the recent AI cryptanalysis headlines, so key length is not the reason to choose a CMK.
- Most individuals and small teams are better served by a private, dedicated, encrypted deployment than by running a key vault they must maintain.
Table of Contents
- What customer-managed keys actually are
- Two meanings of "bring your own key" in AI
- What a CMK protects in an AI service, and what it doesn't
- Does AI cracking AES-256 change the picture?
- Do you need a CMK? A quick decision guide
- How to set up a customer-managed key (the short version)
- Why a managed, dedicated server covers what most people need
- Our perspective
- Get a private OpenClaw assistant without the key-vault work
- FAQ
- Sources
What customer-managed keys actually are
Encryption at rest means data is scrambled on disk. Whoever holds the key can unscramble it. That makes the key, not the cipher, the thing worth arguing about.
There are three common arrangements:
- Provider-managed keys. The provider creates, stores and rotates the key. You do nothing. This is the easiest option, but the provider keeps the potential to access the key, as the Cloud Security Alliance notes in its 2026 overview of key responsibility models.
- Customer-managed keys. The key lives inside the provider's key management service or hardware security module (HSM, a tamper-resistant device for storing keys), but you direct its lifecycle: creation, permissions, rotation, disabling. Tenable's analysis describes it as a key you create, manage and own, with control over who can use it and what they can do, available across AWS, Azure and Google Cloud.
- Bring your own key (BYOK). A specific kind of CMK where you generate the key material outside the provider, import it securely and stay responsible for your own copy, according to the same Cloud Security Alliance guidance.
The same guidance also describes a fourth step on the spectrum, hold your own key (HYOK), where keys never leave your own key system. It is a specialist setup for sovereign or highly regulated workloads, and rarely what a person searching this topic needs.
Two meanings of "bring your own key" in AI
The phrase causes confusion because AI tools use it in two ways.
Encryption BYOK is the one above: you import an encryption key into a cloud service so you control the data's lock.
API-key BYOK is when an AI app asks you to paste your own model-provider API key, so usage is billed to your account. That key is a credential, a password for calling a model. It does not encrypt your stored data, and nothing about it gives you custody of anything at rest.

If you are comparing AI tools, make sure you know which one a vendor means. If your interest is the second kind, our guide to API key security covers how to store, limit and rotate those keys.
What a CMK protects in an AI service, and what it doesn't
In a typical cloud AI service, a customer-managed key sits at the top of a small chain. Microsoft's documentation for its AI services describes the pattern: your key in the key vault encrypts a data encryption key, and that one encrypts the actual data, so the raw key material is never handed to the AI service. Services like this commonly cover stored content such as uploaded files, fine-tuned models and indexes.
What it brings you:
- Independent revocation. Disable the key and the data it protects becomes unreadable to the service.
- Separation of duties. The people who administer the AI service are not automatically the people who control the key.
- Your own audit trail of key events, useful when someone asks who could decrypt what.
- Faster incident response, since revoking a key is quicker than migrating data.
The Cloud Security Alliance lists these benefits but adds a point many buyers miss: BYOK does not mean the provider cannot access your data. As long as the key is used inside the provider's key service, the provider's systems can decrypt the data. A CMK is a control lever and an audit mechanism. It is not a way to make an AI provider blind.
Two other limits matter in practice:
- Data in use. A model has to read your prompt in plain form to answer it. At-rest encryption protects the stored copy, not the moment of processing.
- Operational risk. A deleted key or a wrong access policy can take your own data offline. Microsoft's setup walkthrough for Azure OpenAI requires soft delete and purge protection on the key vault for exactly this reason, and requires the vault and the AI resource to share a region and directory tenant.
Does AI cracking AES-256 change the picture?
This is a common worry, and it comes from a real headline. In August 2026, Live Science reported a self-published study in which Claude helped researchers find a key-recovery attack on a seven-round, reduced version of AES, 200 to 800 times faster than the best-known attack. The same report stresses that the technique does not work against the full AES used to protect real systems, and a cryptographer quoted there says there is nothing you need to change.
The lesson for CMK decisions: this is a custody question, not a cryptography question. Whether the key is yours or the provider's, the cipher is the same. Pick a CMK for control, audit and revocation reasons, not because you fear the algorithm.
Do you need a CMK? A quick decision guide
Ask these five questions.
- Does a contract, regulator or auditor require you to hold the key? Some regulatory or contractual requirements for sensitive or sovereign workloads explicitly expect customer ownership of keys. If yours does, a CMK or BYOK setup is the right tool, and you should involve your compliance lead or security adviser.
- Do you need to be able to cut off access on your own? That is the revocation lever.
- Do you need your own record of key activity? That is the audit trail.
- Do you have someone who will run it? Key rotation, access policies and recovery planning are ongoing work.
- Is the data you feed the assistant sensitive enough to justify that work? Personal notes, a student's study material or routine automation rarely are. Client files, contracts and credentials often are.
If you answered yes to the first three and have a person for the fourth, build the CMK setup. If you answered no to most, the goal is still real: a private assistant whose data is not mixed with strangers'. That is a deployment question.
How to set up a customer-managed key (the short version)
The exact screens differ by cloud, but the routine is the same everywhere:
- Create or import a key in the provider's key vault or managed HSM. Import it if you want BYOK.
- Turn on deletion safeguards, such as soft delete and purge protection, before attaching the key to anything.
- Grant the AI resource's identity permission to use the key, and only that: wrap and unwrap, nothing broader.
- Attach the key to the AI resource in its encryption settings, keeping vault and resource in the same region.
- Monitor key events and set an alert for failed access attempts.
- Rotate on a schedule and document how to recover if the key is disabled by mistake.
- Test the recovery path, including restoring from backup, before the data matters.
Our walkthrough of CMK steps for encryption at rest goes deeper on sequencing, and the article on verifying encrypted backups shows how to prove a restore works.
Why a managed, dedicated server covers what most people need
Most readers of this topic are not a bank. They are a developer who wants an assistant running 24/7, a professional automating routine tasks, a student, or a small team connecting an AI agent to chat tools. For them, the risks that matter are shared infrastructure, unclear data handling and the cost of setup mistakes.
A dedicated server addresses the first, and a managed one addresses the third. ClawBase hosts OpenClaw, the open-source personal AI assistant, on dedicated, encrypted cloud servers with one-click deployment, so you do not need sysadmin skills or server maintenance. Daily encrypted backups and automated updates are part of the service, and your assistant keeps persistent memory on that server. You can read more about the trade-offs of encrypted AI hosting, and about how backups protect models and keys.

This is the custody-versus-complexity trade in plain terms. A self-run key vault gives you levers, and you carry the work. A managed dedicated server gives you a private environment and removes the work.
Our perspective
> We build on one observation: most people who ask about customer-managed keys are really asking whether they can trust where their AI assistant keeps its memory, files and credentials. The key is one answer. It is not the only one, and it is rarely the easiest.
>
> An AI agent is different from a chat window. It remembers, it reads your files, it connects to Telegram, Discord, Slack or WhatsApp, and it runs around the clock. That makes the environment it lives in the main security decision. Our approach is to give every customer a dedicated, encrypted server, so the assistant's data is not pooled with anyone else's, and to handle updates, backups and uptime ourselves, with a 99.9% uptime target.
>
> We also think non-technical users should not have to learn key vault policies to get a private assistant. Sysadmin work is where setups go wrong: a missed update, an exposed port, a backup nobody tested. Taking that off your hands is the point of managed hosting, and it is why one click is enough to deploy.
>
> Whatever you choose, ask the same questions of any AI host: where does my data live, who can read it, how is it backed up, and how do I get it out? Our articles on AI server encryption and permission-aware file access show how we think through each.
>
> *Iosif Peterfi*
Get a private OpenClaw assistant without the key-vault work
ClawBase deploys OpenClaw on a dedicated, encrypted server in one click, with over 50 supported AI models, multi-model routing, browser relay and connections to Telegram, Discord, Slack and WhatsApp. Plans are billed monthly or annually: LITE is $16 per month or $199 per year, PRO is $33 per month or $399 per year, and MAX is $66 per month or $799 per year. The entry plan includes a 7-day free trial, and you can pay by credit card or cryptocurrency. See the plans and pricing, or follow the setup tutorial to see how a first agent comes together.

FAQ
What is a customer-managed key (CMK)?
It is an encryption key that you control rather than your cloud or AI provider. It usually sits in the provider's key service, but you set who can use it, when it rotates and when it is disabled. It is distinct from a provider-managed key, where the provider handles all of that.
Is bring your own key (BYOK) the same as a CMK?
BYOK is a type of CMK. You generate the key outside the provider, import it, and keep your own copy. A plain CMK is generated inside the provider's key service. In AI apps, BYOK is also used to mean pasting your own model API key, which is a credential for billing and access, not a way of encrypting stored data.
Can the AI provider still read my data if I use a CMK?
While the key is in use inside the provider's key service, the provider's systems can decrypt the data to process it. A CMK gives you revocation, separation of duties and an audit trail. It does not make the provider unable to access data you have authorized it to use.
Can AI crack AES-256?
No evidence shows that. The widely reported 2026 research concerned a reduced seven-round version of AES, and the report says the technique does not apply to the full cipher used in real systems. Key length is not a reason to change your setup.
Do I need a CMK for a personal AI assistant?
Usually not. A CMK suits teams with a contractual or regulatory requirement to hold keys and someone to administer them. For personal or small-team use, a dedicated, encrypted, managed deployment gives you a private assistant without running key infrastructure. If a regulation or contract applies to you, check it with your compliance lead.
Sources
- Choosing a Cloud Key Management Model, Cloud Security Alliance
- Customer Managed Encryption Keys in AWS, Azure, and GCP, Tenable
- Azure OpenAI: Configuring customer managed keys for encryption, Microsoft Tech Community
- AI found a weakness in one of the world's most studied encryption systems, Live Science