Apparatus and method for controlling use of encryption key

By binding the master key and its usage policy in the hardware security module (HSM), ensuring that the master key is only used when configured correctly, solving the problem of master key security and compliance during the HSM initialization process, improving the security Key security and compliance.

CN118923077APending Publication Date: 2024-11-08NCIPHER SECURITY LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202380030984.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-31
Filing Date
2023-03-29
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

During the initialization of the hardware security module (HSM), the security of the master key is subject to incorrect configuration and external system security dependencies, resulting in possible security vulnerabilities and compliance violations.

Method used

By binding the master key to its usage policy (ACL), the master key is only allowed when the HSM is correctly configured, using the "exact match" and "at least as strict" standards to compare the configuration and policy consistency of the HSM to ensure the master The keys are stored and used only under appropriate conditions.

Benefits of technology

Effectively reduces the risk of using master keys in unprovisioned HSM, improves the security and compliance of keys, and reduces dependence on external system security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118923077A_ABST
    Figure CN118923077A_ABST
Patent Text Reader

Abstract

A computer-implemented method for controlling the use of a first encryption key in a device, where the device stores first information specifying a configuration of the device. The method includes: obtaining a first encryption key and second information specifying a device configuration allowing use of the first encryption key; comparing the second information with the first information to determine whether the first information is consistent with the second information; and performing a first operation on the device using the first encryption key in response to determining that the first information is consistent with the second information.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the priority of European patent application 22275040 filed on March 31, 2022, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present invention relates to a device and method for controlling the use of encryption keys. The device may be, for example, a hardware security module. Background Art

[0004] A variety of devices can be used to execute cryptographic algorithms. A hardware security module (HSM) is a device that securely stores and manages cryptographic keys and executes a set of cryptographic algorithms. In many cases, before putting an HSM into use (e.g., before deployment), the user performs an initialization process. The initialization process can include: loading the master key into the HSM's persistent storage device and establishing global HSM configuration settings.

[0005] The master key is an encryption key used to protect the user's encryption keys. Specifically, other encryption keys (e.g., application keys) can be encrypted using the master key for storage outside the HSM. Security vulnerabilities associated with the use of the master key may affect the security of all keys encrypted by the master key. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Devices and methods according to non-limiting embodiments will now be described with reference to the accompanying drawings, in which:

[0007] Figure 1 A schematic diagram of a hardware security module device according to an embodiment is shown;

[0008] Figure 2 A method of controlling use of a first encryption key according to an embodiment is shown;

[0009] Figure 3 A method of controlling use of a first encryption key according to another embodiment is shown;

[0010] Figure 4 A method of controlling use of a first encryption key according to a further embodiment is shown;

[0011] Figure 5A A comparison of the "exact match" and "at least as strict" criteria according to a first example is shown;

[0012] Figure 5B shows a comparison of the "exact match" and "at least as strict" criteria according to a second example;

[0013] Figure 5Cshows a comparison of the "exact match" and "at least as strict" criteria according to a third example;

[0014] Figure 5D shows a comparison of the "exact match" and "at least as strict" criteria according to a fourth example;

[0015] Figure 5E A comparison of the "exact match" and "at least as strict" criteria according to a fifth example is shown.

[0016] Throughout the drawings, the same reference numerals are used to refer to the same components or functions. DETAILED DESCRIPTION

[0017] According to a first aspect, there is provided a computer-implemented method for controlling use of a first encryption key in a device, wherein the device stores first information, the first information specifying a configuration of the device. The method comprises: obtaining the first encryption key and second information, the second information specifying a device configuration that allows use of the first encryption key; comparing the second information with the first information to determine whether the first information is consistent with the second information; and in response to determining that the first information is consistent with the second information, performing a first operation on the device using the first encryption key.

[0018] In an embodiment, the device is a Hardware Security Module (HSM).

[0019] In an embodiment, the hardware security module is configured according to information specifying a first configuration.

[0020] In an embodiment, the method comprises: performing the first operation only when the first information is consistent with the second information.

[0021] In an embodiment, the obtaining step and the comparing step are performed by the device.

[0022] In an embodiment, obtaining a first encryption key and a second information includes: receiving a command to store the first encryption key in a persistent storage device of the device, wherein the command includes the first encryption key in encrypted form and the second information, wherein the first encryption key and the second information are bound together, and wherein performing a first operation includes storing the first encryption key in the persistent storage device.

[0023] In an embodiment, the method further comprises: in response to determining that the first information is inconsistent with the second information, rejecting the command to store the first encryption key.

[0024] In an embodiment, obtaining the first encryption key and the second information includes retrieving the first encryption key and the second information from a persistent storage of the device in response to receiving a command to use the first encryption key in the first operation.

[0025] In an embodiment, the method further comprises: in response to determining that the first information is inconsistent with the second information, rejecting a command to use the first encryption key in the first operation.

[0026] In an embodiment, the method further comprises receiving a command to store the first encryption key in a persistent storage of the device, wherein the command comprises the first encryption key in encrypted form and the second information, and wherein the first encryption key and the second information are bound together.

[0027] In an embodiment, the first operation includes: decrypting the second encryption key using the first encryption key, or generating the second encryption key using the first encryption key.

[0028] In an embodiment, the first information includes a first set of configurable properties; the second information includes a second set of configurable properties; and wherein: the first set of configurable properties and the second set of configurable properties each include at least one of the following items: enabled functions of the device, identification of encryption keys, operations that can be performed on master keys, compliance mode of the device, enabled / disabled encryption algorithms, input / output settings of the device, and attributes of the device. Optionally, the configurable properties in the first information may be different from the configurable properties in the second information.

[0029] In an embodiment, determining whether the first information is consistent with the second information comprises: in response to determining that the first set of configurable properties consists of the second set of configurable properties, determining that the first information is consistent with the second information.

[0030] In an embodiment, if the first information contains at least the configurable properties in the second information and only the configurable properties in the second information (ie, the same configurable properties, and the number does not exceed), then the first information is consistent with the second information.

[0031] In an embodiment, the method further comprises: if the first set of configurable properties does not consist of the second set of configurable properties, determining that the first information is inconsistent with the second information.

[0032] In an embodiment, the first set of configurable properties includes a first configurable property having a first value, the second set of configurable properties includes a first configurable property having a second value, and wherein determining whether the first information is consistent with the second information includes: in response to determining that the first value is equal to the second value, determining that the first information is consistent with the second information.

[0033] In an embodiment, determining whether the first information is consistent with the second information comprises: in response to determining that the first set of configurable properties includes the second set of configurable properties, determining that the first information is consistent with the second information.

[0034] In an embodiment, the method further comprises: if the first set of configurable properties does not include the second set of configurable properties, determining that the first information is inconsistent with the second information.

[0035] In an embodiment, the first group of configurable properties includes a first configurable property having a first value, the second group of configurable properties includes a first configurable property having a second value, and wherein determining whether the first information is consistent with the second information includes: in response to determining that the first value is equal to or greater than the second value, determining that the first information is consistent with the second information.

[0036] In an embodiment, obtaining the first encryption key and the second information includes receiving the first encryption key and the second information combined and in encrypted form.

[0037] In an embodiment, the first encryption key and the second information are received via a secure channel between the device and the user.

[0038] In an embodiment, obtaining the first encryption key and the second information includes: receiving encrypted signature information. Optionally, the first encryption key and the second information are encrypted using a communication key.

[0039] In an embodiment, the device may have access to a communications key.

[0040] According to a second aspect, there is provided a computer-readable medium comprising instructions which, when executed by a processor, cause the processor to perform a computer-implemented method according to any one of the preceding embodiments.

[0041] According to a third aspect, a computer-implemented method is provided, comprising: generating a first encryption key and information specifying a device configuration that allows the use of the first encryption key; generating a command to store the first encryption key in the device, wherein the command comprises the first encryption key in an encrypted form and information specifying the device configuration, wherein the first encryption key and the second information are bound together; and sending the command to the device.

[0042] According to a fourth aspect, there is provided a computer readable medium comprising instructions which, when executed by a processor, cause the processor to perform the computer implemented method of the third aspect.

[0043] According to a fifth aspect, a security device is provided, comprising: a persistent memory configured to store first information, the first information specifying a configuration of the device; and one or more processors, the one or more processors configured to: obtain a first encryption key and second information, the second information specifying a device configuration that allows use of the first encryption key; compare the second information with the first information to determine whether the first information is consistent with the second information; and in response to determining that the first information is consistent with the second information, perform a first operation on the device using the first encryption key.

[0044] In an embodiment, when obtaining the first encryption key and the second information, the security device is also configured to receive a command to store the first encryption key in a persistent storage device of the device, wherein the command includes the first encryption key in encrypted form and the second information, wherein the first encryption key and the second information are bound together, and wherein performing the first operation includes storing the first encryption key in the persistent storage device.

[0045] In an embodiment, the security device is further configured to, in response to determining that the first information is inconsistent with the second information, reject the command to store the first encryption key.

[0046] In an embodiment, when obtaining the first encryption key and the second information, the secure device is further configured to: in response to receiving a command to use the first encryption key in the first operation, retrieve the first encryption key and the second information from a persistent storage device of the device.

