What is a key hierarchy in cryptography?

A key hierarchy is a layered arrangement in which higher-level keys protect or derive lower-level keys. It shapes how a post-quantum migration reaches the keys that protect your data.

On this page

What is a key hierarchy in cryptography, and who meets it?

If you are planning a post-quantum upgrade and a vendor or auditor asks how your keys are organized, you are being asked about your key hierarchy. A key hierarchy is a layered arrangement in which higher-level keys protect or derive lower-level keys. NIST's glossary defines it, citing SP 800-108 Rev. 1 as updated on 2 February 2024, as a multiple-level tree structure in which each node represents a key and each branch indicates a key derivation from one key to another. In practice, the top of the hierarchy is usually a small number of carefully guarded keys, and the layers below them protect the keys that encrypt the data itself.

Architects design the hierarchy, deciding which keys sit at which layer and which system holds each one. Key owners are accountable for the keys in their layer, including who may use them and when they are replaced. Auditors check that the arrangement matches what is documented and that the top-level keys are protected more strongly than the keys beneath them. The documents where the term most often appears include NIST's SP 800-57 Part 1 Rev. 5, which covers key management in general, and cloud provider documentation describing how key-encrypting keys wrap data keys.

For a post-quantum migration, the hierarchy tells you what must change. Keys that establish trust or wrap other keys need to be identified in your inventory, and any algorithm used at those layers must be checked against the standards that apply to your sector. Ask your key management vendor which layers its service manages, which keys it can rotate without re-encrypting your data, and how it documents these choices. Confirm current requirements directly in the NIST publications and your vendor's documentation rather than relying on this summary.

Which names and document numbers describe a key hierarchy?

This table lists the names used for layered key arrangements, the NIST document that defines each one, and the sense in which each name is used. Read the first row for the general definition, then the rows below for the key-encryption and key-wrapping terms, which describe one key protecting another rather than a derivation tree. Sources use the layered idea in both senses, so check which sense a vendor or standard means before comparing designs.

NameDefining sourceSense in which it is used
Key hierarchyNIST glossary, citing SP 800-108 Rev. 1 (updated 2 February 2024)A multiple-level tree in which each node is a key and each branch is a key derivation from one key to another
Key-encryption keyNIST glossary, citing SP 800-57 Part 1 Rev. 5A key used to encrypt or decrypt other keys, also called a key-wrapping key; the key for the underlying block cipher of KW, KWP or TKW
Key-wrapping key (SP 800-57)SP 800-57 Part 1 Rev. 5, as quoted in the NIST glossaryA symmetric key giving both confidentiality and integrity protection to other keys
Key-wrapping key (SP 800-56B)SP 800-56B Rev. 2, as quoted in the NIST glossaryA symmetric key used with a key-wrapping algorithm to protect keying material
Key wrapping methods (KW, KWP, TKW)SP 800-38F, cited in the NIST glossary entry for key-encryption keyThe wrapping algorithms that use a key-encryption key; the sources listed here do not describe their internals
Wrapping key in AWS KMSAWS KMS documentationA KMS key, most often used to encrypt the data keys that encrypt your data; AWS also calls these key-encryption keys
Data key in AWS KMSAWS KMS documentationReturned in plaintext and as an encrypted copy by GenerateDataKey; AWS does not store or track data keys

Where does a key hierarchy show up in systems and tenders?

A key hierarchy appears in three places: the key management services you run or buy, the key-wrapping methods named in NIST documents, and the questions auditors and tender teams ask about who holds keys. The cards below cover each place, so you can tell which layer a vendor document or questionnaire is describing and what to verify in it.

KMS wrapping setups

Cloud key management services such as AWS KMS keep a symmetric KMS key as the top of the hierarchy and use it to encrypt the data keys that protect your data. When you read a service configuration, look for which KMS key wraps which data keys, and whether the service stores only the encrypted copy. AWS states that KMS does not store, manage or track data keys, so the encrypted data key must be kept alongside the data, and the plaintext copy should be removed from memory as soon as possible. Confirm the wrapping key's location and access policy before relying on the setup for a migration plan.

AWS KMS data keys

Key-wrapping methods in standards

