What is bring your own key (BYOK)?

Bring your own key (BYOK) is a model where a customer supplies the key a cloud service uses to protect its data. This page explains how it works in Azure Key Vault and AWS KMS and what it means for post-quantum migration.

On this page

What is bring your own key (BYOK) and where does it apply?

Bring your own key (BYOK) is a model in which the customer generates or supplies the key that a cloud service uses to protect its data, rather than accepting a key the provider creates and holds. The customer creates the key material in its own environment, wraps it for transfer, and imports it into the service, so the provider uses the customer's key without the customer having to hand over control of the key lifecycle. The sources listed on this page describe BYOK for Azure Key Vault and AWS KMS, and the mechanics below apply to those two services only.

Cloud architects, buyers and reviewers meet the term in vendor documents, tenders and audit requests, where it usually appears as a requirement to show that the customer controls its keys. In Azure Key Vault, the process centers on a Key Exchange Key that must be an RSA-HSM key created in the receiving vault and not exportable, with the target key imported under it. In AWS KMS, the customer creates a KMS key with origin EXTERNAL, downloads a wrapping public key and import token, and imports its own key material. Reviewers should confirm which service, tier and hardware security module their environment uses, because Azure lists supported HSMs and minimum versions that differ by product.

BYOK describes how keys are supplied and controlled, not a compliance outcome. Neither the sources listed on this page nor this glossary treat BYOK as a certification, and it does not by itself satisfy any audit requirement. Before relying on it, confirm with your auditor and the vendor which controls, logs and key-deletion behavior your assessment needs, including whether imported material expires and must be reimported, and which CloudTrail entries record each import step.

Which names and key types do BYOK documents use?

This table lists the names and key types that Azure Key Vault and AWS KMS documentation use for bring your own key (BYOK) imports, with the sizes or curves each platform allows. Use it to check whether a target key or wrapping key in a vendor document matches what the platform accepts. The main takeaway is that neither platform's importable list includes ML-KEM or ML-DSA in the sources reviewed.

Platform and itemAllowed types or sizesRequirement or note
Azure target key, RSA-HSM2,048, 3,072 or 4,096 bitsImported into an HSM-protected key vault (Azure Key Vault BYOK, updated 8 July 2026)
Azure target key, EC-HSMP-256, P-384 or P-521 curvesSame source; check the curve your application expects
Azure target key, OCT-HSM128, 192 or 256 bitsManaged HSM only, per the Azure BYOK article
Azure Key Exchange Key (KEK)RSA-HSM, 2,048, 3,072 or 4,096 bitsCreated with the import operation in the receiving vault and not exportable
AWS importable symmetric keySYMMETRIC_DEFAULT, 256-bit materialListed under importable key specs in AWS KMS imported key material documentation
AWS importable HMAC keysHMAC_224 through HMAC_512Same AWS importable list; confirm the exact spec before import
AWS importable RSA keysRSA_2048, RSA_3072, RSA_4096Same AWS importable list
AWS importable ECC keysECC_NIST_P256, P384, P521, ECC_SECG_P256K1, ECC_NIST_EDWARDS25519Same AWS importable list; ML-KEM and ML-DSA are not included

Where do practitioners meet BYOK in cloud and HSM documents?

Bring your own key shows up in cloud provider documentation, hardware security module compatibility lists, procurement requirements and audit questions. Each place asks a slightly different question about who generates, holds and can revoke the key material.

Azure Key Vault BYOK documentation

Microsoft's BYOK article describes importing or generating a key in a hardware security module so that it never leaves the HSM boundary. Check the prerequisites first: Azure CLI 2.1.0 or later, a Key Vault Premium or Managed HSM, and an HSM from the supported list. The Key Exchange Key must be an RSA-HSM key created with the import operation and marked non-exportable. Confirm the firmware on your device, since the list names specific minimum versions for Thales Luna 7, Marvell LiquidSecurity and Yubico YubiHSM 2.

Azure BYOK article

Supported HSM lists

A supported HSM list tells you which devices a cloud provider has documented for a given key import flow. Read the entry as a compatibility statement for the named model and firmware version, not as a certification or endorsement of the vendor. The sources listed here name Thales Luna 7 firmware 7.3 or newer, Marvell LiquidSecurity firmware 2.0.4 or later or 3.2 or newer, and Yubico YubiHSM 2. Ask your HSM vendor to confirm that your exact model and firmware are covered before you commit to a design.