[0047] In an embodiment, the security device is further configured to, in response to determining that the first information is inconsistent with the second information, reject a command to use the first encryption key in the first operation.

[0048] In an embodiment, the first operation includes: decrypting the second encryption key using the first encryption key, or generating the second encryption key using the first encryption key.

[0049] In an embodiment, the security device includes a first set of configurable properties; the second information includes a second set of configurable properties; and wherein the first set of configurable properties and the second set of configurable properties each include at least one of the following items: enabled functions of the device, identification of encryption keys, operations that can be performed on master keys, compliance mode of the device, enabled / disabled encryption algorithms, input / output settings of the device, and properties of the device.

[0050] In an embodiment, when determining whether the first information is consistent with the second information, the security device is further configured to: in response to determining that the first set of configurable properties consists of the second set of configurable properties, determine that the first information is consistent with the second information.

[0051] In an embodiment, when determining whether the first information is consistent with the second information, the security device is further configured to: in response to determining that the first set of configurable properties includes the second set of configurable properties, determine that the first information is consistent with the second information.

[0052] In an embodiment, the first group of configurable properties includes a first configurable property having a first value, the second group of configurable properties includes a first configurable property having a second value, and wherein, when determining whether the first information is consistent with the second information, the security device is further configured to: in response to determining that the first value is equal to or greater than the second value, determine that the first information is consistent with the second information.

[0053] In an embodiment, when obtaining the first encryption key and the second information, the security device is further configured to receive the first encryption key and the second information combined and in encrypted form.

[0054] In an embodiment, when obtaining the first encryption key and the second information, the security device is further configured to receive encrypted signature information.

[0055] According to a sixth aspect, a user device is provided, comprising one or more processors, wherein the one or more processors are configured to: generate a first encryption key and information specifying a security device configuration that allows use of the first encryption key; generate a command to store the first encryption key in a security device, wherein the command comprises the first encryption key in an encrypted form, information specifying the security device configuration, and information binding second information to the first encryption key, and send the command to the security device.

[0056] According to a seventh aspect, a system is provided, comprising: a user device; and a security device as described above, wherein: the user device is communicatively coupled to the security device and is configured to send a command to the security device during an initialization process, wherein the command comprises a first encryption key and second information.

[0057] These methods are computer-implemented methods. Since some methods according to embodiments may be implemented by software, some embodiments include computer code provided on any suitable carrier medium. The carrier medium may include any storage medium, such as a CDROM, a magnetic device or a programmable storage device or any temporary medium (such as any signal, such as an electrical, optical or microwave signal). The carrier medium may include a non-temporary computer-readable storage medium.

[0058] A variety of devices can be used to execute cryptographic algorithms. A hardware security module (HSM) is a device that securely stores and manages cryptographic keys and executes a set of cryptographic algorithms. In many cases, before putting an HSM into use (e.g., before deployment), the user performs an initialization process. The initialization process can include: loading the master key into the HSM's persistent storage device and establishing global HSM configuration settings.

[0059] The master key is an encryption key used to protect the user's encryption key. Specifically, the master key can be used to encrypt other encryption keys for storage outside the HSM. For example, the master key can be used to encrypt application keys for storage outside the HSM.

[0060] For example, a configuration setting of an HSM may control which cryptographic algorithms the HSM may execute. The cryptographic algorithms that may be executed by the HSM may be controlled both for security purposes (e.g., disabling potentially insecure algorithms) and for compliance reasons (e.g., meeting specific user requirements). For example, the configuration setting may include an enable / disable bit for a selected cryptographic algorithm.

[0061] If the master key is used in an HSM with an incorrect configuration, the possible consequences include violating the user's policy on how to use its encryption keys or violating the compliance requirements of the encryption keys. This may lead to security vulnerabilities that endanger the security of the master key and all keys (e.g., application keys) protected by the master key. However, during the initialization process, the user relies on the security of the computing device that performs the HSM device initialization process on behalf of the user to ensure the configuration settings. In other words, the user can indicate the computing device with respect to the desired configuration settings for the HSM device. However, the user must trust that the computing device provides these same configuration settings to the HSM device during the initialization process. For example, if the computing device is controlled by another party, the user must trust that the other party will not change the desired configuration settings before providing them to the HSM device. In addition, the user must trust the security of the computing device. For example, the user must trust that a malicious third party cannot access the computing device and change the desired configuration settings before providing them to the HSM device.

[0062] For example, in the case where a user uses an HSM located in a service provider system, the initialization process is performed by a host computing device in the service provider system. During initialization, the user computing device provides the service provider host computing device with the user master key and information specifying the desired HSM configuration settings. However, the user must rely on the service provider host computing device to initialize the HSM using the desired HSM configuration settings. For example, if the service provider is compromised, the master key may be used in an improperly configured HSM, thereby compromising the security of the master key and all keys protected by the master key. Even in the case where the HSM is located in the user system and the host computing device is part of the user system (rather than part of the service provider system), the host computing device may still not be fully trusted: for example, the device may be manufactured by a separate party. Other situations may also occur when the master key is used in an improperly configured HSM. For example, human error may occur, whereby the user transmits the master key to the improperly configured HSM. In this case, the security of the master key may be compromised.

[0063] In each of these cases, the user must trust someone to ensure the master key is used in a properly configured HSM so that the security of the master key is maintained, either: 1) trust the service provider (e.g., to configure the HSM according to configuration instructions provided to it), 2) trust the parties that manufacture or maintain the user's computing devices used to configure the HSM, or 3) trust the individual user (e.g., to load the master key onto a properly configured HSM).

[0064] In the examples described below, a policy that arranges for a user's HSM configuration requirements is bound to the user's master key. The policy restricts the master key to be used only when the HSM is correctly configured. In some examples, the policy prevents the master key from being transferred to a persistent storage device unless the HSM is correctly configured. In other examples, the policy prevents the use of the master key from a persistent storage device unless the HSM is correctly configured. For example, in the HSM or on the user's system, the user binds the policy to the master key, which means that the HSM can confirm that the policy originated from the user and that the configuration settings of the HSM are consistent with the policy.

[0065] Figure 11 is a schematic diagram of a hardware security module (HSM) device 11 according to an embodiment. The HSM 11 includes a processor 103, a non-volatile memory 105, and a working memory, which includes a random access memory (RAM) 109. The non-volatile memory 105 may include any form of non-volatile device memory, such as flash memory, an optical disk, or a magnetic hard drive. The non-volatile memory 105 may be physically secure and tamper-proof by a third party, for example by including a physical security piece such as a film that covers the entire device and cannot be removed without destroying the underlying physical hardware (and thus making it unusable). The CPU 103 is in wired two-way communication with the non-volatile storage device 105 and is also in wired two-way communication with the RAM 109.

[0066] Computer program code is stored in non-volatile memory 105. When executed, the program is represented as a software product or process in working memory 109. Processor 103 includes logic circuits that respond to and process instructions in the program code in working memory 109. The following description refers to "firmware", which is a program that includes a set of computer instructions. Firmware includes machine code stored in non-volatile memory 105 on HSM 11. Any components required to execute firmware are also stored in non-volatile memory 105 on HSM 11, including runtime system files. When executed, a copy of the firmware machine code will be loaded into working memory 109. A "firmware process" is an instance of firmware being executed, including machine code in RAM 109. The execution of firmware by processor 103 enables the methods described herein to be implemented.

[0067] The processor 103 runs an operating system, such as a Linux operating system. The operating system includes system software that manages the hardware and software resources of the HSM device 11 and acts as an intermediary between the firmware and the HSM hardware.

[0068] The firmware includes computer instructions that implement a set of one or more cryptographic algorithms. For example, the firmware includes computer instructions that implement one or more of the following cryptographic algorithms: cryptographic key generation; key derivation; encryption; decryption; and digital signature algorithms (e.g., digital signatures or verification of digital signatures). The firmware may be embedded in the non-volatile memory 105 of the hardware security module 11 when the hardware security module (HSM) 11 is manufactured by a trusted party, or may be provided in whole or in part by a trusted party after manufacturing. For example, the firmware may be introduced by a trusted party as a computer program product, which may be in the form of a download. Alternatively, the trusted party may modify the existing firmware through an update or a plug-in.

[0069] In use, the HSM device 11 is typically located within a larger system. The HSM 11 is communicatively coupled to a computer or server device in the larger system via an interface 107, which includes a communication link to the computer or server device. For example, the HSM device 11 can be a PCI Express card that is directly inserted into a computer or server device, or the HSM device 11 can be communicatively connected to a computer or server device via a USB connection. In use, the HSM device 11 receives user requests via the interface 107.

[0070] In one example, the HSM 11 is located in a user system. In this case, the user system has a dedicated local HSM 11 device. The HSM 11 is directly coupled to a user computing device 117 controlled by a user via an interface 107, for example, the HSM device 11 may be a PCI Express card directly inserted into the computing device 117, or may be communicatively connected to the computing device 117 via a USB connection. The computing device 117 may be, for example, a server or an end-user computing device.