NIST defines a key-wrapping key as a symmetric key that provides both confidentiality and integrity protection for other keys, and SP 800-38F is the document cited for key wrapping. SP 800-56B Rev. 2 uses the same term with a key-wrapping algorithm to protect keying material. When a vendor or auditor cites one of these, check which document and revision the claim refers to, because the definitions differ slightly between SP 800-57 and SP 800-56B.

NIST key-wrapping key glossary

Envelope encryption descriptions

Vendor documents often describe envelope encryption, where a data key encrypts the data and a wrapping key encrypts that data key. This is the same layered arrangement in product language. Read the architecture section to find out which keys the vendor holds, which keys the customer holds, and where the encrypted data keys are stored. A description that names only the data key and omits the wrapping layer leaves the custody question unanswered, so ask for it in writing.

Key derivation in key trees

NIST's glossary describes a key hierarchy as a tree in which each node is a key and each branch is a derivation from one key to another, citing SP 800-108 Rev. 1. This meaning differs from wrapping: derivation produces keys from a parent key, while wrapping protects a key with another key. Vendor documents may use the word for either, so confirm which relationship is meant before you map the tree to your own systems.

NIST key hierarchy glossary

Key custody questions in tenders

Audit and tender questionnaires ask who holds the keys, whether the customer can revoke them, and how key material is stored and destroyed. Answers to these questions depend on the hierarchy: a customer-managed top-level key is a different risk from a vendor-held one. Ask the vendor to show each layer, the party that controls it, and the procedure for rotation and deletion. Records of key lifecycle controls, not just policy statements, are what most reviewers will check.

Hardware boundaries for top keys

The top of a hierarchy is often held in a hardware security module or a cloud HSM, so the security level of the module affects the whole tree. NIST's FIPS 140-3 defines four increasing security levels for cryptographic modules. Ask which level a vendor's module claims, and whether that claim is backed by a validation listing for the version you run, rather than accepting the level as a general statement.

FIPS 140-3 record

How a key hierarchy protects data in practice

In practice, a key hierarchy means that the key protecting your data is itself protected by a key above it, so compromising one layer does not expose everything. The top key sits at the root and is held in a protected service, such as a key management system or a hardware module. The wrapping key (also called a key-encryption key) encrypts the lower keys, and the data key encrypts the actual data. NIST's glossary describes a key-wrapping key as a symmetric key that provides both confidentiality and integrity protection for other keys, which is the role the wrapping key plays here.

AWS KMS shows this pattern clearly. Its GenerateDataKey operation returns a plaintext data key along with a copy of that key encrypted under a KMS key you specify. AWS describes KMS keys as most often used as wrapping keys, meaning they encrypt the data keys that encrypt your data. Because AWS KMS does not store, manage or track data keys, the encrypted copy is what you keep alongside your data, and the plaintext copy should be removed from memory as soon as possible. To unwrap later, you send the encrypted data key back to KMS to be decrypted. Confirm in your own environment whether your application stores the encrypted data key next to each record or object, and whether it discards the plaintext copy after use.

For planning, the practical consequences are operational. Rotating a KMS key does not rotate data keys it already generated and does not re-encrypt the data they protect, so you must plan any re-wrapping or re-encryption separately. Scheduling deletion of a KMS key may not immediately affect data keys it encrypted, but services using those data keys will be affected when the KMS key is next used to decrypt one, so check which datasets depend on each wrapping key before retiring it. Ask your provider which operations rewrap data keys and how long old wrapped keys remain decryptable.

How the layers of a key hierarchy relate

The diagram starts at the KMS key, which acts as a key-wrapping key and never leaves the key service. Its job is to encrypt a data key, and AWS's GenerateDataKey operation returns both a plaintext copy of that data key and a copy encrypted under the KMS key. The data key then encrypts the data itself, and the encrypted data key is stored alongside the data. Check that the plaintext data key is removed from memory as soon as possible, because AWS KMS does not store or track data keys. This is an illustrative example of the pattern, not a configuration recommendation.

Illustrative example: a KMS key wraps a data key, which encrypts the data.

Is the key hierarchy term standardized, and what changes in SP 800-57?

