=Paper= {{Paper |id=Vol-3402/paper10 |storemode=property |title=The study of the HSM as a solution to file encryption and security |pdfUrl=https://ceur-ws.org/Vol-3402/paper10.pdf |volume=Vol-3402 |authors=Gliqiri Riza |dblpUrl=https://dblp.org/rec/conf/rtacsit/Riza23 }} ==The study of the HSM as a solution to file encryption and security== https://ceur-ws.org/Vol-3402/paper10.pdf
  The study of the HSM as a solution to file encryption and security
  Gliqiri Riza
  University of Tirana, Faculty of Economics, Tirana, Albania


                  Abstract
           Nowadays with the development of technology and the fact that it has influenced every aspect of
           people’s lives, the information is the most essential factor to be considered, since it is the fundamental
           in which technology is being built. On the contrary, cybersecurity attacks are growing rapidly year
           after year since everyone around the world is seriously involved in this wild race of having access to
           the information owned by the others. Data breaches are also growing since hackers and non-authorized
           parties are attacking organizations, companies and other institutions of high importance. As a result,
           more and more companies are considering solutions that not only will protect the information, but will
           also keep un-authorized parties away from having access to it. Encryption is considered one of the
           most classic ways to ensure that sensitive information is converted into secret codes that will hide the
           information from un-authorized access. But what’s the point to encrypting the information, when the
           keys are not totally safe and are at risk of being exposed. Cryptographical keys should be stored, kept
           and managed carefully, since their exposure would disclose the sensitive data the same way it as not
           even encrypted. That is the reason why companies, organizations and institutions globally are using
           Hardware Security Modules as the solution to secure and protect their sensitive data and to provide
           functionality for their cyber security purposes, including authentication, authorization, data
           confidentiality and data integrity. This paper aims to give a brief analysis of what a HSM is, how it
           functions and how it helps the companies and organizations in the context of cybersecurity.
           Furthermore, it will provide information on types of HSMs, architecture, different options offered on the market
           and most common use cases inthe recent years.

                      Keywords
                      Encryption, HardwareSecurityModule, cryptography, randomness, PKI


                                                                                                                                 HSM, which stands for the Hardware Security
  1. Introduction                                                                                                                Module is a physical computing device which can
While there are a lot of measures widely used to
                                                                                                                                 provide functionalities for cybersecurity purposes,
protect sensitive data and keep the un-authorized
                                                                                                                                 including authentication, authorization, data
parties away from having access to certain
                                                                                                                                 confidentiality and data integrity [1].
information, encryption is one of the most used
and well-known methods to hide data’s true                                                                                       The Hardware Security Modules can be used in a
meaning behind secret codes, in such a way that                                                                                  wide variety of platforms and information systems
even if someone has access, he/she can’t                                                                                         environments, where cryptographic functionalities
understand the content without having the proper                                                                                 are used to offer a wider spectrum of protection and
key to decrypt it. On the other hand, encryption                                                                                 security. There are different types of HMSs, such as
has its own disadvantages because key                                                                                            stand-alone devices, plug-in cards or even Hardware
management        brings    potential     security                                                                               Security Modules that are built into other devices.
vulnerability since hackers can steal encryption                                                                                 Recently, the HSMs are well-known for being used
keys and with the stolen key it is quite easy to                                                                                 in cloud infrastructure, web servers, card payment
decrypt the information and have access to                                                                                       systems, banking and similar fields where important
sensitive and supposedly “protected” data. Thus,                                                                                 cryptographic operations such as key generation,
in order to ensure the security, during the recent                                                                               encryption, decryption, signature generation and
years it is being used a key protection solution                                                                                 hash functions are combined with hardware
based on the hardware component of an                                                                                            components to ensure better data protection [2].
information system called HSM.


  Proceedings of RTA-CSIT 2023, April 2023, Tirana, Albania
  EMAIL: gliqeririza@hotmail.com
                   ©️ 2023 Copyright for this paper by its author. Use permitted under Creative Commons License Attribution4.0
                   International (CC BY4.0).
                   CEUR Workshop Proceedings (CEUR-WS.org)
There are two main functions of a Hardware              faced even with the system vulnerabilities. Some of
Security Module:                                        them are for example different applications with
                                                        flawed interfaces, operating systems where
    1.   First of all, one of the most important        protection is not at the best state, security policies
         factors in using a HSM is that it provides     that are often hard to be implemented and users as
         secure management of cryptographic keys        the weakest part, can easily cause the biggest
         used in encryption process. This includes      problems from flawed authentication, absence of
         safe storage of keys, that is made possible    knowledge or bad intentions. As a result, even
                                                        though it is harder to access an encapsulated circuit
         by keeping and encapsulating the keys in
                                                        board (HSM) from the network side, network
         an isolated environment which has              interface can be as weak as the physical one.
         dedicated mechanisms that prevent              Moreover, HSMs are not only used to protect the
         tampering [3].                                 information from un-authorized individuals, but can
    2.   On the other hand, another important           also be used to protect against problematic sites, for
                                                        example, a company can store on an HSM not just
         function of an HSM is also to provide
                                                        SSL private keys but the entire server end of a Web
         hardware acceleration    for  various          application, thus protecting its            customers
         cryptographic operations in order to           information too [4].
         increase the speed by which they are
         performed.
                                                            1.1. Protection in three states
During the recent years, when the development of        HSMs ensure security and protection of sensitive data
technology has entirely changed every aspect of         in all three states of the information:
people’s lives, they are all being exposed to                 Data-in-transit
hackers, who are more and more exploiting               The secure transmission of data-in-transit relies on
vulnerabilities of people, companies or systems to      both encryption and authentication. Encryption does
profit more. It is now a wild race not only to have     not make data secure, but not using encryption,
access to other’s personal data, but also to            however, means that any data-in-transit is totally easy
sensitive or confidential information being             to be read [5]. This is mainly achieved through TLS,
processed in the systems that are being used by         Transport Layer Security, which is the protocol that
companies,       hospitals    and      governmental     works on the top of the transport layer to secure
institutions. As a result, since cryptography is        application traffic and to provide end-to-end secure
always necessary when having something to               communication [6].
protect, like information or money, HSMs                      Data-at-rest
combine additional hardware features, to ensure a       This is also considered as storage encryption. It
more secure background for critical information         protects data while it resides on the media/ device and
and financial assets. Thus, considering that            it involves encrypting data that will be decrypted
cryptography is being used to protect secret data,      when it flows through the same point in the opposite
the most important components that should be            direction [7].
taken special care of are the encryption and                  Data-in-use
decryption keys used in the process, in order to be     HSM ensure security of data-in-use predominantly by
kept secret from adversary and also to ensure
                                                        TEE, Trusted Execution Environment which is
confidentiality, integrity and availability. On the     commonly known as an isolated processing
other hand, every time data or information              environment in which applications can be securely
security is being discussed, it is said that physical   executed irrespective of the rest of the system [8].
component are always more vulnerable when it
comes to attacks or exposure. In this perspective,
how safe is it for companies, banks or institutions       2. Cryptography and Security
to use the Hardware Security Modules as a critical      Applying cryptographical operations in the real
component for the encryption key management?            word systems requires some specifications and one
In the context of banks or other financial              of the most important factors is randomness.
institutions that use the card payment method and       Processes like key generation and management,
the HMSs architecture, physical protection has          algorithms, encryption of information need
always been one of the most important things to         unpredictable randomness even by a lot of efforts.
be remembered, even though in this case attacks         As a result, this can be quite challenging and
via the software running the host computer of the       difficult to be performed on a standard computer or
HSM are neither less dangerous nor serious.             computing       environment.    Many      types    of
Nowadays everyone that has access on a network          cryptographical algorithms such as RSA, DSA, and
such as office or school workstation, accessing         Diffie-Hellman can be difficult for a standard CPU,
the Internet as a personal commodity or being           since at the same time, this machine should also
                                                        handle Web requests, update information, manage
part of a more modern computing environment,
                                                        network packets, organize interactive user responses
has been
and so on. Thus, these processes are really time-        this happens, hardware-derived bits can be
consuming and the machine has to do them in              reprocessed through a pseudorandom number
cycles and still manage to be performant [9]. This       generator. There are two types of generators for
is the reason why, in order to ensure the process        producing random number sequences: True Random
is going to work fine and data protection and            Number Generators (TRNGs) and Pseudo Random
security are still a priority, standard machines are     Number Generators (PRNGs). Furthermore, since bits
supplied with additional specialized hardware            are generated at some finite rate, it is better to
that will perform key generation and                     consider if there are enough bits available for the
management. In this case, the additional                 process.
hardware is the Hardware Security Module.
HSMs support both symmetric and asymmetric               2.1.1. TRNGs and PRNGs
(public-key)       cryptography.       For     some      Random number sequences are the fundamental for
applications, such as certificate authorities and        many cryptographic algorithm and applications,
digital signing, the cryptographic processes are         especially for the generation of strong and secure
managed in asymmetric key pairs. On the other            keys that cannot be discovered by hackers or other
hand, with applications such as data encryption or       attackers. This is the reason why it is important for
financial payment systems, the cryptographic             the generated random numbers to be unpredictable.
algorithm consists mainly of symmetric keys              There are different types of statistical tests that can
[10].                                                    be applied to a sequence to evaluate the fact that the
From the Public-key cryptography context, basic          sequence is truly random. To check the randomness
RSA encryption usually requires an algorithm             of sequences many different indexes are suggested.
carefully designed to avoid cryptographic                Each index emphasizes only one part of the
weaknesses. Signature verification for example           phenomenon and measures its different aspects, for
requires performing cryptographic hashes and             example, the distribution of elements in the
because of such processes and operations, an             sequence,     dependencies     between      contiguous
HSM’s cryptographic performance can incur an             reactions, counting tendencies, etc. They are
unexpected dependence on the internal CPU,               classified as Miyake et. al., 2000; Friedman &
especially if the HSM is matched with a too-slow         Miyake, 2004; Towse & Neil, 1998. The first checks
CPU [4]. On the contrary, as it was stated above,        equality of distribution of different possibilities, the
another application of HMSs is related to                second checks indexes concerning relationships
symmetric cryptography. It often operates on very        between consecutive responses and the third
large data items and since a fast machine does not       concerns repetitions of the same options in different
help the process if it is fed slowly. This can result    distances [12].
in an HSM that performs fast symmetric                   In the context of random number sequences there are
cryptography, only when data items are                   two main sources to generate them. TRNGs are
sufficiently massive and on smaller data items, the      systems which extract randomness from non-
speed will be smaller too.                               algorithmic random phenomena, like temperature
                                                         fluctuations, radioactive decay, ambient radio noise,
2.1. Randomness                                          hard disk access times, or user interactions with the
As it was mentioned above, one of the most               PC. Since the phenomena used are unpredictable,
important factors required for the HSMs to               TRNGs produce real random data instead of just
function properly is randomness. Furthermore, for        random periodic sequences [13]. A PRNG, on the
ensuring correct cryptographical operations, the         other hand, is an algorithm that generates numbers
seed used should be expanded into a longer               that appear random. They are normally constructed
sequence that has to be random and undiscoverable        from primitives such as block ciphers, hash
from any adversary [4]. As a result, in the key          functions, and stream ciphers [14]. PRNGs require
generation      and      management          process,    some input (seeds), along with some deterministic
unpredictable and high-quality randomness is             algorithms to generate multiple pseudo random
considered fundamental since it should avoid             numbers. They are faster than True Random Number
worries and confusion related               to     the   Generators and as a result are preferable when
undiscoverable seed, or the failure of the algorithm     several random-like numbers or sequences are
used for the process [3]. This is the reason why         required. TRNGs, as it was stated above, make use of
HMSs are used to generate keys. Their architecture       non-deterministic sources along with some post-
is built as a hardware-based random number               processing functions for generating randomness [15].
generator, which generates random bits from the
laws of physics, such as for example via a noisy         2.1.2. Noise sources
diode. On the other hand, as a physical component        Random number sequences need entropy and the
of a system, HSMs as a hardware-based solution,          main source how it is caused is from a noise source.
have their disadvantages, because sometimes the          Noise sources are divided into two categories,
bits need to be reprocessed to correct for statistical   physical and non-physical sources. Physical noise
bias. According to NIST’s standards [11], when
sources use dedicated hardware to generate               frequency, temperature and voltage detection features,
randomness; whereas non-physical noise sources           offered together with the user’s guide to each method in
use system data or human interaction input to            order to customize his/ her own needs.
generate randomness. As system data is used for
example the output of API functions or data                  2.3. Main functionalities
derived from RAM, while human inputs include
for example keyboard strokes or mouse                    The Hardware Security Modules have a wide variety
movements that are caused by the interaction with        of uses that not only help in the encryption of
the machine.                                             information, but also ensure the data protection and
                                                         security. Thus, there are some fundamental purposes
Since physical noise sources are considered to           in the HSMs usage such as:
offer greater randomness, they are used in HSMs
in order to ensure more secure cryptographical           2.3.1. Generate, store and protect
processes. Moreover, it is easier to find physical       cryptographic keys for the system’s PKI.
noise sources in the environment. These sources
include physical phenomena such as thermal noise,        HSMs, whether they are standalone network-
atmospheric noise, radioactive decay, keyboard           connected or plug-in devices, have built-in random
strokes or coin tossing. Noise sources are divided       number generators that provide randomness and
in two classes:                                          unpredictability of the keys [17]. Also, since they
     Quantum-based noises                               are separate from servers, keys are kept secure from
     Non-quantum-based noises                           generation to revocation or any possible destruction.
Noise sources based on quantum effects are very          Furthermore, since HSMs are temper-resistant on
complex in implementation, but give stable results,      both sides, physical or logical, their architecture is
while non-quantum sources are more economical,           built such that erases or destroys all the
yet give unstable results. The quality of them           cryptographic data in order to prevent corruption.
depends on various factors such as temperature           This is known as ‘zeroization’. According to NIST,
[13].                                                    after a key or a piece of secret data is destroyed/
                                                         zeroized, no information about its value can be
    2.2. Tamper resistance                               recovered [11].
In cryptography and data encryption, the algorithm
                                                         2.3.2. Protection of keys from
used in the process is public and anyone can have        extraction.
direct access to it. On the contrary, the difficult
part and the factor which ensures the security is the    An HSM encrypts the encryption keys in order to
key being used. It is the most essential part since it   prevent the extraction of the plaintext, which would
is also being used again in the decryption process.      make the decryption process very easy.
In symmetric cryptography key length is 64-256
                                                         Furthermore, systems can use the encrypted keys
bits while for the asymmetric algorithms the keys        even without having direct access to them [10].
used are 256- 4096 bits. Since the way to get the        Even more, the keys can be protected in all the
key is from analyzing the plain-text and the cipher-
                                                         workflow phases, production, testing and
text, for algorithms such as AES, it takes a very        implementation. But it is suggested that the same
long time to calculate the result. Thus, they are        HSM should not be used across different computing
considered quite secure.                                 environments. Using a stand-alone HSM helps to
On the other hand, the hacker who wants to reveal        prevent key exposure so the affected processes are
the key in order to decrypt the information being        more secure and protected.
interested for, will find a way to this data. Since
the key is being stored in the memory, due to
system flaws or the effort of the hacker, it can be
                                                         2.3.3. Improve server performance.
disclosed. The resistance against the attacks or the
                                                         Since the HSMs are stripped-down and standalone
hacker’s efforts to gain access to the key is called
                                                         devices/ processors, they that can perform
tamper resistance and is one of the most important
                                                         operations on their own. On the other hand, some
things to be considered while designing a
                                                         types of HSMs are equipped to act as web traffic
computer system [16].
                                                         accelerator. As a result, behaving in such a way,
                                                         offloading cryptographic operations and maintaining
Tamper resistance can be physical and logical.
                                                         load balance, they improve the overall server
Since HSMs are tamper-resistant on both these
                                                         performance.
sides, makes them a secure solution for data
protection. There are many tests and mechanisms
to detect either physical or logical tampering.
                                                         2.3.4. Ensure compliance with security
HSM vendors, together with their product offer the
                                                         regulations and audit processes related
tamper detection tools or functionalities too. Intel
                                                         to data being processed.
for example offers the possibility to enable the
Another important characteristic of the HSMs is         of the company and its customers is being exposed.
that recently, with the development of technology       As a result, even if the information is encrypted, with
and security policies, they are validated hardware      the discovered key, the information is neither secure,
components too. This ensures               security     not protected any more. This can be avoided if the
compliance because, they meet specific industry         keys are stored in a secure HSM, which will not only
standards. For example, as a typical computing          protect them, but also ensure strong security.
device they provide logs that inform the host
about different processes such as the                   But why should a company use a Hardware Security
cryptographic operations they are programmed to         Module, when its cost is something to be considered
perform, the time when these operations were            and on the other hand web server’s architecture is
carried out, and the responsible party for              supposed to offer some built-in functionalities that
authorizing the operations and processes.               can also ensure protection?
                                                        The answer is very simple. Since HSMs are isolated
According to NIST, the Hardware Security                devices, with limited usage and as a result limited
Modules as critical key management components           attack vectors too, they provide significantly more
of the physical infrastructure that makes secure        secure key storage than a traditional web server.
key storage and cryptographic operations possible       Web servers are used to run many applications and
[18]. Globally, the HSMs are used for various           functionalities and since the access is larger, the
usages in all industries, either of critical            danger is on a larger scale too, because hackers have
importance, or less serious, yet important, such as     a higher chance to exploit the vulnerabilities. That is
[18]:                                                   the reason why there are some industries where it is
                                                        better to use the HSMs instead of a server’s security
    -   Certificate authorities (public and private     functionalities itself. As we stated before,
        CAs),                                           companies use these devices to use and store the
    -   Government         and     public     sector    keys they use to sign their PKI certificates, software
        organizations,                                  code and documents, to keep them more protected.
    -   Cloud service providers and vendors,            Furthermore, public certificate authorities use these
    -   Banks, credit card companies and other          devices to create, store and manage their sensitive
        financial institutions,                         keypairs too.
    -   Blockchain platforms and entities,
    -   Automotive manufacturers,                           3.1 HSM vs TPM
    -   Entertainment service providers, and            Hardware security modules are isolated hardware
    -   IoT device developers and manufacturers.        components and tamper- and intrusion-resistant
                                                        devices that are used by organizations and
  3. How does a HSM work?                               companies to store and protect cryptographic keys
The way how HSMs work is similar to a vending           [4]. Then, all the cryptographic functions are being
machine or an ATM, even though their purposes           processed within the HSM’s secure environment,
are totally different. Both vending machines or         ensuring security and data protection, since the
ATMs are isolated environments where things like        private keys are hidden in the HSM where risk of
food, drinks or money are kept. So, in order to         exposure is very low and sensitive data is also
take something from a machine, a person should          immune from becoming corrupted or compromised.
at first put something in to take the desirable thing   While all these operations are being processed, keys
out; for example, put some coins in to take the         are available to be used by authorized users or
food out, or put the card and withdraw the money        employees who can use the keys without needing
back from the ATM. In this entire cycle, the            direct access to them [10]. Since their purpose is,
involved person never changes or interferes with        not only to secure the keys but also to control the
something else inside the machine. The HSM is           access, limiting the risk of exposure for the private
also an isolated computing environment that             keys, using HSM, the system can execute
accepts user inputs and generates outputs, but the      cryptographic functions and authentication without
user can neither see nor access the internal            loading a copy of your private key into memory on
operations of the device that made the process go       your web server, where it can be hosted. This is
like it was intended. HSM generates for example         more secure even for the system, since web servers,
a signed certificate, but the user cannot see, access   as it was stated above are more vulnerable to attacks
or modify the cryptographic key that made it            and hackers. On the contrary, it is often thought that
possible. All in all, what is enough for the user is    a Hardware Security Module is version of a TPM,
the encryption keys safety, because data can be         which stands for Trusted Platform Module, because
encrypted, yet information is not secure if the keys    first of all, both HSMs and TPMS are tamper-
are exposed. If it is supposed for example that an      resistant hardware components and are globally used
authorized user exploits a system vulnerability         by the organizations and companies for the
and leaks sensitive data to the public, the private     cryptographic operations, in order to ensure security
key that is used to secure the financial information    and protection. But they are not the same thing and
there is a huge difference between both of them.       negative voltage applied transistor will generate
                                                       noise, in order to have a readable yet unrecognizable
A Trusted Platform Module is a hardware                output of statistically random bits.
component that is incorporated into individual              The tamper evidence module
devices and is specific for the “parent” device.       This module will zeroize the key in two different
Thus, TPMs are computer chips that are physically      scenarios: when the casing has been removed or when
attached to the device’s motherboards to secure        an attacker is drilling into the case [20]. The
their PKI keys while keeping them separate from        microcontroller will poll the alert signal from the
the device’s CPU memory. This feature is used to       circuit and when an alert is sent it will also zeroize
ensure device integrity and provide an isolated        the keystore.
environment for the cryptographic operations [19].
                                                           3.4. HMSs and Moore’s Law
A Hardware Security Module is on the other hand        Moore’s Law is a techno-economic model that has
an external device that can handle operations and      enabled the IT industry to double the performance
processes related to many devices and                  and functionality of digital electronics roughly every
applications across an organization’s network.         2 years within a fix cost, power and area [21].
These hardware devices neither are limited to          Moore's Law as an observation that the number of
individual machines, nor incorporated into them        transistors on a microprocessor chip doubles
and as a result they’re intended for use at-scale by   approximately every two years, leads to the fact that
applications and servers across your organization.     the increase of number of transistors, will eventually
                                                       increase the computing power of a machine, yet cost
    3.3. Architecture                                  and other components remain the same. As a result,
                                                       this change affects not only the hardware components
                                                       of the systems, but has also a great impact on the
                                                       security of cryptographical algorithms and processes.
                                                       As computing power increases, it is easier for
                                                       symmetric key algorithms such as DES (Data
                                                       Encryption Standard) and              AES       (Advanced
                                                       Encryption Standard) to be broken, even though there
                                                       was a time these algorithms were considered secure.
                                                       On the contrary, it is not always true that the only
                                                       component that affects the break of a cryptographic
                                                       algorithm is the increased computing power
                                                       influenced by Moore’s Law. The RSA (Rivest-
                                                       Shamir-Adleman) algorithm for example is still
         Figure 1 HSM Block Diagram [20]               considered secure. This happens because, its security
                                                       is based on the difficulty of factoring large prime
As it is seen in the diagram above, there are four     numbers, which is neither affected by Moore's Law,
main parts in the HSM’s physical and logical           nor determined by increased computing power.
architecture [20]:                                     Therefore, considering HMSs, Moore’s Law result
     The control/ encryption module                   also affects their performance, creating stronger and
The control module performs operations like            more powerful computing devices over the time, but
encryption, decryption or key management.              it is not the only factors that determines their security.
Moreover, the control module uses Cipher Block
Chaining (CBC) AES, a more complex version of            4. Types, options and common use
AES for the encryption and decryption processes.            cases
     The power supply                                 As it was stated above, HSMs as dedicated and stand-
According to Papa et al [20], the main source of       alone or plug-in processors, specifically designed for
power for the HSM is a USB power supply with an        the protection of the secret keys, are used by
output of 5 volts that will allow to power all the     enterprises to protect secret information such as
components of the device. The 3volt lithium            transactions, identities or financial data applications,
battery, on the contrary is included for the tamper    by securing cryptographic operations, helping in
evidence module when the device is not connected       encryption, decryption, authentication and digital
by USB, to ensure the device’s safety.                 signing services processes.
     Random Number Generator module
The Hardware Random Number Generator, as it
was stated above is essential for this encryption
processes of a HSM. The HRNG does not use a
seed, but transistor uses a noise source to generate
random bits. In this case [20], a reverse biased or
                                                        according to some specified cryptographic
    4.1. HSMs in card payment systems                   principles, which emphasize how the HSM should
                                                        behave in specific scenarios and under specific
One of the most important uses of the HSMs is for       conditions, to ensure the functionalities are applied
sure in card payment systems [4], where they            [22]. That is the reason why most of them use
normally provide security via the cryptography          vendor-neutral APIs to facilitate communication and
principles. Some of their common use cases in the       cryptographic services, the HSM is used for.
payment industry are:
     PIN generation, management and                    Payment Hardware Security Modules
        validation                                      As it was mentioned above, the second category of
     PIN block translation during the network          HSMs are the ones used in the payment industry. In
        switching of ATM and POS transactions           the same way as general purpose HSMs, they are
     Card, user and cryptogram validation              also isolated, temper-resistant and are used by
        during payment transaction processing           businesses to store and secure the keys, but they are
                                                        more specialized, since they are more custom-built
     Payment credential issuing for payment
                                                        in order to ensure a better key management in the
        cards and mobile applications
                                                        financial applications, transactions and card
     Point-to-point encryption (P2PE) key
                                                        payment processes [2], that also have a special
        management and secure data decryption
                                                        importance. As a result, they should be compliant to
     Sharing keys securely with third parties to
                                                        different standards compared with the general-
        facilitate secure communications.
                                                        purpose ones. Often the interfaces used for these
                                                        HSMs are also different, since they should meet the
                                                        specified security requirements.
Another important feature to be discussed is that
with the development of technology, there are a lot
of options to choose. Nowadays HSMs come in a               4.3. Quantum Computing and the
wide variety of options related to physical sizes               future
and applications. Some of them can be small plug-
                                                        One of the most important developments of the last
in cards or USB drives, while others are large
                                                        decades is quantum computing. It combines
external devices that should be stored and kept in
                                                        information theory and quantum mechanics to create
secure locations. Hardware security modules can
                                                        a new era of computation and technology. According
be very expensive because the initial price does
                                                        to National Security Agency [23], quantum
not include other costs such as additional
                                                        computers can perform mathematical algorithms
hardware, support, and maintenance. But, in case a
                                                        exponentially faster than a classical computer. In
company or organization cannot afford to buy one
                                                        place of ordinary bits used by today’s computers,
or more HSMs, it can use the cloud-based option,
                                                        quantum computers use “qubits” that behave and
because some of the biggest HSM vendors like
                                                        interact according to the laws of quantum mechanics.
Amazon Web Services offer the cloud-based
                                                        This quantum physics-based behavior would enable a
HSM’s products and services. When using cloud
                                                        sufficiently large-scale quantum computer to perform
as such solution, a company can:
                                                        specific mathematical calculations that would be
     Rent a physical HSM appliance that can            infeasible for any conventional computer.
        be stored in the company’s off-site data
        center.                                         Even though recently quantum mechanics are still
     Pay for access to the functionalities of          being discovered and their implementation in the real
        an HSM vendor’s device or appliance.            world’s applications is still low, laboratory
     Pay for access to a virtual environment           experiments       have      demonstrated      quantum
        within a vendor’s shared HSM.                   computations with several quantum bits performing
                                                        dozens of quantum operations and this will totally
So, when it comes to using one of the options, or       change the future. For now, it does not provide
the other, there are advantages and disadvantages       efficient solutions to all problems. Strong limitations
too. It is up to the company itself and what it needs   on the power of quantum computation are known
for the work processes.                                 since it has been proven that quantum computation
                                                        provides no significant advantage over classical
    4.2. HSMs types                                     computation and yet, quantum information processing
                                                        has changed forever the way in which quantum
There are two main types of HMSs:                       physics is understood [24].
General Purpose Hardware Security Modules
In the General purpose HSM’s group are included         From the cryptography and HSMs perspective, the
the HSMs that all the companies and                     development of quantum computing will also affect
organizations globally use in the context of cyber      the future, but the first thing to be considered is that,
security. These devices are typically built             since quantum computing technology is not yet in
general use, what is discussed is like a              expenses vs risk and it is up to the company itself to
projection for the future. Despite considering        choose the best option. Considering how critical the
this, since the basic principle of quantum            information is and if it is worth spending a certain
computing is creating a new kind of super-            amount of money on security, there comes a point
performant      computational        environment,     when a decision should be made.
different from the traditional and actual one,        When it comes to the future, as time progresses, host
quantum computing will process huge amounts           CPUs tend to get faster, thanks to Moore’s Law, even
of data. This will therefore lead to major            though hardware stays the same, so the future trends
advances in cybersecurity, such as Quantum            have to consider this part, since complex cryptographic
Key Distribution. As a result, quantum                operations will need faster hardware devices too, the
cryptography and its applications in encryption       same way as the faster processors are implemented.
and decryption processes, will create stronger        Moreover, Quantum Computing and its future
algorithms and eventually, stronger and               application in cryptographical algorithms and
unbreakable keys. On the contrary, application        processes, will also affect the computational
of quantum techniques can also be seen as a           performance and security of HSMs.
threat since it could be used to break
cryptographic keys currently in use because             1. References
current web applications are very vulnerable to          [1] Yu W., Li W., Wang J., Wei C., “A study of
quantum techniques. Yet, this is one of the                  HSM based key protection in encryption file
greatest challenges of the future, to manage the             system”, 2016 IEEE Conference on
process really well and to combine quantum                   Communications and Network Security
techniques for stronger and more secure                  [2] E. Bonner, J. O’ Raw, K. Curran,
hardware and software components of the                      “Implementing the Payment Card Industry
systems.                                                     (PKI) Data Security Standard (DSS)”, Volume
                                                             9, Number 2
  5. Conclusions and future work                         [3] M. Folkemark, V. Rydberg, “Performance
To sum up, HSMs are isolated hardware                        evaluation of a Hardware Security Module in
components that are used by companies and                    Vehicles”, University of Gothenburg, 2021
organizations to store, protect and secure the key       [4] Smith S. W., "Hardware Security Modules." In
used in the cryptographic operations that are                B. Rosenberg (editor). Handbook of Financial
being processed within the isolated computing                Cryptography and Security”. Chapman and
environment. When discussing HSMs there are                  Hall/CRC. 2010. 257--278.
two main perspectives, security of the key and           [5] J. Vesperman, “Introduction to Securing Data
security of the data decrypted by the key. So, the           in     Transit”,         chrome-
HSM operates as "a separate server", where app               extension://efaidnbmnnnibpcajpcglclefindm
server sends the encrypted data for decryption               kaj/https://tldp.org/REF/INTRO/SecuringData-
and the cleartext data comes back in the pp                  INTRO.pdf
server. In this process, protecting the key is more      [6] A. Satapathy, J. Livingston, “A Comprehensive
important than protecting the data in packets,               Survey on SSL/TSL and their Vulnerabilities”,
and this is what a HSM ensures.                              International       Journal     of     Computer
As any other component of the system, using a                Applications (0975 – 8887), Volume 153 –
HSM has its advantages and disadvantages too.                No5, November 2016
A HSM can be quite expensive to purchase,                [7] Storage Networking Industry Association,
maintain, and operate, and since they are usually            “Storage Security: Encryption and Key
priced on transaction throughput, the more data              Management”, August 2015
you need to decrypt at a time, the more                  [8] M. Sabt, M. Achemlal, A. Bouabdallah,
expensive the HSM is. Furthermore, when                      “Trusted Execution Environment: What It Is
buying an HSM, probably you as a company will                and What It              Is Not”,
spend a lot of time learning how to use it, how to                  chrome-
perform key management and implementation                    extension://efaidnbmnnnibpcajpcglclefindm
into the existing systems.                                   kaj/https://hal.science/hal-
On the other hand, if a company uses existing                01246364/file/trustcom_2015_tee_what_it_i
server’s functionalities in order to ensure data             s_what_it_is_not.pdf
security or chooses to build its own server to           [9] P.     Kocher,        “Timing      Attacks  on
perform the decryption of the data, it should                Implementations of Diffie-Hellman, RSA,
make a lot of efforts to harden it against attacks,          DSS, and Other Systems. In Advances in
issuing certificates to authorized app servers,              Cryptology—Crypto 96”. Springer-Verlag
performing audits, managing security policies                LNCS 1109, 1996.
and so on. As a result, this will cost less than         [10]A. Ramesh, A. Suruliandi, “Performance
buying an HSM, but the key is still at more risk             analysis of encryption algorithms for
than in a HSM. Given all that, it is a matter of             Information Security” in 2013 International
     Conference on Circuits, Power and                   ce445/
     Computing Technology.                          [21] L. Shalf, “The future of computing beyond
[11] National Institute of Standards and                 Moore’s Law”, Lawrence Berkeley National
     Technology           (2002)         Security        Laboratory,
     Requirements         for     Cryptographic          https://www.researchgate.net/publication/3386
     Modules.       (U.S.     Department       of        99741_The_future_of_computing_beyond_Mo
     Commerce, Washington, D.C.), Federal                ore's_Law
     Information      Processing       Standards    [22] T.      Gendrullis,    M.     Wolf,    “Design,
     Publication (FIPS) 140-2, May 25, 2001              Implementation, Evaluation of a Vehicular
     (Change       Notice     2,      12/3/2002).        Hardware Security Module”, part of Lecture
     https://doi.org/10.6028/NIST.FIPS.140-              Notes in Computer Science book series,
     2                                                   volume 7259
[12] J. Barbasz, Z. Stettner, M. Wierzchon,         [23] National       Security Agency, “Quantum
     K. T. Piotrowski, A. Barbasz, “How to               Computing and Post-Quantum Cryptography”,
     estimate the randomness in random                   chrome-
     sequence generation tasks?”, chrome-                extension://efaidnbmnnnibpcajpcglclefindmkaj
     extension://efaidnbmnnnibpcajpcglclefin             /https://media.defense.gov/2021/Aug/04/20028
     dmkaj/https://core.ac.uk/download/pdf/1             21837/-1/-1/1/Quantum_FAQs_20210804.PDF
     54361007.pdf                                     [24] E. Reiffel, W. Polak, “Quantum Computing,
[13] O. Petura, “True random number                      aGentle          Introduction”,        chrome-
     generators for cryptography: Design,                extension://efaidnbmnnnibpcajpcglclefindmkaj
     securing and evaluation”, University of             /http://mmrc.amss.cas.cn/tlb/201702/W020170
     Lyon,             2019,             chrome-         224608150244118.pdf
     extension://efaidnbmnnnibpcajpcglclefin
     dmkaj/https://theses.hal.science/tel-
     02895861/document
[14] H. Ng, “Simple Pseudorandom Number
     Generator with Strengthened Double
     Encryption         (Cilia)”,        chrome-
     extension://efaidnbmnnnibpcajpcglclefin
     dmkaj/https://eprint.iacr.org/2005/086.p
     df
[15] R. Soorat,          M. Kandukuri, A.
     Vudayagiri, “Hardware Random number
     Generator        for        cryptography.”,
     https://www.researchgate.net/publicatio
     n/282639432_Hardware_Random_numb
     er_Generator_for_cryptography
[16] T. Fujino, T. Kubota, M. Shiozaki,
     “Temper-resistant             cryptographic
     hardware”, IEICE Electronics Express,
     Vol.14, No.2, 1–13
[17] N. Saboonchi, “Hardware Security
     Module Performance Optimization by
     Using a ‘Key Pool’ Generating keys
     when the load is low and saving in the
     external storage to use when the load is
     high”, Sweden, 2014
[18] The National Institute of Standards and
     Technology (NIST) Special Publication
     “Recommendation              for        Key
     Management: Part 2 — Best Practices
     for Key Management Organizations”
     (SP- 800-57 part 2, rev 1)
[19] J. D. Osborn, D. C. Challener, “Trusted
     Platform Module Evaluation”, Johns
     Hopkins Apl Technical Digest, Volume
     32, Number 2, 2013
[20] F. Papa, C. Fisher, N. Schiesl,
     “Hardware Security Module”, chrome-
     extension://efaidnbmnnnibpcajpcglclefin
     dmkaj/https://courses.engr.illinois.edu/e