[0071] In another example, the HSM 11 is located in a host system separate from the user computing device 117. The host system may be, for example, a service provider system. In this case, the user computer 117 communicates with a computer or server device in the host system. The HSM device 11 is directly coupled to a computer or server device in the host system via an interface 107. For example, the HSM device 11 may be a PCI Express card directly inserted into a computer or server device in the host system, or the HSM device 11 may be communicatively connected to a computer or server device via a USB connection. Therefore, the user computing device 117 is communicatively coupled to the HSM device 11 via a computer or server device in the host system. Communication between the user computing device 117 and the host computer or server device may be performed via, for example, an Internet connection.

[0072] The non-volatile data memory 105 stores first information which specifies the configuration of the HSM 11. This will be described in more detail below.

[0073] The non-volatile data storage device 105 also stores one or more encryption keys associated with the user. As will be described in more detail below, a master key associated with a user can be stored in the non-volatile data storage device 105. The master key defines a "secure world" associated with the user. When the master key is provided to the HSM device 11, the HSM device 11 is registered in the secure world. The term "secure world" refers to one or more secure applications (e.g., HSM), or a portion of a secure device (e.g., HSM partition) that shares at least one private key (master key) and is configured to protect encryption keys and execute a set of encryption algorithms. The master key may also be referred to as a module secure world key (KMSW) key. The master key may be a symmetric key used as a root for other application keys. For example, the master key can be used to generate other application keys or to encrypt other application keys.

[0074] One or more encrypted application keys are associated with the user for use with the encryption algorithm embodied in the firmware. The application keys can be securely stored outside the HSM device 11 using a master key. For example, using the master key (KMSW key) in the HSM device, the application key can be encrypted using Advanced Encryption Standard (AES) encryption (as an example). The encrypted application key can then be sent to a separate external device for storage. However, the master key is stored on the HSM device 11.

[0075] The application key associated with the user is used to execute one or more cryptographic algorithms embodied in the firmware. When a user request to execute an algorithm is received at the HSM, the HSM retrieves one or more relevant application keys, decrypts them using the master key, and loads them into the RAM space of the firmware process. The HSM can then use the relevant application key to execute one or more cryptographic algorithms, including executing various encryption algorithms and decryption algorithms, as well as executing digital signature algorithms.

[0076] The HSM device 11 also includes a board support processor 113. The board support processor 113 is configured to communicate with a plurality of onboard sensors to monitor the operation of the main CPU and other hardware components of the hardware security module 11. The sensors may include, but are not limited to, CPU and / or board temperature sensors, voltage sensors, and / or current sensors. The HSM device 11 also includes an encryption coprocessor 111. The encryption coprocessor 111 may perform various standard encryption functions in hardware, such as various encryption algorithms and decryption algorithms and digital signature algorithms. Various other components not shown may be included.

[0077] Although an HSM device has been described above, the present invention is not limited thereto, and the method described below can be implemented on various devices for executing encryption algorithms and / or storing encryption keys. For example, a software simulator running on a general-purpose computing device or server can make the computing device or server behave like an HSM device. In this case, a computer program running in a computer device or server simulates an HSM device, and the following method is implemented on the computer device or server in this environment.

[0078] As described above, when the master key is used in an improperly configured HSM or other device, the security of the master key may be compromised. In the embodiments described below, a policy is used to control the use of the master key, which includes information specifying the configuration of the HSM in which the master key is allowed to be used.

[0079] The user wants to use a master key in an HSM. When provided to the HSM for use, the master key is bound to the policy. For example, the master key is cryptographically bound to the policy. In some examples, the master key and the policy can be bound together in a computing device in the user system. The bound master key and policy can then be sent from the user device to a host device in the service provider system, which then provides them to the HSM device. In other examples, the master key is bound to the policy in a first HSM and then provided to another HSM for use. For example, a master key is generated in a first HSM in response to a command sent from a user to the first HSM, and the master key is bound to the policy in the first HSM when it is generated. Then, the bound master key and policy are sent directly or indirectly from the first HSM (e.g., via a host system) to another HSM.

[0080] The HSM firmware, when executed, uses the policy to ensure that the master key is stored (or alternatively used) only when the HSM is properly configured, thereby preventing the use of the master key in an improperly configured HSM and reducing the likelihood that the security of the master key will be compromised. Since the HSM device itself confirms that the HSM configuration is consistent with the specifications in the policy, security does not rely on the security of external systems or on the host.

[0081] Figure 2 A method of controlling the use of a first encryption key according to an embodiment is shown. In this example, Figure 2 The method is based on Figure 1 The HSM described above is implemented, and specifically, the HSM firmware includes the embodiment of Figure 2 Machine code describing the method steps.

[0082] In step 201, a first encryption key and second information specifying an allowed HSM configuration (also referred to herein as a second configuration) are obtained. The second information is provided as an access control list (ACL) that specifies the configuration of the HSM that is allowed to use the first encryption key. The second information describes a policy (i.e., a requirement) associated with the use of the first encryption key (master key). Therefore, in the following description, the second information is sometimes also referred to as a policy.

[0083] An access control list (ACL) may be represented in one of several formats. For example, an ACL may be represented using a human-readable text format. Alternatively, an ACL may be represented using a data structure stored in memory, such as when a computer program uses the ACL. Alternatively, an ACL may be represented using a byte sequence. The byte sequence may be generated from a data structure as described above using a serialization process, and can be deserialized back into the same data structure.

[0084] The second information (the ACL associated with the first encryption key) includes a first set of policy information including configurable properties that specify allowed HSM configurations.

[0085] Optionally, the second information (ACL associated with the first encryption key) also includes a second set of policy information that controls operations that can be performed on the ACL and the corresponding first encryption key. For example, controlling whether the ACL can be retrieved by another process and / or controlling whether the ACL associated with the first encryption key can be modified to make it more restrictive (for example, by replacing the ACL with an ACL that includes a subset of the operations permitted by the current ACL).

[0086] Optionally, when authorization of the administrator key (specified in the third set of policy information) has been obtained, the second information (ACL associated with the first encryption key) also includes a third set of policy information, which controls the "restore" operation that can be performed on the ACL and its corresponding first encryption key.

[0087] An example ACL is provided below, which is represented in a human-readable text format and includes a first set of policy information, a second set of policy information, and a third set of policy information:

[0088]

[0089] In this example, the first set of policy information is represented by "groups[1]", which allows the key to be used as a master key ("UseAsKM") when the "AlwaysUseStrongPrimes", "FIPSLevel3EnforceV2", and "UseFIPSApprovedInternalMechanisms" configurable properties are enabled in the hardware security module (HSM).

[0090] The second set of policy information is represented by "groups[0]", which in this example allows operations such as: duplicating a handle to the key, retrieving the ACL, and making the ACL even more restrictive (i.e., replacing it with an ACL that only allows a subset of the operations allowed by the ACL). The third set of policy information is represented by "groups[2]", which in this example includes an allowed "restore" operation that can be performed if authorization from the administrator key (which is identified by the authenticator field) is available.

[0091] In the example described here, the first encryption key is a master key associated with a user, and the second information (ACL) specifies the HSM configuration required by the user, which is specified in the first set of policy information in the above example ACL. This second configuration can be based on the user's policy on how to use their encryption keys or the user's compliance requirements on under what conditions their encryption keys are used.

[0092] In one example, in step 201, second information and a first encryption key are obtained from a separate device. For example, the second information is provided from a separate device (e.g., another hardware security module (HSM)) to an HSM device in a manner encrypted and bound to the first encryption key, and is loaded into a working memory of the HSM device. In this example, the first encryption key and the second information are encrypted and bound at a separate device (e.g., the other HSM) and then sent to the HSM11. The following will be combined with Figure 3 An example of obtaining the second information in this manner is described in more detail.

[0093] In an alternative example, the second information is obtained from the non-volatile memory 105 of the HSM device together with the first encryption key and loaded into the working memory of the HSM device. The second information is stored in the non-volatile memory 105 in association with the first encryption key. Figure 4 An example of obtaining the second information in this manner is described in more detail.

[0094] The second information (ACL) obtained in step 201 includes information specifying at least one configurable property of the HSM. The configurable properties of the HSM will be discussed in more detail below. However, the configurable properties of the HSM may include: identification of an administrator key (i.e., a cryptographic key that is trusted to authorize administrative operations), and / or an indication of one or more cryptographic algorithms that may or may not be executed on the HSM, for example.

[0095] In step 202 , the HSM compares first information specifying the current configuration of the HSM with the second information obtained in step 201 .

[0096] In one example, the first information specifying the current configuration of the HSM is obtained from a configuration file stored in the non-volatile memory 105 of the HSM 11. The first information specifying the configuration of the HSM represents the current configuration of the HSM. Therefore, the information specifying the configuration of the HSM includes values ​​of configurable properties that affect the current HSM operation.

[0097] In step 203, the HSM determines whether the first information specifying the configuration of the HSM is consistent with the second information obtained in step 201. In practice, step 203 includes determining whether the first encryption key can be used in the HSM given the current configuration of the HSM. As described above, the second information specifies the configuration of the HSM that allows the use of the first encryption key. Therefore, it can be determined whether the use of the first encryption key is allowed in the HSM.

[0098] There are various criteria that can be used to determine whether the first information specifying the configuration of the HSM is consistent with the second information, for example, an "exact match" criterion or an "at least as strict" criterion can be applied. Which criterion is used in step 203 can be predetermined for the HSM or specified in the second information (i.e., in the ACL associated with the master key). The configuration of the requested HSM is compared with the allowed configurations bound to the master key according to the criterion.