The term "key hierarchy" is defined in NIST's glossary rather than as a standalone requirement. The NIST CSRC glossary defines a key hierarchy as a multiple-level tree structure in which each node is a key and each branch indicates a key derivation from one key to another, citing SP 800-108 Rev. 1 as updated on 2 February 2024. The layered idea of higher keys protecting lower keys also appears in the glossary entries for key-encryption key and key-wrapping key, which draw on SP 800-57 Part 1 Rev. 5. Architects should note that the sources use the layered idea in two senses (derivation and wrapping), so a vendor's use of the phrase should be checked against which sense it means.

Recommendation for Key Management: Part 1, General (SP 800-57 Part 1) is the document to check for key-management guidance. Revision 5 was published as a final document in May 2020 and supersedes Revision 4 of 28 January 2016. NIST published Revision 6 as an initial public draft on 5 December 2025, with a comment deadline of 5 February 2026, so it is still a draft. The draft adds Ascon from SP 800-232 and the standards in FIPS 203, 204 and 205, adds a section on keying material storage, and replaces fixed algorithm approval time frames with references to SP 800-131A. Teams should confirm the current status of Revision 6 on the NIST record before citing it as final.

NIST's CSRC news page dated 27 October 2026 announces NIST IR 8547, Transition to Post-Quantum Cryptography Standards, and marks the earlier initial public draft of 12 November 2024 as obsoleted on that date. For a key-hierarchy review, confirm which of these documents a vendor or auditor is referring to, and ask for the version and date. No product should be described as compliant with SP 800-57 or NIST IR 8547 on the basis of this page; compliance claims need to come from the owner of the product and, where required, an independent assessor.

What a key hierarchy means for a post-quantum migration

A post-quantum migration of a key hierarchy means checking each layer of wrapping keys, the algorithms that protect them, and how existing encrypted data is re-protected. The sequence below gives you the order to work through that review, with a check that closes each step.

  1. Inventory which keys wrap which keys

    Map every key in your environment to the key that encrypts it, starting from the KMS keys at the top and working down to the data keys that encrypt application data. Record each parent-child link in a single inventory, with the owner of each key and the systems that call it. The step is done when every data key in scope traces back to a named wrapping key and no link is left undocumented. Keep the map current, because a key you miss here will not be re-protected later.

  2. Identify the key-encryption layer and its algorithms

    For each wrapping key in the inventory, record the algorithm and parameters it uses today, and confirm whether it is a symmetric key used for key wrapping or a key used for another purpose. NIST's glossary describes a key-encryption key as the key that protects other keys, so this layer is where the post-quantum change is decided. The step is done when each wrapping key has a recorded algorithm, a owner and a classification. Confirm the algorithm details against NIST SP 800-57 Part 1 and your provider's documentation rather than assuming them.

  3. Check KMS support for ML-KEM shared secrets

    Confirm with your key management provider whether it supports ML-KEM and how it returns the shared secret. AWS KMS documents that an ML-KEM shared secret is 32 bytes, can be used directly as key material, and can be passed through a key derivation function to produce multiple distinct keys and nonces. Check that your application derives its keys through a key derivation function as well, so each derived key is distinct. The step is done when you have written confirmation of the supported parameter sets and the derivation path your application will use.

  4. Plan re-wrapping of existing data keys

    Plan how existing data keys will be re-wrapped under a post-quantum-capable wrapping key, because key rotation alone does not do this. AWS KMS documents that rotation does not rotate the data keys the KMS key generated and does not re-encrypt data protected by the KMS key. Decide whether you will decrypt and re-encrypt each data key or re-encrypt the stored data, and test the process on a copy before running it on production data. The step is done when the re-wrapping procedure has been tested and the owner has signed off on its order of operations.

  5. Confirm scheduled deletions do not break data keys

    Before any old wrapping key is scheduled for deletion, confirm that no data key still depends on it. AWS KMS documents that scheduling deletion might not immediately affect data keys encrypted by the key, and that services using those data keys fail when the KMS key is next used to decrypt one. Search your inventory for every data key that still points to the old key and re-wrap them first. The step is done when the inventory shows no remaining dependencies on the key scheduled for deletion.

