Join our Newsletter — 33% off our NHI Course
Home› Guides› BYOK, HYOK and External Key Management Guide: Choosing…
Guide Secrets Management

BYOK, HYOK and External Key Management Guide: Choosing Key Custody for Cloud and SaaS

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 15 min read
On this page

"Bring your own key" is often bought as if it kept data away from the cloud provider, when in most designs the provider still holds and uses the key, and the options that genuinely keep keys outside make the customer responsible for the availability of every encrypted service. Sovereignty requirements, regulators and customer contracts are pushing more organisations towards customer-controlled keys for cloud and SaaS, and the terms CMK, BYOK, HYOK, external key store and client-side encryption are used loosely. This guide sets out the custody models precisely, what each protects against and what it does not, how external key managers connect to AWS KMS, Google Cloud KMS and Microsoft services, the operational risks (latency, outages, crypto-shredding by accident), and how to choose and roll out a model. It is for security architects, cryptography and platform teams, and risk owners. Key lifecycle basics are in the Cryptographic Key Management Guide; this page covers who holds the key.

Key takeaways

  • Five custody models, not two: provider-managed keys, customer-managed keys in the provider's KMS, imported key material (BYOK), external key stores (HYOK) and client-side encryption differ in who can use the key and what breaks when you revoke it.
  • BYOK proves provenance and enables revocation, not exclusion: imported key material still runs inside the provider's HSMs, and the provider's service still decrypts data to process it.
  • HYOK moves availability onto you: with an external key store every decrypt call reaches your key manager; if it is down or slow, dependent services fail, and AWS itself warns that for most workloads the burden and availability risk exceed the benefit.
  • Client-side encryption is the only model that keeps plaintext from the SaaS provider, and it removes server-side features such as search, eDiscovery, DLP and AI assistants for that data, so reserve it for a small, defined set.
  • The key manager and its proxy credentials are crown-jewel identities: whoever can disable, delete or reconfigure them can make your data permanently unreadable.

The key custody spectrum

ModelWhere key material livesWho performs encryptionWhat you controlMain trade-off
Provider-managed keysProvider KMSProvider serviceNothing beyond service settingsZero effort, no independent revocation
Customer-managed key (CMK) generated in provider KMSProvider KMS or cloud HSM, non-exportableProvider service using your keyKey policy, rotation, disable, delete, audit of every useProvider still operates the HSMs; good audit and revocation
BYOK (imported key material)Generated in your HSM, imported into provider KMSProvider serviceEntropy source, a copy outside the provider, expiry and deletion of the imported materialYou are responsible for durability of the original; provider still uses the key
HYOK / external key storeYour key manager outside the provider, never sharedProvider service, which must call your key manager for each operationEvery decrypt can be refused, logged or justified; revocation is immediateLatency, outage and support burden move to you
Client-side encryption (CSE, DKE)Your key service; data encrypted before it reaches the providerClient applicationProvider never sees plaintextServer-side processing (search, indexing, AI, co-authoring) is lost

NIST SP 800-57 Part 1 Rev. 5 (Recommendation for Key Management: Part 1, General, May 2020) frames the questions that apply to every model: which entities are authorised to use a key, how it is protected through its lifecycle, and how it is recovered or destroyed. Custody choices answer the first of those questions for the cloud.

What BYOK actually provides