[0099] The configurable properties of the HSM will be discussed in more detail below. However, three configurable properties include: the "AuditLogging" property, which enables the secure logging operation of the HSM (if the property exists); "UseFIPSApprovedInternalMechanisms", which enables a specific compliance mode of the HSM; and "FirmwareVersionNumber", which indicates the version number of the HSM firmware. These properties will be used here as examples to illustrate how different standards can be applied.

[0100] In a first example, determining whether the first information is consistent with the second information includes: determining whether a configurable property specified in the second information (ACL) exists in the first information specifying the current configuration of the HSM; and if a value associated with the configurable property exists, determining whether the value of the configurable property in the second information matches (i.e., is the same as) the value of the configurable property in the first information specifying the configuration of the HSM. This is referred to as an "exact match" criterion.

[0101] In an illustrative example of an "exact match" criterion, the second information (ACL) includes an "AuditLogging" property. In this case, the user is enforcing that the first encryption key can only be used as a master key in an HSM in which security logging is enabled. The second information also includes a firmware version number property (in this example) with an associated value of "4". In this case, the user is enforcing that the first encryption key (associated with the second information) can only be used as a master key in an HSM using firmware version 4.

[0102] In the first instance, the HSM (on which Figure 2 The method of (a) is configured to enable security logging and is configured to use firmware version "4". Therefore, the first information specifying the current configuration of the HSM includes the "AuditLogging" property and the value associated with firmware version "4".

[0103] By applying the "exact match" criterion in step 203, it is determined that the first information of the current configuration of the specified HSM is consistent with the second information (i.e., the ACL associated with the master key) because the first information of the current configuration of the specified HSM contains only those properties contained in the second information (i.e., the ACL associated with the master key) and has the same value as the value specified in the second information. Figure 5A An example of this is shown in .

[0104] If the first information (specifying the current configuration of the HSM) contains configurable properties that are not listed in the second information (i.e., in the ACL associated with the master key), the "exact match" criterion will fail (i.e., there is no match and the policy is inconsistent) because the first information does not exactly match the second information, i.e., the first information does not specify only those properties that are in the second information. Figure 5B An example of this is shown in , where the first information (indicating the current configuration of the HSM) includes the "UseFIPSApprovedInternalMechanisms" property, while the second information does not contain this property.

[0105] On the other hand, if the second information (i.e., in the ACL associated with the master key) contains properties that are not present in the first information (specifying the current configuration of the HSM), then the "exact match" criterion will also fail (i.e., policy inconsistency) because the first information does not exactly match the second information (since the second information has properties that are not included in the first information). Figure 5C An example of this is shown in .

[0106] In another example, the second information (i.e., the ACL associated with the master key) contains a firmware version number "4", and the first information indicating the current configuration of the HSM indicates that the HSM is using firmware number 5. In this case, since the value of the firmware version in the first information does not completely match (i.e., have the same value) the firmware number in the second information, the "complete match" criterion is not met. Figure 5D An example of this situation is shown in , where the firmware version number required to use the master key is "4" and the firmware version number being operated by the HSM is "5".

[0107] Figure 5E An example of this is also shown in , where the firmware number of the HSM is "3" and the firmware number required to use the master key is "4". In both cases, the firmware number in the second information (i.e., the ACL associated with the master key) does not completely match the first information indicating the current configuration of the HSM, and therefore, applying the "complete match" criterion, the first information is inconsistent with the second information.

[0108] In a second example, an "at least as strict" criterion is used to determine whether the first information is consistent with the second information. When the "at least as strict" criterion is applied, it is determined whether the first information (i.e., the configuration of the HSM) contains at least those configurable properties present in the second information (i.e., the ACL associated with the master key), and if the configurable property has a value, whether the value of the configurable property contained in the first information satisfies the value of the configurable property in the second information, such as being equal to or greater than the value of the configurable property in the second information.

[0109] For properties that are only present or absent in the configuration information, the "at least as strict" criterion means that if a property is present in the second information but not in the first information, the first information and the second information are inconsistent. Otherwise, the first information and the second information are consistent, as shown in the following truth table:

[0110]

[0111] Other properties can have numeric values. In this case, the "at least as strict" rule is: if the value in the first information (in the HSM) satisfies the value in the second information, then the first information and the second information are consistent. Otherwise, the first information and the second information are inconsistent. For example, in many cases, if the value in the first information is greater than or equal to the value in the second information (bound to the key), then the value in the first information satisfies the value in the second information. An example of such a property is a firmware version number. For example, a master key can specify a firmware version number in a policy, mandating that it can only be used on HSMs running firmware versions above a certain level. This approach can be used, for example, if firmware versions below a certain level are known to contain a vulnerability.

[0112] FIG. 5A to FIG. 5E An example of applying the "at least as strict" standard is shown in FIG. Figure 5A An example is shown in which the first information (specifying the configuration of the HSM) contains the same configurable properties (having the same values) as the second information (i.e., the ACL associated with the first encryption key, which specifies the configuration that allows the use of the first encryption key). In this case, the "at least as strict" criterion is met because the first information contains at least those configurable properties in the second information and the first information contains a value (i.e., firmware version 4) that is equal to the value in the second information (i.e., firmware value 4), thereby satisfying the requirement that the value in the first information is equal to or greater than the value in the second information. Therefore, when applying Figure 5A When the “at least as strict” standard in the above is met, the first information is found to be consistent with the second information.

[0113] exist Figure 5B In , when the "at least as stringent" criterion is applied, the first information is found to be consistent with the second information. Figure 5B , the first information contains at least those configurable properties specified in the second information (i.e., the first information contains at least "AuditLogging" and firmware version 4). Thus, the first information (i.e., the configuration of the HSM) is at least as strict as the second information (specifying the configuration that allows the use of the first encryption key). Note that in Figure 5B In the example of , the first information is stricter than the second information because the first information contains more configurable properties and is therefore stricter because it imposes more restrictions on the operation of the HSM.

[0114] exist Figure 5C In , the first information is inconsistent with the second information when the "at least as stringent" criterion is applied. Figure 5CIn the example of , the second information includes a configurable property ("UseFIPSApprovedInternalMechanisms") that is not included in the first information. Therefore, the first information is not "at least as strict" as the second information because the first information does not include at least the configurable property that is present in the second information. Figure 5C In the example of , the first information is "less restrictive" than the second information because the first information does not restrict the configurable properties as much as the second information (associated with the master key) does.

[0115] Figure 5D A fourth example is shown. Figure 5D , the second information is consistent with the first information when the "at least as strict" criterion is applied. As described above, in order for the first information to be "at least as strict" as the second information, the first information must include at least the configurable properties included in the second information, and in the event that the configurable properties have values ​​associated therewith, the first information must include corresponding values ​​that are equal to or greater than the values ​​in the second information. Figure 5D In the example of , the firmware version number in the first information (i.e., the firmware version number currently being implemented by the HSM) is "5", and the firmware version number in the second information is "4". In this case, the first information is "at least as strict" as the second information because the value of the firmware number in the first information is greater than the firmware number in the second information.

[0116] Figure 5E A fifth example is shown. Figure 5E In , the second information is inconsistent with the first information when the "at least as stringent" criterion is applied. Figure 5E In the example above, the second information (i.e., the ACL associated with the encryption key) specifies firmware version "4", while the first information (indicating the current configuration of the HSM) specifies firmware version "3". In this case, the value of the firmware version number is less than the value in the second configuration. Therefore, the first information is not "at least as strict" as the second information.

[0117] Two criteria are described above that can be used to determine whether first information is consistent with second information. When the "exact match" criterion is used, the first information is consistent with the second information if the first information contains only those configurable properties specified in the second information, and in the case where the configurable properties are associated with numerical values, the numerical values ​​in the first information are the same as the numerical values ​​in the second information. When the "at least as strict" criterion is used, the first information is consistent with the second information if the configurable properties specified in the first information include at least the properties specified in the second information, and in the case where the configurable properties in the second information contain values, the values ​​in the first information are numerically equal to or greater than the values ​​in the second information.

[0118] Back to Figure 2 If it is determined in step 203 that the first information specifying the configuration of the HSM is consistent with the second information specifying the configuration of the HSM that allows the use of the first encryption key, the method proceeds to step 204, in which the first operation is performed using the first encryption key.

[0119] The first operation may include storing the first encryption key in persistent storage (ie, non-volatile memory 105 ) in the HSM.

[0120] Alternatively, the first operation may include using the first encryption key to perform a cryptographic operation, such as encrypting or decrypting the application key. For example, the first operation may be performed in response to receiving a request for an application key encrypted using the first encryption key. Figure 2 In this case, S204 includes using the first encryption key according to the request, that is, allowing the first encryption key to be used to decrypt the application key during the execution of the request.

[0121] If it is determined in step 203 that the first information specifying the configuration of the HSM is inconsistent with the second information specifying the configuration of the HSM that is allowed to use the encryption key, the method proceeds to step 205 where the first operation is rejected.

[0122] As described above, the first operation may include using or storing the first encryption key. At 205, using or storing the first encryption key is prevented because the configuration of the HSM does not yet meet the requirements for using or storing the first encryption key (such as the requirements specified in the second information, also referred to as policies). Preventing the first operation may involve not storing the first encryption key in a persistent storage device, or performing a request to use the first encryption key in response to receiving the request to use the first encryption key. Figure 2 In the case of a method, the request is rejected and not executed.

[0123] As part of the initialization process, HSM configuration settings are established. An example method for establishing HSM configuration settings will now be described. The HSM configuration settings established can be HSM configuration settings requested by the same user who wishes to use his master key on the HSM device. For example, as part of the initialization process, both the requested HSM configuration settings and the master key can be provided. However, in an alternative example, as part of the initialization process, a separate party can establish the HSM configuration settings and then provide the user master key separately. In the following examples, a first party is mentioned, which can be a user, a different user, a different HSM, or a different party (e.g., a service provider).

[0124] In this example, a secure channel is established between the party and the HSM. The HSM is then configured according to the expected configuration by sending a command including the requested configuration to the HSM over the secure channel. In response to receiving the command, the HSM configures itself according to the expected configuration and stores first information specifying the configuration. In this example, the HSM supports a plurality of commands that can control the functions of the HSM. In the example, the commands supported by the HSM include, but are not limited to, the commands described in Appendix A. Specifically, the "Cmd_InitialiseUnitEx" command and "Cmd_SetNSOPerms" as described in Appendix A are sent to the HSM. Figure 3 A method of controlling the use of encryption keys according to an embodiment is shown.

[0125] Figure 3 The method of controls whether the HSM stores cryptographic keys in a persistent storage device (such as non-volatile memory 105) for future use. Figure 3 In the example, the first encryption key is transferred to the persistent storage device of the HSM only when the configuration of the HSM is consistent with the requirements specified by the second information (also referred to as the policy), and the second information indicates the configuration of the HSM that allows the use of the first encryption key. If the HSM does not store the first encryption key, future operations that require the first encryption key cannot be completed. Therefore, Figure 3 The method shown provides a method of ensuring that a first cryptographic key is only deployed to an HSM that has a configuration consistent with the usage policy of the first cryptographic key for future use. In effect, future use of the cryptographic key is blocked unless the HSM is in the correct configuration. When a new user wishes to enroll their master key to the hardware security module, the execution of Figure 3 This may occur when establishing the HSM configuration settings, or some time thereafter, such as when a new user wishes to register their master key to an HSM that is already being used by an existing user.

[0126] In this example, the process of configuring the HSM according to the desired configuration is considered a different step from loading the master key. However, in other examples, the first encryption key and the second information are provided in a command to establish the HSM configuration settings.

[0127] In this example, once initialized, the HSM configuration cannot be changed without proper authorization. This may require, for example, presentation of an administrator key.

[0128] In this example, a user master key (first encryption key) is stored in a first HSM device. The user master key will be used in a second HSM device. This may occur in situations where there are several HSM devices associated with a user (for example, in a service provider system or a tenant system). As part of the initialization process, the first HSM device can generate a user master key. The first HSM then provides the user master key to one or more other HSM devices associated with the user. In this example, the first encryption key (user master key) is generated on the first HSM device and is bound to the second information on the first HSM device. For example, the user can provide the second information to the first HSM through a secure channel. The first HSM then generates a master key and binds the master key to the second information, and then provides the bound user master key and the second information to the second HSM. In other examples, the master key and the second information can be bound at the user device and provided from the user device to the HSM.

[0129] In step 301, the second HSM receives a command to store a first encryption key in a persistent storage device, such as the non-volatile storage device 105 of the second HSM. The first encryption key is a master key. The command includes the first encryption key in encrypted form. The command also includes second information. The second information specifies the allowed configurations of the HSM. The first encryption key and the second information are bound together before being provided to the second HSM.

[0130] As described above, in this example, the first encryption key and the second information are bound in the first HSM device and provided to the second HSM device. In this example, a secure channel is established between the first HSM and the second HSM for the purpose of transmitting the first encryption key and the associated policy (second information) from the first HSM to the second HSM. In the example, a secure communication channel is established using transport layer security (TLS). In the example, the transport layer security (TLS) protocol version 1.3 (which is incorporated herein by reference) as described in Internet Engineering Task Force (IETF) Draft 8846 is used to establish a secure communication channel. In other examples, different protocols for establishing a secure communication channel are used. In the example, the authenticity of the endpoint (ie, HSM) is verified using a signing key permanently embedded in the HSM, and a certificate is issued by a certificate authority operated by the device vendor during production. Optionally, the certificate can use the X.509 format or any other suitable format.

[0131] In this example, a first encryption key is cryptographically bound to second information at a first HSM. In this example, the first encryption key is cryptographically bound to the second information using a communication key (also referred to as a session key) associated with a secure channel. In this example, the first encryption key and the second information are combined to form a key blob, and the key blob is then encrypted using the communication key and transmitted to the HSM. In this example, cryptographically binding the first encryption key to the second information includes: obtaining the first encryption key and the second information (e.g., a bytecode representation of the second information) on the first HSM, concatenating the first encryption key and the second information, and encrypting the result according to the communication key.

[0132] In this example, the first HSM transmits an encryption key block including a first encryption key and second information to the second HSM using a send key command, and then the second HSM receives a command to store the first encryption key in the second HSM persistent storage device. For example, before receiving a "Cmd_SetKM" command as described in Appendix A to set the first encryption key as a master key on the second HSM and store the key in the second HSM persistent storage device, the second HSM receives a "Cmd_SendKey" command including the first encryption key and the second information.

[0133] The command is sent from the first HSM to the second HSM device 11, the command including an encryption key block including a first encryption key and a second information. The second HSM device 11 receives the command to store the first encryption key and loads it into the working memory of the second HSM device 11. The second HSM device 11 decrypts the key block using a communication key associated with the secure channel to obtain the first encryption key and the second information, the communication key existing during the duration of the secure channel. The HSM that receives the encrypted bound master key and policy then decrypts the block (i.e., breaks the binding) into two separate components (i.e., the master key and the policy).

[0134] Optionally, a digital signature generated based on the first encryption key and the second information is also provided. In this case, the digital signature is provided simultaneously with the key block so that the second HSM can establish the source of the key block. In this case, the key block is signed using the private key. Thus, in addition to the encrypted key block, the command also includes the signature information. After receiving the command, the second HSM device 11 verifies the signature using the public key.

[0135] In response to loading the first encryption key and the second information into the working memory of the second HSM, the second HSM sends a response to the user containing an identifier of the first encryption key (e.g., a key handle). The user then sends a request to the second HSM to store the first encryption key in a persistent storage device of the second HSM and use it as a master key. In the example, the command includes the identifier of the first encryption key.

[0136] In response to receiving a command to store the first encryption key in a persistent storage device, the HSM proceeds to step 302. In step 302, the HSM compares the first information specifying the configuration of the HSM (i.e., the current configuration of the HSM, also referred to as the first configuration) with the second information received in the command. Step 302 is the same as step 202 described above.

[0137] In step 303, the HSM determines whether the first information of the configuration of the specified HSM is consistent with the second information. When determining whether the first information is consistent with the second information, either the "complete match" standard or the "at least as strict" standard is used, such as FIG. 5A to FIG. 5E Optionally, a criterion used in determining whether the ACLs are consistent is specified in the second information (ie, in the ACL bound to the encryption key). Step 303 is the same as step 202 above.

[0138] If it is determined in step 303 that the first information specifying the configuration of the HSM is consistent with the second information, the method proceeds to step 304, wherein the HSM transmits the first encryption key to a persistent storage device of the HSM, thereby providing the HSM with the first encryption key that can be used by the HSM in the future. Optionally, the HSM also transmits the second information to the persistent storage device.

[0139] If it is determined in step 303 that the first information specifying the configuration of the HSM is inconsistent with the second information, the method proceeds to step 305, in which the command to transfer the first encryption key is rejected, thereby preventing the first encryption key from being stored in the HSM. A message may be sent to the user device indicating that the HSM does not satisfy the allowed configuration. The message may, for example, include information detailing how the HSM does not satisfy the allowed configuration.

[0140] Once the first encryption key is stored in the non-volatile memory, the first encryption key can be used in various encryption operations embodied in the firmware of the HSM. For example, a first application key also associated with the same user is stored in an encrypted manner in an external storage device connected to the HSM. The encrypted first application key is encrypted using the first encryption key (master key). The user may want to decrypt some encrypted data using the first application key. The user generates a command at the user computing device. The command includes an identifier of the user, an identifier of the operation to be performed (in this case, a decryption operation), an identifier of the first application key, and the encrypted data to be decrypted. The command is sent to the HSM device 21. The computer program code in the firmware on the HSM device 21 is identified by the received command and is executed. The HSM retrieves the first encryption key from the persistent storage device. The first encryption key can be identified by the identifier of the user included in the received command, or alternatively, the command can include the identifier of the first encryption key. The encrypted first application key is also retrieved from the external storage device. The HSM decrypts the encrypted first application key using the first encryption key (master key). The first application key may then be used to perform the decryption operation specified in the received command.

[0141] The first application key may also have an associated access control list that includes one or more policies that specify how the first application key is allowed to be used. For example, the policy associated with the first application key may specify that it is not allowed to be used for signing operations. The policy associated with the first application key is checked to confirm that the decryption operation specified in the received command is allowed for the first application key. The first application key is stored in an encrypted manner on an external storage device, where the access control list is cryptographically bound to the first application key. Once retrieved by the HSM, the decrypted first application key and the access control list are stored together in the working memory of the HSM. The HSM firmware includes a step of checking the access control list associated with the application key before using the application key. Before using the first application key for a decryption operation, the HSM checks the access control list of the first application key.

[0142] When the first encryption key (master key) is transferred to the HSM 11, it can be used Figure 3 method, for example as part of an initialization process as described above. In this case, Figure 3The method has the following effect: the initialization process is prevented from completing unless the HSM is in the correct configuration for the first encryption key. Specifically, the policy prevents the master key from being transferred to the persistent storage device of the HSM unless the HSM is in the correct configuration. In other words, the policy contains a description of the required configuration, which is selected by the user when the master key is created. When the HSM receives a command to transfer the master key to its persistent storage device, it compares the configuration in the policy with its own current configuration and rejects the command if they are inconsistent. Unless the HSM is in the correct configuration for the master key, the initialization process in this example cannot be completed.

[0143] Although in the above examples, the master key and the second information are bound together by combining and then encrypting using a key associated with a secure channel, in other examples, other keys may be used. Optionally, the key is stored on a smart card and loaded onto an HSM by a user. In an example, multiple HSMs associated with a user each have access to a communication key (e.g., by storing the communication key on the HSM).

[0144] Although in the above examples, the master key and the second information are bound together by combining and then encrypting with a single key, other mechanisms for binding the master key to the second information may also be used. For example, the master key may be cryptographically bound to the policy by concatenating information identifying the master key with information identifying the policy and encrypting the result using an encryption key accessible to the HSM (e.g., a "communication" key). The master key and policy may then be provided separately. For example, the second information may be cryptographically bound to the first encryption key by a cryptographic integrity check of the overlay key and the second information. For example, the second information and the first encryption key are concatenated and the concatenated data is used as input to a cryptographic hash function. The output of the hash function is then signed using a private key at the first HSM. In addition to including the second information and the encrypted first encryption key, the command to transmit the key and the second information also includes the signed output of the hash function and the output of the hash function.

[0145] The first encryption key is transmitted to the HSM in encrypted form. In some examples, the second information is unencrypted. As described above, the second information includes a configuration of the HSM in which the associated encryption key is allowed to be used. This information is generally not sensitive. Therefore, the second information can be transmitted unencrypted. In examples where the command includes an encrypted first encryption key and unencrypted second information, only the first encryption key is decrypted (e.g., using a communication key accessible to the HSM). Binding information is additionally provided, such as a signature output of a hash function and an output of the hash function.

[0146] In this example, the encryption key and its associated policy are sent from the first HSM to the second HSM over a secure channel. With this approach, once the first HSM has been fully initialized, the first HSM can be used to securely initialize the second HSM without having to use other means (e.g., smart cards) to decrypt the master key and its associated policy, and without having to trust any external host to set the correct policy.

[0147] In other examples, the first encryption key and its associated policy are transferred to the HSM in other ways. For example, by loading directly onto the HSM using a smart card or transferring to the HSM through a different communication channel. In an example, the first encryption key and the associated policy are transferred from a device outside the HSM (e.g., from the user computing device 117) to the HSM using a load block command (e.g., a "Cmd_LoadBlob" command as described in Appendix A) containing an encryption key block. The encryption key block is formed by concatenating the first encryption key with the second information and encrypting the result using an encryption key known to the HSM (and optionally provided to the HSM during initialization). In response to receiving the load block command, the HSM decrypts the block using the encryption key known to the HSM, thereby obtaining two separate components (i.e., the first encryption key and the policy), and stores these components in a working memory. The HSM sends a response to the user including an identifier of the first encryption key (e.g., a key handle). Subsequently, the user sends a "Cmd_SetKM" command to the HSM containing an identifier as described in Appendix A to set the first encryption key as a master key on the HSM and store the key in a persistent storage device of the HSM. In response to receiving the "Cmd_SetKM" command as discussed above with respect to the example of receiving a first encryption key and associated policy from another HSM, the HSM proceeds to step 302.

[0148] As mentioned above, you can also use Figure 2 Method to control the use of the first encryption key that has been deployed to the HSM (ie, in the case where the encryption key has been stored in a persistent storage device).

[0149] The process of configuring the HSM according to the desired configuration is performed in the same manner as has been previously described. The first encryption key and the second information may be provided to the HSM at the same time or at a later point in time. Then, each time the first encryption key is to be used, Figure 4 method.

[0150] Figure 4 A method of controlling the use of encryption keys according to an embodiment is shown. Figure 4In the method, the HSM stores an encryption key and second information in a persistent storage device (such as a non-volatile memory), the second information specifying a configuration of the HSM that allows the use of a first encryption key. The second information is stored in the non-volatile memory 105 in association with the first encryption key. The second information and the first encryption key are stored in a manner that there is some connection between the two so that they are written together and returned together when read. In a first example, the second information is stored at a storage location adjacent to the first encryption key. In another example, the second information is stored at a memory location that has a fixed offset from the memory location where the first portion of the first encryption key is stored. In yet another example, a file system is provided that enables the first encryption key and the second information (i.e., ACL) to be obtained by referencing their corresponding file names using file input / output operations.

[0151] exist Figure 4 In the embodiment of the present invention, each time the first encryption key is to be used (eg, retrieved from HSM long-term storage), a check is performed to ensure that the first encryption key is only used in an HSM that is in a properly configured configuration.

[0152] In step 400, the HSM receives a request to use a first encryption key in a first operation. For example, the first encryption key is a master key associated with a first user. A first application key also associated with the first user is stored in an encrypted manner in an external storage device connected to the HSM. The encrypted first application key is encrypted using the first encryption key (master key). The user wishes to decrypt some encrypted data using the first application key. The user generates a command at a user device. The command includes an identifier of the user, an identifier of the operation to be performed (in this case, a decryption operation), an identifier of the first application key, and the encrypted data to be decrypted. The command is sent to the HSM device 21. The command corresponds to a request to use the first encryption key. In this case, the request to use the first encryption key includes a request to use the first application key because the first application key is encrypted by the first encryption key. In this case, the first operation is to decrypt the first application key.

[0153] The computer program code in the firmware on the HSM device 21 is recognized by the received command and executed. The code embodies the following steps.

[0154] In step 401, the HSM retrieves a first encryption key and second information from a persistent storage device. The first encryption key may be identified by an identifier of a user included in the received command, or alternatively, the command may include an identifier of the first encryption key.

[0155] In step 402, the HSM compares first information specifying a configuration of the HSM (ie, a current configuration of the HSM) with second information.

[0156] In step 403, the HSM determines whether the first information specifying the configuration of the HSM is consistent with the second information. Figure 4 In an embodiment of the present invention, the encryption key usage policy (i.e., the second information) is compared with the current HSM configuration. Therefore, each time the encryption key is requested to be used, the configuration is compared. Step 403 is implemented in the same manner as step 203 above.

[0157] If it is determined in step 403 that the first information specifying the configuration of the HSM is consistent with the second information, the method proceeds to step 404, in which the encryption key is used according to the request received in step 400, in other words, the first operation is performed. In this example, the first operation includes: retrieving the encrypted first application key from the external storage device, and decrypting the encrypted first application key using the first encryption key (master key). The first application key can then be used to perform the decryption operation specified in the received command. The first application key can also have an associated policy that specifies how to allow the use of the first application key, as previously described. The policy associated with the first application key is also checked to confirm that the decryption operation specified in the received command is allowed for the first application key.

[0158] If it is determined in step 403 that the first information specifying the configuration of the HSM is inconsistent with the second information, the method proceeds to step 405, in which the attempt to use the first encryption key is rejected. The first operation is not performed, in this example, the first application key is not decrypted using the first encryption key. A message indicating that the HSM does not satisfy the allowed configuration may be sent to the user device. The message may include, for example, information detailing how the HSM does not satisfy the allowed configuration.

[0159] In About Figure 4 In the described method, the HSM allows the transfer of the master key to the persistent storage device (without checking the policy), but prevents the use of the master key from the persistent storage device unless the HSM is in the correct configuration. In this case, both the master key and the policy can be transferred to the persistent storage device during initialization. Then, each time the master key is used in any way, the policy is checked against the current configuration. If the policy and the current configuration are inconsistent, the attempt to use the master key is rejected. Although the initialization process can be completed, the HSM cannot be effectively used unless it is in the correct configuration for the master key.

[0160] Each time a request is made to use the first encryption key, Figure 4For example, you can initially Figure 3 The described manner provides the first encryption key to the HSM.

[0161] Alternatively, the first encryption key may be initially provided to the HSM in a different manner. For example, the first encryption key may be stored in a persistent storage device on the HSM regardless of the configuration of the HSM, with no check of the configuration being performed when the key is loaded onto the HSM. However, the first encryption key cannot be used unless the HSM is in a correct configuration, because if the HSM is in an incorrect configuration, a request to use the first encryption key will be rejected.

[0162] Figure 3 The method provides a method to control the use of the first encryption key (specifically, whether the first encryption key can be stored in the HSM) by controlling the initialization process. This in turn controls whether the encryption key can be used for future operations. In contrast, Figure 4 The method provides a method of controlling use of a first encryption key, wherein the first encryption key is already stored on an HSM (eg, the first encryption key was previously stored on the HSM as part of an initialization process).

[0163] In the above example, second information (e.g., access control list) associated with a first encryption key is provided. As described above, the second information specifies the configuration of the HSM that allows the use of the first encryption key. When provided to the HSM, the second information is bound to the first encryption key. The HSM is configured in such a way that the HSM cannot change the second information provided with the first encryption key except as permitted by the second information. Therefore, the second information cannot be changed by a third party during transmission. In addition, the second information can only be changed by the HSM permitted by the second information, for example, the second information can specify that the new ACL can be used to replace the second information only when the new information (i.e., the new ACL) is more stringent than the second information.

[0164] Above about FIG. 5A to FIG. 5E The "at least as strict" criteria and the "exact match" criteria are discussed.Techniques for determining whether first information specifying a configuration of an HSM is consistent with second information (ie, a policy bound to an encryption key) will now be discussed in further detail.

[0165] In one example, the second information specifies an identification of an administrator key.

[0166] The administrator key is a cryptographic key required to authorize one or more administrator operations on the HSM device. The HSM device stores information identifying the administrator key. The identification of the administrator key may include, for example, the output of a cryptographic hash function of the administrator key value.

[0167] The HSM firmware needs to present the administrator key identified in the stored information to perform one or more administrator operations. If a user wishes to perform an administrator operation, the user sends a command to the HSM to perform the operation and provides the HSM with the administrator key to authorize the performance of the operation. The user can present various smart cards (e.g., a smart card with an administrator key stored thereon) and optionally enter a password to authenticate the use of the smart card. The management keys associated with the user may be divided among two or more smart cards, and more than one of the two or more user smart cards may need to be presented to the HSM in order to authorize the requested management operation.

[0168] When the second information specifies the identification of the administrator key, the execution of the above steps 202 and 203 (or 302 and 303, or 402 and 403) checks whether the administrator key identified in the first information stored in the HSM device is the same as the administrator key specified in the second information. In this way, the user can ensure that administrator operations can only be performed by the user: the administrator key is a "per-user" key associated with the user. The user holds an administrator key stored on two or more smart cards, for example, and the HSM stores information identifying the administrator key. Administrator operations may include one or more of the following items: for example, recovering application keys, overwriting the policies of the HSM, and enabling access to the features of the HSM. In the example, a function of the HSM may require authorization of the administrator key. For example, the HSM may require authorization of the administrator key to execute a key generation algorithm. Optionally, when operating in a specific compliance mode, the HSM also requires authorization of the administrator key to perform certain cryptographic operations (e.g., a specific RSA mechanism).

[0169] The information identifying the administrator key may, for example, include a cryptographic hash of the administrator key. In other words, the information identifying the administrator key includes the output value of a cryptographic hash function whose input is the administrator key. This information is provided to the HSM when establishing HSM configuration settings. For example, the "Cmd_SetNSOPerms" command includes a parameter "HKNSO", which is an identifier of the administrator key.

[0170] In another example, the second information specifies one or more encryption algorithms that are enabled or disabled. In addition to, for example, the identification of the administrator key, or as an alternative to the identification of the administrator key, the second information may also specify the one or more encryption algorithms that are enabled or disabled. The encryption algorithm may include key generation, encryption, decryption, signing, and / or signature verification based on one or more of the following: for example, RSA, Diffie Helman, or AES.

[0171] Optionally, a bit string is used to represent the enabled / disabled encryption algorithms, where each bit position is associated with a different encryption algorithm and the value of each bit position indicates whether the use of the encryption algorithm is enabled (1) or disabled (0).

[0172] In an illustrative example, the configurable properties specified by the first information (specifying the current configuration of the HSM) include: identification of an administrator key, and indication of one or more enabled cryptographic algorithms. The configurable properties included in the second information specifying the second configuration include: identification of the administrator key.

[0173] The first technique for determining whether the first information specifying the configuration of the HSM is consistent with the second information specifying the second configuration (i.e., the configuration specified in the policy bound to the first encryption key, which identifies the second configuration of the HSM that is allowed to use the encryption key) is called "exact match". FIG. 5A to FIG. 5E The "exact match" criterion is discussed in detail. However, in brief, when the "exact match" criterion is used, determining whether the first information specifying the configuration of the HSM is consistent with the policy bound to the first encryption key includes determining whether the first information specifying the configuration of the HSM specifies only each of the configurable properties specified in the second information specifying the second configuration. That is, the first information specifying the configuration of the HSM consists of the configurable properties specified in the second information (i.e., the policy associated with the encryption key). The HSM further determines whether the value of each configurable property in the second information specifying the second configuration matches (i.e., is equal to) the value of the corresponding property (i.e., the same configurable property) in the first information specifying the configuration of the HSM.

[0174] In the above example, the policy bound to the first encryption key (i.e., the second information) only restricts the identification of the administrator key, while the configuration of the HSM restricts the identification of the administrator key and the disabled encryption algorithms. Therefore, the "complete match" criterion is not met because the policy bound to the encryption key does not contain a value for each configurable property of the HSM. Specifically, the policy bound to the encryption key (i.e., the second information) does not include an indication of the enabled encryption algorithms that can be executed by the HSM. In this case, it is determined that the first information specifying the configuration of the HSM is inconsistent with the second information specifying the second configuration (i.e., the policy bound to the encryption key).

[0175] In further illustrative examples where the second information (a policy bound to a first encryption key) includes information specifying a first set of encryption algorithms that should be enabled, the first technique includes determining whether the first information specifies the same first set of encryption algorithms that are being enabled.

[0176] As described above, another criterion that can be used to determine whether the first information specifying the configuration of the HSM is consistent with the second information specifying the second configuration is an "at least as strict" criterion. When the "at least as strict" criterion is implemented in the HSM firmware, the HSM is configured to determine whether the first information specifying the configuration of the HSM includes a value for each configurable property specified in the policy bound to the first encryption key. The HSM also determines whether the value of each configurable property in the first information is equal to or greater than the corresponding value in the second information.

[0177] In the above illustrative example, the policy (i.e., the second information) bound to the first encryption key only restricts the identification of the administrator key, while the configuration of the HSM restricts the identification of the administrator key and the disabled encryption algorithms. In this example, the identification of the administrator key specified in the first information matches (i.e., is equal to) the identification of the administrator key specified in the policy associated with the first encryption key. Therefore, it is determined that the policy associated with the first encryption key (i.e., the second information specifying the second configuration) is consistent with the first information specifying the configuration of the HSM. Therefore, the use of the first encryption key is allowed (e.g., by transferring the first encryption key to the HSM long-term storage device 304 or by using the first encryption key according to the request 404). Since the first information specifying the configuration of the HSM includes an entry for the identification of the administrator key, the "at least as strict" standard is met. In this case, the configuration of the HSM is stricter than the policy required to use the first encryption key because the configuration of the HSM also restricts the disabled algorithms.

[0178] In an example, the configurable properties that may be specified in the first information (i.e., information indicating a current configuration of the HSM) and the second information (i.e., an ACL associated with the first encryption key) include properties associated with at least one of:

[0179] • HSM-enabled features

[0180] • Identification of the encryption key

[0181] • Operations that can be performed on the master key

[0182] • HSM compliance model

[0183] • Enable / disable encryption algorithms

[0184] •HSM input / output settings

[0185] •HSM properties

[0186] •Limitations on HSM performance.

[0187] • Restrictions on the communication channels used by the HSM and the parties with which the HSM interacts.

[0188] •Use limits on the number of operations that can be performed by the HSM.

[0189] •Whether the HSM is in a particular mode. For example, the HSM may be configured to be in an administrative mode by the position of a physical switch accessible to a user of the HSM. In this case, the configuration includes an indication of the position of the physical switch.

[0190] In an example, the configurable properties associated with enabled functionality of the HSM include properties indicating that the HSM is configured to:

[0191] • Enable key generation without authorization

[0192] • Allows creation of data files in HSM non-volatile memory

[0193] • Allows removal of data files from HSM non-volatile storage

[0194] • Allows the application to obtain the value of the HSM's internal clock

[0195] • Allows the application to set the value of the HSM's internal clock

[0196] • Allow applications outside the HSM to read debug output from applications running within the HSM boundaries

[0197] • Allows shares of keys to be sent over a secure channel between HSMs

[0198] • Allows arbitrary applications to run within the HSM boundaries

[0199] • Allows key management functionality

[0200] In the example, the configurable properties of the identity that specifies the encryption key include:

[0201] • Identification of the administrator key

[0202] In an example, the configurable properties indicating operations that can be performed on the master key include properties that configure the HSM to:

[0203] • Allows master keys to be programmed into the HSM

[0204] • Allows removal of master keys from the HSM

[0205] In an example, the properties associated with the compliance mode of the HSM include at least one of the following:

[0206] • Current HSM Mode

[0207] • HSM compliance capabilities, such as whether it claims to be compliant with FIPS 140-2, and if so, at what level

[0208] • Whether the legacy version of FIPS 140-2 compliance mode is enabled

[0209] • Whether the current version of FIPS 140-2 compliance mode is enabled

[0210] • Whether eIDAS compliance mode is enabled

[0211] • Whether FIPS 140-2 compliance mode for future versions is enabled

[0212] In an example, the configurable property indicating an enabled / disabled encryption algorithm includes a property indicating at least one of:

[0213] • Whether the traditional RSA encryption algorithm is disabled

[0214] • Whether to enforce specific policies for RSA key generation

[0215] •Whether to allow the use of Korean national encryption algorithm

[0216] • Whether to allow the use of elliptic curve encryption algorithms

[0217] • Whether to allow the use of ECCMQV algorithm

[0218] • Is hardware acceleration for elliptic curve cryptography acceptable?

[0219] In an example, the configurable property indicating an input / output setting of the HSM includes a configurable property indicating that the HSM is configured to:

[0220] • Allows keys to be loaded from smart cards

[0221] • Allows loading of data files from smart cards and other types of devices

[0222] • Allows writing of key shares to smart cards

[0223] • Allows writing data files to smart cards and other types of devices

[0224] • Allows key shares to be erased from smart cards

[0225] • Allows erasing of data files from smart cards and other types of devices

[0226] • Allows (re)initialization of smart cards and other kinds of devices for file storage

[0227] • Allows the key share on the smart card to modify the delivered phrase

[0228] • Allows the application to access arbitrary smart cards via an HSM smart card reader

[0229] In the example, the attributes of the HSM include at least one of the following items:

[0230] •HSM serial number

[0231] • Identification of the key embedded in the HSM

[0232] In the example, the encryption key obtained in step 201, stored in step 301, or requested in step 400 is a master encryption key. The master key is an encryption key used to protect the user's encryption key. Specifically, the master key is used to encrypt other encryption keys (e.g., application keys) used by the user for external storage, or the master key is used to generate other encryption keys (e.g., application keys) used by the user. Using the above-mentioned method of utilizing the master encryption key ensures that the master key can be used only when the configuration of the HSM is consistent with the policy bound to the master encryption key (i.e., when the HSM is configured according to the user's requirements for the master key).