Which confusions about key hierarchies cause audit and tender errors?

The phrase key hierarchy is used in two senses, and the sources also describe how rotation, deletion and key size behave in ways that are easy to misstate. Each card below covers one confusion that can lead to an incorrect audit answer or tender response, and what to check instead.

Derivation and protection senses

NIST's glossary defines a key hierarchy as a tree where branches show one key deriving another, which is the derivation sense. The key-encryption and key-wrapping definitions instead describe one key protecting another, which is the protection sense. Sources use the layered idea in both senses, so a tender answer that says a hierarchy exists must state which sense it means. Ask the vendor which relationships are derived and which are wrapped, and document each one separately.

NIST key hierarchy

KMS rotation and data keys

Rotating a KMS key does not rotate the data keys it generated or re-encrypt the data they protect. AWS states this directly for its KMS rotation feature. An audit answer that treats KMS rotation as proof that stored data was re-encrypted is wrong. Check whether data keys are regenerated by the application, and ask for the process that re-encrypts stored data after a rotation event.

AWS KMS rotate keys

Scheduled deletion timing

Scheduling deletion of a KMS key does not take effect immediately for the data keys it encrypted. AWS says such data keys may keep working until the KMS key is next used to decrypt one, at which point the services using those data keys are affected. A tender or audit response that claims deletion destroys access at the scheduled time is inaccurate. Confirm the waiting period, which services depend on the key, and how data keys are located and re-protected before deletion.

AWS KMS delete keys

ML-KEM secret is not a hierarchy

An ML-KEM shared secret from AWS KMS is 32 bytes and can be used directly as key material or passed through a key derivation function to produce several keys. That single secret is one output of a key exchange, not a complete key hierarchy with wrapping keys, data keys and rotation rules. Reviewers should not accept a 32-byte figure as evidence of the full structure. Ask for the list of keys in each layer and the parameter set (ML-KEM-512, ML-KEM-768 or ML-KEM-1024) the implementation uses, as defined in FIPS 203.

AWS KMS post-quantum keys

What do people ask about key hierarchies before a migration?

What does key hierarchy mean in cryptography?

A key hierarchy is a layered arrangement in which some keys sit above others and protect or derive them. NIST's glossary defines it as a multiple-level tree structure in which each node represents a key and each branch shows a key derivation from one key to another. In practice, a small number of highly protected keys sit at the top, and the many keys that encrypt day-to-day data sit below them. The idea covers two related relationships: one key deriving another, and one key encrypting another. Architects reading vendor documents should expect the term to carry both meanings, so they should check which relationship a document describes before drawing conclusions about who controls which key.

Is a key hierarchy the same as key wrapping?

No, they are related but not the same. Key wrapping is one mechanism used inside a key hierarchy. NIST SP 800-57 Part 1 Rev. 5 defines a key-encrypting key as a key used to encrypt or decrypt other keys, also called a key-wrapping key, and the NIST glossary describes a key-wrapping key as providing both confidentiality and integrity protection for other keys. A hierarchy is the overall structure of which key protects which. Wrapping is the act of one key protecting another. A system can have a key hierarchy without any wrapping, for example when keys are only derived, and it can wrap keys in a flat structure with no real hierarchy. When a vendor says it uses a key hierarchy, ask which keys wrap which, and whether derivation is also involved.

Is key hierarchy defined in a NIST standard?

The term appears in NIST's glossary, which cites SP 800-108 Rev. 1, as updated on 2 February 2024, for the definition of key hierarchy. Key-encrypting keys and key-wrapping keys are defined in NIST SP 800-57 Part 1 Rev. 5, which was published in May 2020 as a final document and supersedes Revision 4 of 28 January 2016. Key-wrapping methods are described in SP 800-38F, which the NIST glossary cites for key wrapping. Key management guidance is being revised: SP 800-57 Part 1 Revision 6 was published as an initial public draft on 5 December 2025 with a comment deadline of 5 February 2026, so it remains a draft. Teams building compliance evidence should cite the document versions they actually follow and check for later final releases before an assessment.

Do my products use a key hierarchy?