AWS KMS imported key material

AWS KMS describes importing key material in four steps: create a KMS key with origin EXTERNAL, download a wrapping public key and import token, encrypt your key material, and import it. A key with imported material moves from PendingImport to Enabled after a successful import. If you set an expiration time, AWS KMS deletes the material on expiry, and you must reimport the same material to restore use. Plan for that reimport in your key lifecycle process, and check the importable key specs, since the list does not include ML-KEM or ML-DSA.

AWS KMS import docs

Vendor tenders asking for customer-held keys

Tender documents often ask whether the customer can generate, hold or revoke the keys that protect its data in a vendor's service. Treat these questions as requirements to answer in writing, not as checkboxes. Ask the vendor to state where key material is generated, whether it can be exported, who can disable or revoke it, and whether the service supports customer-supplied keys for the algorithms you need. Record the answers in the contract so they can be checked later.

Audit requests on key control

Auditors and assessors ask who controls key material, and they expect evidence rather than a description. A useful answer names the people or roles that can create, import, rotate and delete keys, and shows the logs that record those actions. AWS KMS states that CloudTrail records key creation, wrapping key downloads, material imports and deletions. Prepare these records before the audit starts, and check that split knowledge and dual control are documented wherever a single person could otherwise act alone.

Split knowledge definition

How does a customer import a key into Azure Key Vault and AWS KMS?

The import sequence wraps key material created outside the cloud service in a key exchange key or wrapping key, so the target key can be placed into a vault or KMS key without the plaintext key leaving the customer's control. The sequence finishes when the imported key is active and ready for use.

  1. Create the key exchange key in Azure

    In Azure, the customer creates a Key Exchange Key (KEK) in the vault that will receive the target key, using the import operation. The KEK must be an RSA-HSM key of 2,048, 3,072 or 4,096 bits and cannot be exported. The customer runs az keyvault key create with --kty RSA-HSM, a --size value from that list, --ops import and the target vault name. The step is done when the KEK appears in the vault with the import operation enabled.

  2. Download the key exchange key

    The customer downloads the KEK's public portion from the vault using az keyvault key download. The downloaded file is what the customer's HSM or key management tooling uses to wrap the target key before transfer. The step is done when the downloaded KEK file is saved in a location the customer controls.

  3. Wrap the target key with the exchange key

    The customer uses its HSM or key management tooling to wrap the target key with the downloaded KEK, producing a byok file. Microsoft's guidance covers supported HSM products and firmware in its BYOK article, so the customer should confirm its HSM appears on that list before proceeding. The step is done when the byok file exists and the target key has not been exported in plaintext.

  4. Import the target key into Azure

    The customer imports the wrapped key into the vault with az keyvault key import and the --byok-file option. For Managed HSM, the command also needs --hsm-name. Target keys can be RSA-HSM, EC-HSM or, for Managed HSM only, OCT-HSM. The step is done when the import command returns the imported key with its identifier and attributes.

  5. Create a KMS key with external origin in AWS

    In AWS KMS, the customer begins by creating a KMS key with origin EXTERNAL. This key has no key material yet and reserves a place for the imported material. The customer should check that the key spec it plans to import appears in AWS's list of importable key specs. The step is done when the new KMS key exists with origin EXTERNAL and is awaiting material.

  6. Download the wrapping public key and import token

    The customer downloads the wrapping public key and the import token for the KMS key. AWS KMS logs this download in AWS CloudTrail. The import token must be used with the import that follows, so the customer should keep the two together. The step is done when the wrapping public key and import token are saved locally.

  7. Encrypt the key material and import it

    The customer encrypts the key material with the wrapping public key, then imports it into the KMS key with the import token. AWS documents RSAES-OAEP for encrypting the material in transit. The import is logged in CloudTrail. The step is done when the import call completes without error.

  8. Confirm the PendingImport to Enabled transition

    After a successful import, the KMS key moves from PendingImport to Enabled. The customer should confirm this state before using the key. An optional expiration time can be set, after which AWS KMS deletes the material, and the same material must be reimported to restore use. The step is done when the key shows Enabled and the expiration setting, if any, is recorded.

Where the customer-held key sits in the import flow