[0233] Since the master key directly or indirectly protects various application keys, preventing the use of the master key has the effect of preventing any application key from being used improperly. This is because the master key must be retrieved before any application key can be used or generated. Therefore, since the master key can only be used in a properly configured HSM, the user's encryption key can also only be used in a properly configured HSM.

[0234] In the above about Figure 3 An example is described in which the configuration of the HSM cannot be changed without proper authorization. In the example, after a configuration is provided to the HSM (e.g., during initialization of the HSM) and the HSM configures itself according to the configuration, the HSM changes to an operational mode. Once in operational mode, the configuration of the HSM cannot be changed.

[0235] As mentioned above, about Figure 2 , Figure 3 or Figure 4 The described method is implemented in the form of a policy checking code included in the firmware of the HSM. A user uses a general purpose computer to generate a policy (i.e., second information specifying a second configuration) bound to a first encryption key. This can be implemented as a policy setting code running on a general purpose computer that performs an HSM initialization process on behalf of the user.

[0236] In the above examples, the policy is bound to the encryption key. In other examples, the policy is cryptographically bound to the encryption key. In one example, the policy (i.e., the information specifying the second configuration) is bound to the encryption key by a cryptographic integrity check of the overlay key and its policy. Alternatively, the binding between the key and the policy can be established by other means.

