An independent information publicationDirective (EU) 2022/2555 · The NIS2 DirectiveNot an official publication
The Independent NIS2 Desk
NIS2 Compliance
Independent information on the NIS2 Directive, for the organisations it covers.
HomeArticlesCryptographic Key Management Under NIS2
Cryptography Access Assets Physical Security / 2026-10-09

Cryptographic Key Management Under NIS2

Cryptographic key management is the discipline that makes the cryptography required by Article 21(2)(h) of Directive (EU) 2022/2555 trustworthy in practice. Keys must be generated, stored, distributed, rotated, revoked and destroyed under documented control throughout their lifecycle, because encryption with poorly managed keys protects little. NIS2 does not prescribe a key management technology; it requires the policies and procedures around cryptography to be appropriate to the risk, and key handling is where those procedures succeed or fail.

Why key management sits inside Article 21

Article 21(2)(h) names policies and procedures on the use of cryptography and, where appropriate, encryption. A policy that says data will be encrypted but says nothing about who can create keys, where they are stored, or how they are replaced after a suspected compromise leaves the central risk unmanaged. Supervisors and auditors therefore treat the key lifecycle as part of the control, not as an implementation detail.

The same point appears in the more detailed requirements that Commission Implementing Regulation (EU) 2024/2690 sets for the provider types in its Article 1: the annex addresses cryptography among the technical measures, and an entity in one of those categories should be able to show how keys for its services are governed.

Inventory keys without recording secrets

Effective management starts with an inventory that records each key's purpose, the systems and data it protects, its owner, where it is held, its creation and expiry dates, and which other systems depend on it. The inventory must never contain the secret values themselves; it is a governance record, not a key store.

The inventory exercise usually surfaces the real risks: keys owned by people who have left, keys embedded in scripts or images, certificates nobody remembers issuing, and production keys copied into test environments. Each finding should be risk-assessed and corrected, and the inventory kept current as systems change.

  • Record purpose, owner, location and expiry for every key and certificate
  • Keep secret values out of inventory records, tickets and wikis
  • Review the inventory when staff leave, systems change or suppliers change

Control generation, storage and access

Keys should be generated with approved methods and adequate strength for the data they protect, and stored in locations designed for the purpose - a managed key service or hardware-backed store for important keys - rather than in configuration files or shared drives. Access to keys and to key administration functions should be restricted to named roles, separated where the risk justifies it, and logged.

Supplier-held keys need explicit treatment. Where a cloud or managed service provider generates or holds keys on the entity's behalf, the contract and the entity's own records should say who controls rotation and revocation, what happens at exit, and how the entity would regain or replace key material. Article 21(2)(d) supply-chain security and Article 21(2)(h) meet at exactly this point.

Rotation, expiry and revocation

Keys and certificates should have defined lifetimes. Rotation on schedule limits the value of an undetected compromise; rotation on departure of a key administrator or on suspicion of exposure should be possible at any time. Dependent systems need to be identified in advance so that replacing a key does not silently break a service - or worse, cause a team to disable verification to get the service back.

Revocation is the emergency path: the ability to declare a key untrusted, distribute that fact, and re-issue. If revocation has never been tested, it should be treated as unproven. Tabletop the sequence with the teams who would run it during an incident, and record the result.

Backups, recovery and destruction

Encrypted data is only as recoverable as its keys. Backup and recovery testing should prove that encrypted backups can actually be restored with the authorised keys available, under the access rules that apply in a real recovery - a test that quietly uses an administrator's personal copy proves nothing. Where keys are escrowed or split for recovery, the arrangement should be documented and access-controlled.

At the end of life, keys should be destroyed when the data they protect is retired, and destruction recorded. Retaining keys indefinitely extends the exposure window for historical data; destroying them early makes retained data unreadable. Retention schedules for data and keys should therefore be decided together.

Evidence that the lifecycle works

The evidence set for key management is straightforward: the cryptography and key management policy, the key and certificate inventory, access records for key administration, rotation and renewal logs, revocation and recovery test results, and exception records for anything outside the standard. ENISA's NIS2 Technical Implementation Guidance is a useful reference for how such evidence supports the Article 21 measures generally.

None of this requires exotic tooling at most entity sizes. It requires that keys are treated as assets with owners and lifecycles, which is the same governance pattern NIS2 applies to the rest of the control set.

Points of clarification

Does NIS2 require a hardware security module (HSM)?

No. The Directive requires appropriate and proportionate cryptography policies and procedures; it does not mandate an HSM or any specific product. Hardware-backed storage can be a proportionate choice for high-value keys, but the requirement is about governed key handling, not a named technology.

How often should cryptographic keys be rotated?

NIS2 sets no rotation interval. Lifetimes should be set by the entity's own policy based on the sensitivity of what the key protects and the exposure if it is compromised, and rotation must also be possible immediately on suspicion of compromise or when a key administrator leaves.

Who is responsible for keys held by a cloud provider?

Operationally the provider may generate and hold the keys, but the covered entity remains responsible for its Article 21 measures. The arrangement should be documented: who controls rotation and revocation, how access is logged, and what happens to key material when the contract ends.

Further entries on this subject

The texts relied on

General editorial guidance only: it does not determine your organisation's legal obligations. See our editorial policy for how this site works and corrects errors.