With BYOK you generate key material in your own HSM and import it, wrapped, into the provider's KMS. On Azure Key Vault, for example, the provider creates a Key Exchange Key (an RSA-HSM key of 2048, 3072 or 4096 bits with import-only operations) in the target vault, your HSM vendor's tool wraps the target key with it (Microsoft prefers the PKCS#11 mechanism CKM_RSA_AES_KEY_WRAP) into a .byok transfer file, and the key is imported so it never exists in plaintext outside an HSM. AWS KMS supports importing material for symmetric, most asymmetric, HMAC and multi-Region keys.

  • Provenance: you can show the key came from an entropy source and HSM you approve, which some regulators and contracts require.
  • Independent revocation: AWS lets you set an expiry on imported material or delete it immediately and reimport it later, whereas scheduled deletion of a KMS key has a 7 to 30 day waiting period and cannot be undone.
  • Escrow and exit: you hold the original key, but AWS states that KMS ciphertext cannot be decrypted outside KMS even with imported material, so BYOK does not give you an offline way to read cloud-encrypted data.
  • Your responsibility: AWS states that you remain responsible for the key material and should keep the original outside AWS for durability and recovery. Losing your copy after deleting the imported material makes the data unrecoverable.
  • What it does not change: the provider's HSMs and services still use the key whenever data is accessed. BYOK does not stop a provider insider, a compelled disclosure to the provider, or a compromise of the provider service from reaching plaintext while the key is enabled.

HYOK and external key stores in the major clouds

AWS KMS external key store (XKS)

An external key store is a KMS custom key store backed by an external key manager you own and run outside AWS, a model AWS explicitly calls hold your own keys. The architecture has three parts: your external key manager (physical or virtual HSM or software, generating 256-bit AES keys), an XKS proxy you supply that translates KMS requests to your key manager, and the external key linked to a KMS key by its XksKeyId. KMS reaches the proxy over a public endpoint or through an Amazon VPC endpoint service, over TLS 1.2 or later, authenticating with SigV4 proxy credentials that are separate from IAM. The proxy API has four calls: Encrypt, Decrypt, GetHealthStatus and GetKeyMetadata, with the specification published on GitHub.

  • Double encryption: data is encrypted first with AWS KMS key material in FIPS 140-3 Level 3 HSMs, then with your external key, so neither AWS nor the external key holder can decrypt alone.
  • Revocation: disconnecting makes the keys unavailable until restored; permanent revocation crypto-shreds all ciphertext under that key, apart from data keys AWS services have briefly cached.
  • Constraints: symmetric encryption keys only (no asymmetric, HMAC, imported material, automatic rotation or multi-Region keys), up to 10 custom key stores per account and Region, and AWS recommends a round trip of 35 ms or less to the key manager.
  • AWS's own caution: AWS describes external key stores as a major departure from the shared responsibility model and states that "for most workloads, the additional operational burden and greater risks to availability and performance will exceed the perceived security benefits."

Google Cloud External Key Manager (Cloud EKM)

Cloud EKM uses keys in a supported external key manager (Google lists Fortanix, Futurex and Thales) either through CMEK integrations or the Cloud KMS API. External key material is never shared with Google; for symmetric keys Cloud KMS adds an internal layer, and both are needed to decrypt. Cloud EKM contacts the external manager for every request and does not cache keys.

  • Key Access Justifications: each request carries a reason code that your key manager can log and use to allow or deny the request, which is the closest any major cloud comes to per-request policy at the customer's key manager.
  • Connectivity and management: over the internet (manually managed keys only) or over a VPC, where keys can be manually managed or coordinated, with Cloud KMS driving creation, rotation and destruction in the external manager.
  • Failure behaviour: an unavailable key returns FAILED_PRECONDITION, dependent services fail, rotating to a new version does not help if the current version is unreachable, and Google documents that a Spanner database can be deleted automatically after 30 consecutive days of key unavailability. Google support cannot fix the external side, so a support contract with the key manager partner is required.

Microsoft and SaaS client-side models

  • Double Key Encryption (DKE): Microsoft Purview content protected with two keys, one in a DKE service you host and one in Azure, so viewing needs both. Microsoft suggests a typical split of about 80% non-sensitive data, 15% sensitive data protected with Microsoft-managed keys or BYOK, and about 5% highly sensitive data as the DKE candidate. DKE content is not available to Copilot, eDiscovery, content search and indexing, mail flow rules that inspect attachments, Office for the web or co-authoring. It is included in Microsoft 365 E5. See the Microsoft Purview Information Protection Guide.
  • Google Workspace client-side encryption: files and email encrypted with keys from your external key service, with users authenticated through your identity provider, which Google describes as encryption Google servers and third parties cannot decrypt. It is available in Frontline Plus, Enterprise Plus, Education Standard and Education Plus. See the Google Workspace Security Guide.

Threats each model addresses

ThreatCMKBYOKHYOK / external storeClient-side
Stolen disks or storage snapshots at the providerYesYesYesYes
Your own cloud admin misusing data (with separation of key and data roles)Partly: key policy separationPartlyYes: key manager under a separate teamYes
Need to cut off access quickly at contract end or in a disputeDisable or delete keyDelete imported materialDisconnect or revoke at your managerRevoke at your key service
Provider insider or compelled access to the provider while key enabledNoNoReduced: every use passes your manager and can be logged or refusedYes
Compromise of the provider's service processing your dataNoNoNo: the service decrypts with your permissionYes, for encrypted content
Ransomware or insider deleting your keysDeletion waiting periodRisk if your original copy is lostHigh risk: your key manager is the single point of failureHigh risk without key escrow

Decision guidance

  • Default to CMK in the provider KMS: it gives policy control, audit of every key use and fast revocation with little operational risk. Most compliance requirements for "customer-managed keys" are met here.
  • Add BYOK when provenance or escrow is required: a regulator, contract or internal policy requires keys generated in your HSM, or you need the ability to remove key material immediately and restore it later.
  • Use HYOK only for a defined, regulated subset: where a law, regulator or customer requires that the provider cannot use keys without a decision at your key manager, and you can run a highly available, low-latency key service with partner support. Check current regulatory requirements with counsel; this page does not interpret specific laws. See the Data Sovereignty and Residency Guide.
  • Use client-side encryption for crown jewels in SaaS: board papers, M&A, key research, where losing search and collaboration features is acceptable.
  • Small organisations: CMK with strict key policies and alerting is usually the right answer; HYOK requires 24x7 operations most small teams do not have.
  • Large or regulated organisations: tier data, apply HYOK or client-side encryption to the top tier only, and run the external key manager as a tier 0 service with its own team, change control and DR. For the cloud-specific decision see the Cloud Customer-Managed Keys and BYOK/HYOK Decision Guide.

Operating external key management safely

  1. Classify and scope: list the services and datasets that need each custody model, and the business owner who accepts the availability risk.
  2. Design for availability: clustered key managers across sites, redundant proxies behind load balancers, private connectivity (VPC endpoint service or VPC-based EKM) and latency within the provider's guidance (AWS suggests 35 ms or less). NIST SP 800-53 SC-12(1) expects key availability to be maintained when users lose keys.
  3. Protect the identities: the XKS proxy SigV4 credential, EKM service accounts, key manager administrators and HSM security officers. Use quorum or dual control for destructive operations, rotate proxy credentials (AWS exposes an XksProxyCredentialAge metric for this) and keep key manager admins separate from cloud admins.
  4. Escrow and backup: back up key manager contents with HSM-wrapped backups at a separate site; test restoring them. For BYOK, keep the original material under dual control.
  5. Write revocation runbooks: distinguish temporary suspension (disconnect) from permanent destruction, require multi-person approval for the latter, and record which datasets each key protects so the impact of revocation is known in advance.
  6. Pilot: start with one non-critical workload; measure latency, error rates and recovery from a simulated key manager outage before onboarding production.
  7. Rollback: keep the ability to re-encrypt to a CMK in the provider KMS (for example by re-encrypting data keys or migrating storage) and test it, so a failing external key service is not a permanent commitment.

Hardware choices are covered in the HSM Deployment and Operations Guide; the key manager interoperability standard most products support is OASIS KMIP.

Detection and measurement

Log at both ends. The provider records every KMS call (for example AWS CloudTrail, Google Cloud Audit Logs) and the external key manager records the requests it served, refused or justified. Alert on key disable, schedule-deletion and delete-imported-material events, changes to key policies or key manager administrators, spikes in refused or failed decrypts, Key Access Justification codes outside your allowed set, and proxy health moving to Degraded or Unavailable.

MetricTarget
External key manager availability as seen by the provider (successful requests / all requests)Equal to or better than the most demanding dependent service SLA
P99 latency of encrypt and decrypt through the proxyWithin provider guidance, for example 35 ms round trip for AWS XKS
Keys with tested backup and restore in the last 12 months100%
Destructive key operations performed without multi-person approval0
Datasets mapped to their protecting key and custody model100% of the scoped tier
Proxy and service credentials older than rotation policy0

Lessons from incidents

Custody only helps if keys and data are genuinely separated. In the GoTo breach, attackers took encrypted backups for five products from a shared cloud storage service together with an encryption key for part of them, and GoTo said the key allowed decryption of some of the data. Encryption at rest protected nothing for that portion because the key was reachable from the same compromise. Whatever custody model you choose, the identities that can read encrypted data and the identities that can use the key should be different, with different credentials and logging.

Common failure patterns

  • Buying BYOK to exclude the provider: imported keys are still used by the provider's services; the requirement was really HYOK or client-side encryption.
  • HYOK on a single key manager: one appliance, one site, no partner support contract; a maintenance window takes down every dependent cloud service.
  • Accidental crypto-shredding: deleting imported material or an external key without knowing which datasets depended on it, or letting a database be deleted after prolonged key unavailability.
  • Same admins for keys and data: cloud administrators who can also change key policies or key manager settings, so separation exists only on paper.
  • Client-side encryption on too much data: users lose search, DLP and collaboration, then route around it with unencrypted copies.
  • Unrotated proxy credentials: the credential that lets the provider call your key manager is static and shared, an NHI nobody owns.

Framework mapping

FrameworkReferenceRelevance
NIST SP 800-57 Part 1 Rev. 5Key management general recommendationsAuthorised use, protection and lifecycle of keys
NIST SP 800-53 Rev. 5SC-12 Cryptographic Key Establishment and Management; SC-12(1) Availability; SC-13 Cryptographic Protection; SC-28(1) Cryptographic Protection; AU-12 Audit Record Generation; SR-3Key custody, availability, encryption at rest, logging, supply chain controls for providers
NIST CSF 2.0PR.DS-01; GV.SC-05Data at rest protected; supply chain requirements in provider contracts
ISO/IEC 27001:2022 Annex AA.8.24 Use of cryptographyRules for cryptography including key management
CIS Controls v8.13.11 Encrypt sensitive data at restEncryption at rest with managed keys

Practitioner checklist

  • Define the five custody models in policy and map every cloud and SaaS dataset tier to one of them.
  • Default to CMK with strict key policies; justify each BYOK, HYOK and client-side use in writing.
  • For BYOK, keep the original key material under dual control with tested restore.
  • For HYOK, run clustered key managers and redundant proxies with private connectivity and partner support.
  • Separate key administrators from data and cloud administrators; require multi-person approval for destructive key operations.
  • Rotate proxy and service credentials and treat them as tier 0 non-human identities.
  • Log key use at the provider and the key manager; alert on disable, delete, policy change and refused requests.
  • Document which datasets each key protects before any revocation, and rehearse suspension and recovery.
  • Pilot each new integration and test the rollback path to a provider-held CMK.

Standards and references

Related NHI Mgmt Group resources: Cryptographic Key Management Guide · Cloud Customer-Managed Keys and BYOK/HYOK Decision Guide · HSM Deployment and Operations Guide · Data Sovereignty and Residency Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.