[0237] In the above example, the HSM device confirms that the master key is consistent with the HSM configuration associated with the master key specified by the user. In order to enforce this consistency, the HSM performs a check before storing the master key or before using the master key. Since the ACL specifying the allowed HSM configuration is provided to the HSM cryptographically bound to the master key, the HSM is able to enforce the consistency between the configuration and the master key. Therefore, the consistency is enforced by the HSM rather than the host system. The approach taken is to bind the policy to the master key, which restricts the master key to be used only when the HSM is correctly configured. Since the master key directly or indirectly protects all application keys protected by the HSM, preventing the use of the master key has the effect of preventing the improper use of any application key.

[0238] Furthermore, security is increased by cryptographically binding the master key to the associated policy. The master key can only be used when installed into a properly configured HSM, and therefore the user's encrypted application key can also only be used in a properly configured HSM.

[0239] It should be understood that the present invention is not limited to the above-described embodiments, and various modifications and improvements can be made without departing from the concept described herein. Unless mutually exclusive, any feature can be used alone or in combination with any other feature, and the present disclosure extends to and includes all combinations and sub-combinations of one or more features described herein.

[0240] Appendix A

[0241]

[0242]

[0243] .

Claims

1. A computer-implemented method for controlling use of a first encryption key in a device, wherein: The device stores first information, the first information specifying a configuration of the device, the method comprising: obtaining the first encryption key and second information, the second information specifying a device configuration that allows use of the first encryption key; comparing the second information with the first information to determine whether the first information is consistent with the second information; and In response to determining that the first information is consistent with the second information, a first operation is performed on the device using the first encryption key.

