In previous sections, we covered the key material lifecycle, permissions for key creation and usage, and the distinctions between various roles. A practical question remains: where should key material be stored, and where should cryptographic operations take place?
The two acronyms that appear most frequently in this context are KMS (Key Management System) and HSM (Hardware Security Module). However, these are not competing technologies. Each addresses a different aspect of the problem, and in some architectures, they actually complement each other. Simply put, a KMS primarily handles key management and the key lifecycle, whereas an HSM provides a secure environment for key material and cryptographic operations. However, the specific boundaries between these functions vary from product to product. Therefore, one should not rely solely on the product name.
A KMS is a system designed to manage cryptographic keys throughout their
lifecycle. It typically handles their creation, activation, usage, rotation,
archiving, invalidation, and destruction. It also often includes the management
of access permissions, identity integration, and operation auditing. Thus, a KMS
is not merely a "place to store keys."
Its primary value lies in providing an organization with a controlled method
for managing keys and maintaining an audit trail of their usage.
It can be envisioned as a manager of secure, logged storage compartments. It not only
tracks the existence of a specific key but also determines who may use it and for what purpose,
records when it was activated and when it is due for replacement, and logs all operations performed with it.
A modern KMS can, for instance, provide keys or cryptographic operations to applications,
containers, and cloud services. It can manage keys used for databases, backups,
or storage systems, support automatic rotation, and integrate with IAM systems. Some solutions
also enable the automation of certificate management or integration with development and operational
workflows. This reduces the need for individual applications to handle their own
key storage and rotation. This is particularly significant because storing keys in a scattered manner—
such as in configuration files, environment variables, or directly within source code—creates
security debt that is difficult to manage.
A KMS can be deployed on-premises, as a cloud service, or via a hybrid model.
Choosing between these options is not merely a technical decision;
factors such as the required level of control over key material, availability, operational overhead,
costs, regulatory requirements, vendor dependency, and potential jurisdictional
risks must all be taken into account. A cloud-based KMS can significantly reduce operational
costs and the burden on internal infrastructure. However, this also shifts part of
the responsibility to the service provider. Organizations must therefore understand not only
how the service works but also the limits of their own control.
An HSM is a specialized cryptographic device designed to protect key material and perform
cryptographic operations within a secure environment. A typical operating principle is that
the private key never leaves the HSM's secure environment. For instance, an application might
send data and a signature request to the device; the HSM performs the operation internally
and returns the result to the application, without the private key itself ever being exposed
to the application.
This differs significantly from scenarios where an application obtains a private key as
a standard file and uses it via a cryptographic library. However, an HSM does not solve
the entire security problem; it primarily addresses the protection of key material and
specific cryptographic operations. It can be thought of as a vault that, if configured
to do so, is capable of destroying its own contents.
HSMs typically incorporate mechanisms to protect against both logical and physical tampering.
Specific features vary by device; for example, some devices can switch to a protective
mode or render key material inaccessible upon detecting certain forms of physical
tampering. However, it is incorrect to assume that every HSM possesses the same mechanisms
or that physical protection alone guarantees the security of the entire solution.
An HSM can also generate keys and perform operations such as signing, signature verification,
encryption, or decryption. In a PKI environment, it can protect the highly sensitive keys
of a certificate authority. However, the certificate authority itself is a broader system
comprising technological, procedural, and organizational components. Therefore, an HSM
is not a certificate authority, just as a vault is not a bank.
HSMs can be deployed in various ways:
The term HSM is not synonymous with a single specific architecture. Performance, interfaces, management methods, levels of physical protection, availability, backup capabilities, and responsibility models vary.
A cloud HSM provides HSM cryptographic functions as a service. Consequently, the customer does not need to operate a physical device in their own server room, yet still benefits from a protected environment designed for handling key material. Advantages may include reduced operational overhead and the ability to leverage the provider's infrastructure for availability, redundancy, and physical protection. Disadvantages include dependency on the provider and their technical, organizational, and legal frameworks. Therefore, when evaluating a cloud HSM, simply asking "is it an HSM?" is insufficient. It is necessary to determine, for example:
This leads to an important principle: a cloud HSM is not automatically less secure—nor automatically more secure—than an on-premises HSM. It is primarily the distribution of responsibilities and trust relationships that changes.
HSMs and KMSs very often complement each other. A KMS can handle lifecycle management, access
policies, identity integration, and auditing, while an HSM provides a secure environment where
sensitive key material is stored and cryptographic operations take place. Such an
architecture addresses two distinct needs:
KMS: who, what, when, why, and in what state.
HSM: where the key is protected and where sensitive cryptographic operations are performed.
Of course, a specific product may combine both functions. Therefore, when designing a system,
it is more important to consider the system's actual capabilities than the product name.
A combination of HSM and KMS may be suitable for entities such as certificate authorities,
banking infrastructure, electronic signature services, or other systems where the compromise
of a specific key would have far-reaching consequences.
Conversely, many organizations do not need an HSM at all. If the goal is, for example, to protect
keys for database, backup, or disk encryption, a well-designed KMS featuring access control,
auditing, and key rotation may be entirely sufficient. In such a case, adding an HSM could
introduce more operational complexity than security benefit.
An HSM is particularly relevant when the key itself is a high-value asset and exposing it outside a protected environment poses an unacceptable or difficult-to-manage risk. Typical examples include:
However, the decision should not be based on a simple "sensitive key = HSM" rule. It is necessary to evaluate the entire threat model, required availability, access rights, auditability, performance, regulatory requirements, and the organization's ability to operate an HSM securely.
An HSM is just a secure disk
It is not. An HSM is also designed to perform cryptographic operations within a protected environment.
Its value lies not merely in key storage, but primarily in preventing
sensitive key material from entering the standard operating environment.
KMS and HSM are the same thing
Not necessarily. A KMS is primarily a system for managing keys and their lifecycles. An HSM
is a specialized, secure environment for key material and cryptographic operations.
A single product may combine both functions, but the terms are not generally interchangeable.
An HSM automatically ensures security
This is not the case. Security also depends on configuration, administrative privileges,
authentication, network architecture, monitoring, availability, updates, backups,
and operational processes. For example, an organization might invest significant resources
in an HSM and then store a backup key in an insecure file or transmit it
via email. In such a case, the problem lies not in a lack of cryptography,
but in the system's design and operation.
A cloud HSM is the same as an on-premises HSM
In terms of cryptographic function, they may be similar, but the operational
and trust models differ. With a cloud service, it is necessary to consider
the division of responsibility between the customer and the provider,
customer isolation, administration, auditability, availability, jurisdiction,
and terms of service.
Higher performance means greater security
No. Performance is just one parameter. For critical systems, the protection of
key material, predictable latency, availability, auditability, or
attack resilience may be more important.
The HSM and KMS market is broad, encompassing specialized manufacturers, security companies, and major cloud providers. Well-known examples include Entrust, Thales, Utimaco, IBM, Futurex, Securosys, and Crypto4A, as well as cloud platforms such as AWS, Microsoft Azure, and Google Cloud. However, this list is merely indicative. Product offerings, service names, certifications, and supported features change constantly, so the list of manufacturers should not be used as a security or purchasing recommendation without verifying the specific product. Furthermore, the choice depends on the requirements of the specific jurisdiction and local authorities. When making a selection, it is more useful to focus primarily on:
The penultimate point is often underestimated. Cryptographic infrastructure can represent a very long-term dependency. If keys are difficult to export, replace, or securely destroy, the choice of product can become a crypto-agility issue.
| HSM Manufacturer | URL |
| CETC Westone / 电科网安 | cetccst.com.cn |
| Crypto4A Technologies Inc. | crypto4a.com |
| Eviden (Atos Group) | eviden.com |
| Entrust Corporation (formerly nCipher) | entrust.com |
| Futurex | futurex.com |
| IBM Corporation | ibm.com |
| I4P (i4p informatics Ltd.) | i4p.com |
| JISA Softech Pvt. Ltd. | jisasoftech.com |
| JN TASS / 江南天安 | tass.com.cn |
| JN UNION / 江南科友 | union-tech.net.cn |
| Sansec / 三未信安 | sansec.com.cn |
| Securosys SA | securosys.com |
| Thales Group | thalesgroup.com |
| Utimaco GmbH | utimaco.com |
| KMS Manufacturer | URL |
| Alibaba Cloud | alibabacloud.com |
| Atos / Eviden | eviden.com |
| AWS | amazon.com |
| Broadcom | broadcom.com |
| CETC Westone / 电科网安 | cetccst.com |
| Cosmian | cosmian.com |
| Cryptomathic | cryptomathic.com |
| eMudhra | emudhra.com |
| Entrust | entrust.com |
| eperi | eperi.com |
| Ecoscard | ecoscard.com |
| Fortanix | fortanix.com |
| Futurex | futurex.com |
| google.com | |
| HashiCorp | hashicorp.com |
| IBM | ibm.com |
| JN TASS / 江南天安 | tass.com.cn |
| JN UNION / 江南科友 | union-tech.net.cn |
| Keystone Security | keystonesec.com |
| Kryptus | kryptus.com |
| Microsoft | microsoft.com |
| Oracle | oracle.com |
| Penta Security | pentasecurity.co.kr |
| Penta Security Japan | pentasecurity.co.jp |
| Sakura Internet | sakura.ad.jp |
| Sansec / 三未信安 | sansec.com.cn |
| Securosys | securosys.com |
| Tencent Cloud | tencent.com |
| Utimaco | ultimaco.com |
Note: On 20th October, 2026, an issue was detected regarding the certification authority eMudhra. This issue arose after the article was written; unfortunately, the impact—for instance, on software developed by them—is not yet known. For this reason, the authority remains on the list of providers, even though the identified issues significantly undermine trust in the services and software they offer. For more information on this issue, see [6].
When combining on-premises and cloud infrastructure, it is useful to distinguish between two issues: who controls the key material and where cryptographic operations take place. In practice, several models can be identified. Two are particularly important for this discussion: the model offering maximum owner control and the model with separate security domains. There is no single universally correct option. The resulting solution depends on information classification, availability requirements, the security model, regulatory requirements, and the organization's capability to operate the infrastructure.
In the HYOK model, key material remains under the owner's direct control. An on-premises HSM provides a protected environment, and a local KMS can handle its management. Cloud services subsequently utilize cryptographic operations or controlled access via a defined interface. A significant feature is the owner's ability to halt key usage. This can be viewed as a sort of "kill switch" for cloud services. At the same time, however, a strong dependency of the cloud on the availability of local infrastructure is created. From my personal perspective, this is the cleanest model, involving minimal compromises. Potential advantages include:
Potential disadvantages include:
Thus, HYOK is not synonymous with "more secure." It increases control but can simultaneously create new dependencies.
A second option is to operate local and cloud cryptographic infrastructures as two relatively
independent domains. A local HSM/KMS protects local services, while a cloud KMS/HSM protects cloud
services. The advantage is reduced interdependence; an outage in the local infrastructure does
not necessarily mean an outage in cloud services, and vice versa. Compromise of one domain
does not necessarily mean compromise of the other.
The trade-off is reduced direct control over cloud key material and greater reliance
on the provider. Organizations must therefore assess whether this division of responsibilities
suits their needs. This model can be particularly practical in enterprise and hybrid cloud
environments, where it is desirable to limit the so-called "blast radius"—the scope of impact
of an incident or operational failure.
BYOK refers to a model in which the customer creates or obtains key material outside the cloud environment and subsequently imports it into a cloud-based KMS or HSM. BYOK can enhance control over the key's origin and generation. However, it does not automatically equate to full cryptographic sovereignty. Once imported, the options available to the customer for the ongoing management, use, deactivation, and potential deletion of the key depend on the specific service. Therefore, a distinction must be made regarding:
The informal term LYOK—"Lend Your Own Key"—is sometimes used to criticize situations where a customer creates the key themselves but subsequently entrusts it to a provider, resulting in limited control over its use. This is not a standardized security model, but rather a useful reminder that BYOK alone does not resolve all issues regarding cryptographic sovereignty.
When designing a system, it is not helpful to start with the question, "Do we need an HSM?" It is better to begin with questions such as:
Only by answering these questions can one determine whether a KMS suffices, whether an HSM is appropriate, or whether a combination of both makes sense.
HSMs and KMSs are not two variants of the same technology. A KMS primarily manages key material
and its lifecycle, whereas an HSM provides a protected environment for key material and cryptographic
operations. Consequently, they naturally complement each other in many environments. However,
it is not the case that every sensitive key automatically requires an HSM. For some systems,
a robust KMS—featuring properly configured permissions, auditing, and rotation—can provide adequate
protection without an additional hardware layer. Conversely, for keys where compromise would have
a severe impact, isolating the key from the application environment may be a critical security
requirement.
The choice between on-premises and cloud infrastructure is equally important. HYOK (Hold Your Own Key)
can enhance control and cryptographic sovereignty but may also create new operational dependencies.
Separate security domains can improve availability and limit the "blast radius," though at the cost
of reduced direct control over the cloud component. BYOK (Bring Your Own Key) can improve control
over the key's origin but does not, in itself, guarantee full control over its subsequent use. Therefore,
the primary criterion should not be the device brand or the mere presence of an HSM. What matters
is whether the proposed architecture aligns with the key's purpose, classification, access permissions,
availability requirements, and entire lifecycle.
This brings us to another issue: a cryptographic key requires more than just robust protection. It must
also be correctly identified and utilized within an environment where algorithms, protocols, and
security requirements are subject to change. The next part of the series will therefore focus on OIDs
and the identification of cryptographic mechanisms in both the classical and post-quantum worlds.
1. Introductory Provisions
1.1. These General Terms and Conditions are, unless otherwise agreed in writing in the contract, an integral part of all contracts relating to training organised or provided by the trainer, Jan Dušátko, IČ 434 797 66, DIČ 7208253041, with location Pod Harfou 938/58, Praha 9 (next as a „lector“).2. Creation of a contract by signing up for a course
2.1. Application means unilateral action of the client addressed to the trainer through a data box with identification euxesuf, e-mailu with address register@cryptosession.cz or register@cryptosession.info, internet pages cryptosession.cz, cryptosession.info or contact phone +420 602 427 840.3. Termination of the contract by cancellation of the application
3.1. The application may be cancelled by the ordering party via e-mail or via a data mailbox.4. Price and payment terms
4.1. By sending the application, the ordering party accepts the contract price (hereinafter referred to as the participation fee) indicated for the course.5. Training conditions
5.1. The trainer is obliged to inform the client 14 days in advance of the location and time of the training, including the start and end dates of the daily programme.6. Complaints
6.1. If the participant is grossly dissatisfied with the course, the trainer is informed of this information.7. Copyright of the provided materials
7.1. The training materials provided by the trainer in the course of the training meet the characteristics of a copyrighted work in accordance with Czech Act No 121/2000 Coll.8. Liability
8.1. The trainer does not assume responsibility for any shortcomings in the services of any third party that he uses in the training.9. Validity of the Terms
9.1 These General Terms and Conditions shall be valid and effective from 1 October 2024.Consent to the collection and processing of personal data
According to Regulation (EU) No 2016/679 of the European Parliament and of the Council on the protection of individuals with regard to the processing of personal data and on the free movement of such data and repealing Directive 95/46/EC (General Data Protection Regulation, hereinafter referred to as "the Regulation"), the processor xxx (hereinafter referred to as "the Controller") processes personal data. Individual personal data that are part of the processing during specific activities at this web presentation and in the course of trade are also broken down.Information about the records of access to the web presentation
This website does not collect any cookies. The site does not use any analytical scripts of third parties (social networks, cloud providers). For these reasons, an option is also offered for displaying the map in the form of a link, where the primary source is OpenStreet and alternatives then the frequently used Maps of Seznam, a.s., or Google Maps of Google LLC Inc. The use of any of these sources is entirely at the discretion of the users of this site. The administrator is not responsible for the collection of data carried out by these companies, does not provide them with data about users and does not cooperate on the collection of data.Information about contacting the operator of the site
The form for contacting the operator of the site (administrator) contains the following personal data: name, surname, e-mail. These data are intended only for this communication, corresponding to the address of the user and are kept for the time necessary to fulfil the purpose, up to a maximum of one year, unless the user determines otherwise.Information about the order form
In case of an interest in the order form, the form contains more data, i.e. name, surname, e-mail and contact details for the organisation. These data are intended only for this communication, corresponding to the address of the user and are kept for one year, unless the user determines otherwise. In the event that a business relationship is concluded on the basis of this order, only the information required by Czech law on the basis of business relations (company name and address, bank account number, type of course and its price) will continue to be kept by the administrator.Information about the course completion document
Within the course, a course completion document is issued by the processor. This document contains the following data: student's name and surname, the name and date of the course completion and the employer's name. The information is subsequently used for the creation of a linear hash tree (non-modifiable record). This database contains only information about the provided names and company names, which may or may not correspond to reality and is maintained by the processor for possible re-issuance or verification of the document's issuance.Rights of the personal data subject
The customer or visitor of this website has the possibility to request information about the processing of personal data, the right to request access to personal data, or the right to request the correction or deletion of any data held about him. In the case of deletion, this requirement cannot be fulfilled only if it is not data strictly necessary in the course of business. The customer or visitor of this website also has the right to obtain explanations regarding the processing of his personal data if he finds out or believes that the processing is carried out in violation of the protection of his private and personal life or in violation of applicable legislation, and the right to request removal of the resulting situation and to ensure the correction.