Most managed key systems use some form of hierarchy, but the structure varies by product, so you must confirm it for each one. Cloud key services are a common example. In AWS KMS, a symmetric KMS key is most often used as a wrapping key, and the GenerateDataKey operation returns a plaintext data key plus a copy encrypted under that KMS key. The wrapping key protects the data keys, and the data keys encrypt the data. Check your own estate by asking each product or service owner where its keys are stored, which key wraps which, and whether any key is derived from another. Records from a key inventory, configuration exports and vendor architecture documents are the most reliable sources. Where a product does not describe its structure, treat that as an open question for the vendor, not as proof that no hierarchy exists.

What changes for my keys after a post-quantum migration?

Post-quantum migration usually changes the algorithms that protect the upper layers, and may change the wrapped keys as well, so the hierarchy must be re-examined rather than assumed to be unaffected. The new standards include FIPS 203, which specifies ML-KEM, and FIPS 204 and 205, which specify ML-DSA and SLH-DSA, all published as final on 13 August 2024. Where a service uses ML-KEM, AWS documents that the shared secret is 32 bytes and can be passed through a key derivation function to produce several distinct keys and nonces. Expect operational work: inventory which keys sit at each layer, decide when each is rotated, and check how rotation and deletion behave. AWS states that KMS rotation does not rotate data keys the KMS key generated and does not re-encrypt data, so rotation of the top layer alone does not refresh everything beneath it.

What should I ask a vendor about its key hierarchy?

Ask a vendor to describe its key hierarchy in writing, covering each layer, what each key protects and where it is stored. Useful questions include: which keys wrap or derive others; where the top-level keys are held and whether they are in a hardware module validated under FIPS 140-3, which defines four security levels; how the vendor handles plaintext data keys in memory; and what happens to encrypted data if a key is scheduled for deletion. AWS notes that scheduling deletion of a KMS key might not immediately affect data keys it encrypted, and that services are affected when the key is next used to decrypt. Ask the vendor to state its post-quantum plan for each layer and which document or version it follows. Request written answers, and confirm compatibility for the specific versions you run.

Can I map my key hierarchy myself, or do I need outside help?

You can map it yourself if you have a current key inventory and access to configuration records, and many teams do this first. Start with the keys at the top, then trace which keys wrap or derive the ones below, and record where each is stored. The work becomes harder where keys are spread across several cloud accounts, hardware modules and vendor services, or where documentation is thin. Outside help is one option when you need an independent view of the structure before a migration plan is approved. DeployOpen plans, implements, documents and supports self-hosted open-source platforms in a client's own infrastructure, and can prepare documentation for compliance assessments, but it does not issue audit reports or certifications. Engagements are fixed-scope, with scope and deliverables agreed in writing before work starts, and the cost depends on that written scope. Ask for a quote built from your environment.

How DeployOpen works on this

DeployOpen approaches key hierarchies as a set of decisions to document before any upgrade: which keys protect which, where each key lives, and how each layer will be replaced. The work is scoped in writing, built inside your own infrastructure, and handed over with a record your security and compliance teams can review.

How we scope

  • We map which key-encrypting and data keys exist in your systems and which key protects each one.
  • We record where each wrapping key is held, including whether it sits in a KMS or in self-hosted storage.
  • Engagements are fixed-scope, with the key hierarchy questions to cover agreed in writing before work starts.

How we build

  • We configure the key layers in your own cloud accounts, data centers or air-gapped networks.
  • We check how post-quantum algorithms such as ML-KEM would be introduced at each layer, and confirm compatibility for the versions you run.
  • We test key wrapping, derivation and deletion paths to confirm that data stays decryptable after changes.

How we hand over

  • We document the hierarchy as a tree of keys, showing each parent, child and the location of each key.
  • We deliver the record your auditors and compliance teams need, including rotation and deletion procedures for each layer.
  • We agree the handover scope and acceptance criteria in writing before the engagement closes.

How we support

  • Ongoing support is available as a retainer for upgrades, reviews of the hierarchy as standards change, and retesting.
  • We can retest after NIST revises SP 800-57 Part 1 and related guidance, since the Revision 6 draft is still open.
  • Ask us to confirm the current status of any standard or version before relying on it in a migration plan.

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.