2. The computer-implemented method of claim 1 , wherein: Obtaining the first encryption key and the second information includes: Receiving a command to store the first encryption key in a persistent storage device of the device, wherein the command includes the first encryption key in encrypted form and the second information, wherein the first encryption key and the second information are bound together, and wherein performing the first operation includes storing the first encryption key in the persistent storage device.

3. The computer-implemented method of claim 2 , further comprising: In response to determining that the first information is inconsistent with the second information, a command to store the first encryption key is rejected.

4. The computer-implemented method of claim 1 , wherein: Obtaining the first encryption key and the second information includes: In response to receiving a command to use the first encryption key in the first operation, the first encryption key and the second information are retrieved from persistent storage of the device.

5. The computer-implemented method of claim 4, further comprising: In response to determining that the first information is inconsistent with the second information, a command to use the first encryption key in the first operation is rejected.

6. A computer-implemented method according to any one of the preceding claims, wherein: The first operation includes: decrypting a second encryption key using the first encryption key, or generating a second encryption key using the first encryption key.

7. A computer-implemented method according to any one of the preceding claims, wherein: The first information includes a first set of configurable properties; The second information includes a second set of configurable properties; and wherein: The first set of configurable properties and the second set of configurable properties each include at least one of the following items: enabled functions of the device, identification of encryption keys, operations that can be performed on master keys, compliance modes of the device, enabled / disabled encryption algorithms, input / output settings of the device, and attributes of the device.