The import path starts in the customer's HSM or key generation environment, where the target key is created or held. The key is then wrapped with a Key Exchange Key (KEK) or a wrapping public key downloaded from the cloud service, so only ciphertext leaves the customer boundary. The wrapped key is transferred to the service and unwrapped inside the service's HSM boundary, where it is used but never exported. Check that the KEK is non-exportable, that the wrapping key type and size match the service's requirements, and that the import event is recorded in audit logs.

Customer-generated key is wrapped, transferred, and unwrapped only inside the service's HSM boundary.

What do NIST and the cloud providers say about post-quantum keys in BYOK?

The sources listed on this page cover post-quantum key handling in two places: the federal key management profile and the cloud key services. NIST SP 800-152, A Profile for U.S. Federal Cryptographic Key Management Systems, is a Final publication dated October 2015. It sets requirements for designing, acquiring, configuring, operating and using federal cryptographic key management systems, and it is based on SP 800-130. It predates the post-quantum standards, so it does not address them directly. For the algorithms themselves, FIPS 203, published 13 August 2024 with status Final, defines ML-KEM with three parameter sets (ML-KEM-512, ML-KEM-768 and ML-KEM-1024). NIST SP 800-227, Recommendations for Key-Encapsulation Mechanisms, was published in final form on 18 September 2025 and covers how KEMs establish shared secrets. Teams building a federal key management profile on top of these should confirm with their assessor which document governs their system.

On the cloud side, AWS KMS says it creates and protects all ML-KEM and ML-DSA keys inside its HSMs, so these keys are generated in the service with CreateKey. The imported key material documentation lists the key specs that can be imported, and that list includes RSA, ECC and HMAC specs but not ML-KEM or ML-DSA. A team planning BYOK for post-quantum keys on AWS should therefore plan for those keys to be generated in KMS rather than supplied by the customer, and should confirm the current import list in the AWS documentation before assuming otherwise. Azure's BYOK article, updated 8 July 2026, describes importing keys into an HSM so they never leave the HSM boundary, and lists RSA-HSM, EC-HSM and OCT-HSM target keys. It does not list post-quantum key types, so confirm support with Microsoft for the key types you need.

Nothing in these sources makes BYOK mandatory. No law or standard named here requires customer-supplied keys for post-quantum cryptography, so BYOK should be justified by your own risk and control requirements. Before committing, ask each provider in writing which post-quantum key types can be created in the service, which can be imported, and what the import procedure and CloudTrail logging look like for them.

What should a migration team check for BYOK keys?

This sequence gives the migration team a checked inventory of every customer-supplied key, a compatibility check against the HSM and service versions in use, and a record of how each key will be imported, expired, reimported and logged. The output is a list of confirmed key types and vendor answers that the team can hand to its security and compliance reviewers. Confirm compatibility for the versions you run before you rely on any step.

  1. Inventory every customer-supplied key

    Start by listing each cloud service and application that uses a customer-supplied key, including the vault, managed HSM and key names, the regions where they live, and the teams that own them. Record whether each key was imported with key material or generated inside the service, because that choice determines what you must replan later. The step is done when the inventory covers every service that encrypts data under a BYOK key and a named owner has signed off on it. Keep this list current, since later steps depend on it.

  2. Check the HSM model and firmware

    For each key that depends on a hardware security module, compare the HSM model and firmware version against the provider's supported list. Microsoft's Azure Key Vault BYOK guidance names supported HSMs such as Thales Luna 7, Marvell LiquidSecurity and Yubico YubiHSM 2, with minimum firmware versions for some of them. Record the exact model and firmware on each side of the import path and flag any that are not on the list. The step is done when every HSM in the inventory is marked supported or flagged for upgrade, and the flagged items have an owner. Confirm compatibility for the versions you run with the vendor before relying on the result.

  3. Confirm key sizes and key types

    Check that each planned or existing BYOK key uses a size and type the target service accepts. In Azure Key Vault BYOK, the key exchange key must be an RSA-HSM key of 2,048, 3,072 or 4,096 bits, and target keys can be RSA-HSM, EC-HSM or, in Managed HSM only, OCT-HSM. In AWS KMS, the importable specs include symmetric 256-bit material, HMAC keys, RSA at 2,048, 3,072 and 4,096 bits, and several ECC curves. Compare each existing key against the accepted list and mark any that do not match. The step is done when every key has a confirmed type and size, and any mismatches have a planned remediation.

  4. Plan expiration and reimport in AWS KMS

    If you import key material into AWS KMS, decide whether each imported key should have an expiration time. AWS KMS deletes the imported material when it expires, and the same material must be reimported to restore use, so the reimport must be scheduled and rehearsed before expiry. Record the expiration setting for each key, the person responsible for reimporting, and where the original key material is held under your own controls. The step is done when every imported key has a documented expiry decision and a reimport runbook that the team has tested in a non-production account.

  5. Confirm which CloudTrail events are logged

    Confirm that AWS CloudTrail records the key lifecycle events your auditors will ask about. AWS KMS states that CloudTrail logs key creation, download of the wrapping public key and import token, import of key material, and deletion of imported or expired material. Check that the trail covers every account and region in the inventory, that the logs are retained for the period your policy requires, and that someone is alerted to unexpected import or deletion events. The step is done when a test import and deletion appear in the trail and the retention settings are recorded.

  6. Ask whether post-quantum keys can be imported

    Put a written question to each vendor asking whether post-quantum key types, such as ML-KEM or ML-DSA, can be imported as customer-supplied key material or must be created inside the service. AWS KMS states that it creates and protects all ML-KEM and ML-DSA keys inside its HSMs and that its import list does not include them, so post-quantum keys there are created with CreateKey. Record each vendor's answer, its date and the document it cites, and ask for the same answer for every other service in the inventory. The step is done when every vendor has answered in writing and the answers are filed with the inventory.

  7. Record the findings for review

    Assemble the inventory, the HSM and firmware checks, the key type confirmations, the reimport plan, the CloudTrail coverage and the vendor answers into a single record for security, compliance and procurement reviewers. Note any item that is unsupported, unconfirmed or pending, and assign an owner and a review date to each one. The record should state which versions were checked and which were not, so that no reader mistakes a partial check for a full one. The step is done when a reviewer who did not run the checks can trace every key to its status and its evidence.