8. The computer-implemented method of claim 7, wherein: Determining whether the first information is consistent with the second information includes: In response to determining that the first set of configurable properties consists of the second set of configurable properties, the first information is determined to be consistent with the second information.

9. The computer-implemented method of claim 7, wherein: Determining whether the first information is consistent with the second information includes: In response to determining that the first set of configurable properties includes the second set of configurable properties, the first information is determined to be consistent with the second information.

10. The computer-implemented method of claim 9, wherein: The first set of configurable properties includes a first configurable property having a first value, the second set of configurable properties includes the first configurable property having a second value, and wherein determining whether the first information is consistent with the second information includes: In response to determining that the first value is equal to or greater than the second value, the first information is determined to be consistent with the second information.

11. A computer-implemented method according to any one of the preceding claims, wherein: Obtaining the first encryption key and the second information includes receiving the first encryption key and the second information combined and in encrypted form.

12. The computer-implemented method of claim 11, wherein: Obtaining the first encryption key and the second information includes: receiving encrypted signature information.

13. A computer-implemented method comprising: generating a first encryption key and information specifying a device configuration that allows use of the first encryption key; generating a command to store the first encryption key in a device, wherein the command includes the first encryption key in encrypted form and the information specifying the configuration of the device, wherein the first encryption key and the information are bound together; and Send the command to the device.

14. The computer-implemented method of any one of claims 1 to 6, wherein: The first information includes a first set of configurable properties; The second information includes a second set of configurable properties; and wherein: The first set of configurable properties and the second set of configurable properties each include a compliance mode of the device.

15. The computer-implemented method of any one of claims 1 to 6, wherein: The first information includes a first set of configurable properties; The second information includes a second set of configurable properties; and wherein: The first set of configurable properties and the second set of configurable properties each include operations that can be performed on a master key.

16. The computer-implemented method of any one of claims 1 to 6, wherein: The first information includes a first set of configurable properties; The second information includes a second set of configurable properties; and wherein: The first set of configurable properties and the second set of configurable properties each include input / output settings of the device.

17. A computer readable medium comprising instructions which, when executed by a processor, cause the processor to perform a computer implemented method according to any preceding claim.

18. A device comprising: a persistent memory configured to store first information specifying a configuration of the device; as well as One or more processors configured to: obtaining a first encryption key and second information specifying a device configuration that allows use of the first encryption key; comparing the second information with the first information to determine whether the first information is consistent with the second information; as well as In response to determining that the first information is consistent with the second information, a first operation is performed on the device using the first encryption key.

Citation Information

Patent Citations

  • Polymeric ultraviolet light stabilisers containing hindered alkyl amines and polymer compositions containing them

    EP0002022A1