Which BYOK claims and key labels cause confusion in tenders?

Bring your own key is used in vendor documents and tender responses to mean several different things, and the same labels appear across cloud services with different meanings. The four points below are the ones that most often lead to a mismatched assumption about who controls keys, what can be imported, and what has been certified.

BYOK is not customer-run cloud

BYOK describes who supplies the key that a cloud service uses to protect data. It does not mean the customer runs or operates the cloud service itself. The provider still hosts, patches and manages the platform, while the customer supplies or generates the key material that is imported into it. When a tender asks for BYOK, confirm which parts of the service the customer operates and which the provider operates, and get that split in writing.

Azure BYOK article

Supported BYOK is not post-quantum import

A vendor that supports BYOK for classical key types does not thereby allow its post-quantum keys to be imported. The importable key specifications are listed per service and per key type. For example, AWS KMS lists importable specs that do not include ML-KEM or ML-DSA, and it states that it creates and protects those post-quantum keys inside its HSMs. Ask the vendor for the exact list of importable post-quantum key types.

AWS KMS import docs

KEK and target keys differ

In Azure Key Vault BYOK, the Key Exchange Key (KEK) and the target key have separate roles. The KEK is a wrapping key that must be an RSA-HSM key created for import and kept non-exportable in the receiving vault. The target key is the key the customer actually wants to use. Tender responses sometimes name only one of these, so check which key type, size and location each one requires, and which key is being protected by which.

Azure BYOK article

Supported HSM is not service certification

An HSM appearing on a provider's list of supported devices for BYOK shows only that the HSM can be used with that workflow. It does not certify the cloud service as a whole. Certification, where it exists, applies to a named module, firmware version and assessment, and it is separate from the cloud service's own assessment. Ask for the certificate, the module and version it covers, and the issuing body, and do not treat list membership as a certification claim.

What do people search about BYOK?

What does BYOK stand for in cloud key management?

BYOK stands for bring your own key. It is a model in which a customer supplies the key material that a cloud service uses to protect the customer's data, instead of letting the provider generate that key. The customer generates or holds the key in its own environment, then imports it into the cloud key service, where it is used under the service's controls. The term is a practitioner label, and the sources listed on this page describe the mechanism through each provider's own documentation rather than through a single standard definition. Confirm the exact terminology and scope with each provider before relying on it in a contract or control description.

Is bring your own key a formal standard?

The sources listed on this page do not show BYOK as a formal standard with its own specification. Each cloud provider documents its own import process, with its own requirements for key types, wrapping keys and hardware modules. The closest standardized building block is key wrapping, which NIST describes in SP 800-38F, the recommendation for key wrapping modes published in December 2012 with a Final status. Check the provider's documentation for the exact import steps, and check your compliance framework for any control that names key import or customer-managed keys.

Do AWS KMS and Azure Key Vault both support BYOK?

Yes, both services document a way to import customer key material. Azure Key Vault describes bring your own key as importing or generating a key in a hardware security module so it never leaves the HSM boundary. AWS KMS describes imported key material as a way to protect AWS resources under keys you generate, in four steps: create a KMS key with origin EXTERNAL, download a wrapping public key and import token, encrypt the key material, and import it. The two services differ in their details. Azure requires a specific key exchange key and HSM-backed vault tiers, while AWS limits importable key specifications. Compare the current documentation for your region, tier and key types before choosing a design.

Can post-quantum keys be brought into AWS KMS or Azure Key Vault?

The sources listed on this page do not show that customer-supplied post-quantum keys can be imported into either service. For AWS KMS, the importable key specifications list covers symmetric, HMAC, RSA, and elliptic curve keys, and does not include ML-KEM or ML-DSA. AWS says it creates and protects all ML-KEM and ML-DSA keys inside its HSMs, so these keys are created in the service with CreateKey. For Azure Key Vault, the supported target key types listed on this page are RSA-HSM, EC-HSM and OCT-HSM, with no post-quantum types named. Ask each provider in writing which post-quantum key types they accept for import, and whether any such keys are created only inside the service.

What changes for the customer after importing a key?

After import, the customer still controls the key material it supplied, but the provider now holds that material under its own storage and access controls. In AWS KMS, a key with imported material moves from PendingImport to Enabled after a successful import. An optional expiration time makes AWS KMS delete the material when it expires, and the same material must be reimported to restore use. AWS also logs CloudTrail entries for key creation, wrapping key download, import, and deletion of imported or expired material. Plan for the expiration behavior, your own copy of the key material, and the audit trail you will need for review.

What should I ask a vendor before choosing a BYOK setup?

Ask for the import process documented in writing, with the exact key types, sizes and hardware modules accepted. Confirm whether the key material is ever exportable from the service, and how wrapping keys are generated and held. Ask how long imported material remains usable, what happens on expiration, and how re-import is performed. Request the audit log events the service records for key creation, import and deletion, and confirm whether those logs reach your own monitoring. Ask whether post-quantum key types can be imported or must be created inside the service. Ask for any pricing and support terms in a written quote, since the sources listed on this page do not publish fees for these services.

Does BYOK mean the provider can no longer read my data?

The sources listed on this page do not say that BYOK removes the provider's ability to access data. They describe how key material is imported and protected. Whether the provider can use, export or read a key depends on the specific service, key type and configuration, and on controls such as whether the key is exportable. For AWS KMS, imported material is encrypted in transit with RSAES-OAEP and re-encrypted under AES-GCM before storage. Confirm the access model in the provider's documentation and in your own contract, and do not treat the key source alone as a statement about access.

How DeployOpen works on this

DeployOpen approaches bring your own key as a planning and implementation question: which keys the customer supplies, where they are generated and held, and how the cloud service imports and uses them. Engagements are scoped in writing first, then built, tested, documented and handed over, with ongoing support available afterward.

How we scope

  • Inventory which cloud services in your estate use customer-supplied keys and which key types each one accepts.
  • Confirm which key types and sizes your target service supports before deciding whether a post-quantum key can be imported at all.
  • Agree the scope, deliverables and timeline in writing before any work starts, as every engagement is fixed-scope.

How we build

  • Set up the key generation and import path inside your own HSM or key vault, so the key material stays within the agreed boundary.
  • Configure key import, expiration and re-import procedures, and check that the service behaves as documented in your environment.
  • Test access controls, logging and key deletion behavior against the scope, and record what passed and what needs follow-up.

How we hand over

  • Document the key creation, wrapping and import steps as your own runbook, with the commands and settings you actually used.
  • Record which audit log entries the cloud provider generates for key operations, so your compliance team knows what evidence exists.
  • Deliver a handover session and written notes listing open items, version dependencies and the checks to repeat after upgrades.

How we support

  • Keep ongoing support, upgrades and retesting available as a retainer once the initial handover is complete.
  • Re-verify supported key types and HSM firmware requirements when the cloud provider or hardware vendor publishes changes.
  • Confirm with the provider's current documentation before relying on any post-quantum key type for production use.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.