Embodiments of this invention relate generally to integrated circuits (ICs) and, more particularly, to a system for processing and/or storing sensitive data that may, should, or must be kept secure.
Integrated circuits (ICs) take a multitude forms, including digital memory chips, microprocessors, central processing units (CPUs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), field-programmable gate arrays (FPGAs), hardware security modules (HSMs), and more. For many systems containing ICs, it is important to protect the electronically stored and/or processed data, including, but not limited to, computer access control, military weapons systems, medical information, vehicle control, secure communications, and payment transaction processing. The security for the data these systems process often relies on cryptographic operations based on secret keys stored in memory or other circuitry, which arc then used to cryptographically secure sensitive data from unauthorized access.
Information leaked from circuits performing cryptographic operations (cryptographic circuits) can be analyzed by attackers to determine the secret key(s) being used to secure information. In particular, information leaked from cryptographic circuits via side channels such as electromagnetic emanations or power consumption variations during these cryptographic processes can be analyzed to determine the secret keys or sensitive data being processed.
Utilizing masking keys (secret keys), and logic, reduce the amount of leakage per cryptographic operation and utilizing key updates limit the amount of cumulative leakage of individual secret keys across multiple cryptographic operations. By utilizing masked keys and key updates, the secret information leaked during cryptographic operation can be significantly reduced. Current methods that utilize both masked keys and key updates together perform key updates on an unmasked key and then mask the updated key before using the masked key in the cryptographic operation. Performing key updates on the unmasked key, and then masking the updated unmasked key, leaks key information while the unmasked key is in use (e.g., stored, operated on, and/or retrieved).
The masking and unmasking operations demonstrably leak key information. This key information leakage could be used by template attacks to reveal all or part of the secret key. Additionally, the key update operation on unmasked keys can potentially leak a significant amount of key information. As an example, using SHA hash without leakage reduction countermeasures as the key update function for an unmasked key could potentially reveal the key being updated with a limited number of power or electromagnetic operation traces. Even with a key update after every cryptographic operation, a sufficient number of key update operation traces could be acquired for a successful attack by restarting the entire set of operations many times.
In order to minimize key leakage from the key update operation, multiple countermeasures can be used with varying levels of complexity and effectiveness. Examples are described is U.S. Pat. No. 6,327,661—Using unpredictable information to minimize leakage from smartcards and other cryptosystems; U.S. Pat. No. 6,539,092—Leak-resistant cryptographic indexed key update; and U.S. Pat. No. 7,787,620—Prevention of side channel attacks against block cipher implementations and other cryptographic systems.
Methods have been developed to quantify the amount of side channel leakage occurring during cryptographic operations. One such method is test vector leakage assessment (TVLA), which statistically compares power or electromagnetic signatures of a fixed key and random keys [J. Cooper, E. Demulder, G. Goodwill, J. Jaffe, G. Kenworthy, and P. Rohatgi. Test Vector Leakage Assessment (TVLA) Methodology in Practice, International Cryptographic Module Conference, 2013]. Using this testing methods, it can be determined what techniques best minimize side channel key leakage. TVLA experimentally has shown that using a masked key provides a reduction in side channel leakage compared to directly using the effective unmasked key. Key shares of a masked key form the effective key by using a masking operation. The effective key corresponds to the key defined by the specification of the cryptographic algorithm being used. Masked shares can be produced by performing the masking operation on the effective key and unpredictable data.
An example of Boolean masking using the XOR operator for two key shares is
An example of Boolean masking using the XOR operator for three key shares is
An example of arithmetic(additive) masking using the +/− operators for two key shares is
An example of arithmetic (additive) masking using the +/− operators for three key shares is
An example of multiplicative masking using the * operators for three key shares is
Key shares of a masked key can be unmasked to produce the effective key by using an unmasking operation.
An example of Boolean unmasking using the XOR operator for two key shares is effective_key=keyshare1 XOR keyshare2
An example of Boolean masking using the XOR operator for three key shares is effective_key=keyshare1 XOR keyshare2 XOR keyshare3
An example of arithmetic (additive) masking using the +/− operators for two key shares is effective_key=keyshare1+keyshare2
An example of arithmetic (additive) masking using the +/− operators for three key shares is effective_key=keyshare1+keyshare2+keyshare3
An example of multiplicative masking using the * operators for three key shares is effective_key=keyshare1 * keyshare2 * keyshare3
Masking and unmasking operations are not limited to the previous examples as any logical function that has two or more inputs and an inverse can be used as a basis for masking and unmasking operations. Also rather than masking an effective key, generating the key share values directly prevents the effective key value from ever being stored or transmitted.
In order to minimize the amount of side-channel leakage of an effective key being used in a keyed cryptographic operation, the key lifetime of the effective key (e.g., the number of keyed cryptographic operations performed by the effective key) should be limited. This key lifetime can be as little as one keyed cryptographic operation. In order to perform more keyed cryptographic operations than the key lifetime of the effective key, a key update can be performed when the key lifetime end of the effective key has been reached, where the key update produces an updated effective key.
Using both masked key shares and key updates can significantly reduce the amount of usable secret information leaked during multiple cryptographic operations.
A common method to utilize both masked keys and key updates in the same system is to perform key updates on an unmasked effective key and then split the updated key into shares shares of the masked key before using the masked key in the cryptographic operation. Key information will leak while the unmasked key is being updated, stored, and split.
Another method utilizes both masked keys and key updates in the same system, but is limited to reordering and randomization, which do not change the effective value of the key (i.e., the effective key) being updated (see U.S. Pat. No. 7,787,620). If a key update does not change the effective value of the key then it does not limit the amount of cumulative leakage of effective key across multiple cryptographic operations.
Embodiments of the present invention provide methods to perform key updates on key shares of a masked key, which allows updating the masked key without unmasking the masked key (e.g., producing the effective key). By using key shares of a masked key and performing the key update on one or more of the key shares without unmasking the effective key, the cumulative leakage of individual effective keys across multiple cryptographic operations is reduced, and preferably minimized.
Embodiments of the subject invention relate to cryptographic systems that use key shares of a masked key and logic, which can reduce side channel leakage of the effective key. An example block diagram of a keyed cryptographic module with input (102), output (104) and a two-share masked key (106,108) is shown in
Although the circuit of
The key update algorithm is not limited to cryptographic hash functions. Rather, any logic function can be used to perform the key update. Depending on the desired properties of the key update and implementation constraints, different key update functions can be used. A one-way cryptographic function, such as s cryptographic hash, provides backtracking resistance, which means information about a current key cannot be used to determine information about previously used keys in the key update process.
A block cipher, such as AES, can be used as the key update function in the circuit of
A function linear to the masking operation can be used as the key update function. Functions that are linear to the masking operation often have less side channel leakage and require minimal additional resources. However, functions linear to the masking operation are more susceptible to backtracking compared to a one-way cryptographic function or a block cipher. An example of a function linear to the masking operation is an affine transform based on the masking operation, such as XOR.
When using a key update function that is leaky, for example in the circuit of
Since the key update functions can potentially leak key information, leakage reduction countermeasures can be used in the key update functions. In a specific embodiment, the key update functions utilize one or more key shares of the masked key as inputs and one or more outputs are provide to a corresponding one or more key shares. In a specific embodiment, two or more key shares of the masked key are used as inputs of the key update function and outputs of the key update function are provided to two or more key shares. In a further specific embodiment, the two or more outputs of the key update function are provided to the same two or more key shares that are provided as inputs of the key update function. The increase in key shares and key storage memory provides more secure processing of the key update function. Additionally, key update functions that are linear to the masking operation process each key share individually as a single masked operation, which helps minimize the overall key update leakage.
When performing key updates on the individual key shares of the masked key, the key update function can be unique for each key share. For instance,
Using different key update functions can be combined with using a key update function with masked input and output.
Various embodiments of the subject invention utilize a cryptographic algorithm, where the effective key corresponds to the key defined by the specification of the cryptographic algorithm being used. Masked shares can be produced by performing the masking operation on the effective key and unpredictable data.
An example of Boolean masking using the XOR operator for two key shares is
An example of Boolean masking using the XOR operator for three key shares is
An example of arithmetic(additive) masking using the +/− operators for two key shares is
An example of arithmetic (additive) masking using the +/− operators for three key shares is
An example of multiplicative masking using the * operators for three key shares is
Key shares of a masked key can be unmasked to produce the effective key by using an unmasking operation.
An example of Boolean unmasking using the XOR operator for two key shares is effective_key=keyshare1 XOR keyshare2
An example of Boolean masking using the XOR operator for three key shares is effective_key=keyshare1 XOR keyshare2 XOR keyshare3
An example of arithmetic (additive) masking using the +/− operators for two key shares is effective_key=keyshare1+keyshare2
An example of arithmetic (additive) masking using the +/− operators for three key shares is effective_key=keyshare1+keyshare2 +keyshare3
An example of multiplicative masking using the * operators for three key shares is effective_key=keyshare1 * keyshare2 * keyshare3
Masking and unmasking operations are not limited to the previous examples as embodiments of the invention can utilize any logical function that has two or more inputs and an inverse can be used as a basis for masking and unmasking operations. Also, rather than receiving an effective key and masking the effective key, embodiments can generate the key share values directly so as to prevent the effective key value from ever being stored or transmitted.
In a specific embodiment, a pre-masked key is used and the key update function is performed on each masked share, or key share, which eliminates the need to perform unmasking and, therefore, eliminates any leaks associated with unmasking. In a specific embodiment, if a two mask XOR share is used, e.g., key shares keya and keyb, and SHA256 is used as the key update function, then both key shares would be updated as keya=SHA256(keya) and keyb=SHA256(keyb), where the unmasked key, keya XOR keyb, is never directly used or stored. This method eliminates the need to ever unmask the masked key. However, if the key update function is leaky, an attacker could obtain key information by analyzing the key update operation for each mask key share, or key share.
In a specific embodiment, when performing key updates on the individual masked key shares, or key shares, the update function can be unique for each mask share, or key share. For instance, as a derivation of Example 1, SHA256 and an LFSR could be used, where keya=SHA256(keya) and keyb=LFSR(keyb). This method can reduce the computational time required to perform the complete key update, and the different update functions can provide different additive properties to the key update function. In a specific embodiment, the hash update function makes the complete key update function non-invertible, and a key update function that is linear to the masking operation (such as an LFSR) provides improved leakage resistance to the complete key update function. In a further embodiment, the LFSR can be replaced with an affine transformation.
Since the key update functions can potentially leak key information, leakage reduction countermeasures should be used in the key update functions. In a specific embodiment, the key update functions utilize masked inputs and outputs. In a specific embodiment, two or more masked key shares are used as input and output of the key update function. The increase in masked shares and key storage memory provides more secure processing of the key update function. Additionally, key update functions that are linear to the masking operation process each share individually as a single masked operation, which helps minimize the overall key update leakage.
Referring to Example 2, utilizing the SHA hash and LFSR key update, this key update can be implemented using four masked shares as follows.
Referring to Example 2, utilizing the SHA hash and the affine transformation key update, this key update can be implemented using four masked shares as follows.
In a specific embodiment, when performing key updates on the individual masked key shares, or key shares, the update function can be unique for each mask share, or key share. For instance, the keyed cryptographic operation could be a symmetric key block cipher, like AES. For a resource constrained system it would be desirable to reuse the available AES module, whether implemented as as hardware or software, for the key update process. A leakage minimizing key update using with a three-share key store, an AES module that supports a two-share key, and additional data that is read from memory or received for each key update could be performed as follows.
Aspects of the invention, such as receiving key shares or an effective key, storing key shares or an effective key, implementing cryptographic operations, combining key shares, and implementing key share update functions, may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the invention may be practiced with a variety of computer-system configurations, including multiprocessor systems, microprocessor-based or programmable-consumer electronics, minicomputers, mainframe computers, and the like. Any number of computer-systems and computer networks are acceptable for use with the present invention.
Specific hardware devices, programming languages, components, processes, protocols, and numerous details including operating environments and the like are set forth to provide a thorough understanding of the present invention. In other instances, structures, devices, and processes are shown in block-diagram form, rather than in detail, to avoid obscuring the present invention. But an ordinary-skilled artisan would understand that the present invention may be practiced without these specific details. Computer systems, servers, work stations, and other machines may be connected to one another across a communication medium including, for example, a network or networks.
As one skilled in the art will appreciate, embodiments of the present invention may be embodied as, among other things: a method, system, or computer-program product. Accordingly, the embodiments may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware. In an embodiment, the present invention takes the form of a computer-program product that includes computer-useable instructions embodied on one or more computer-readable media.7
Computer-readable media include both volatile and nonvolatile media, transient and non-transient media, removable and nonremovable media, and contemplate media readable by a database, a switch, and various other network devices. By way of example, and not limitation, computer-readable media comprise media implemented in any method or technology for storing information. Examples of stored information include computer-useable instructions, data structures, program modules, and other data representations. Media examples include, but are not limited to, information-delivery media, RAM, ROM, EEPROM, flash memory or other memory technology. CD-ROM, digital versatile discs (DVD), holographic media or other optical disc storage, magnetic cassettes, magnetic tape, magnetic disk storage, and other magnetic storage devices. These technologies can store data momentarily, temporarily, or permanently.
The invention may be practiced in distributed-computing environments where tasks are performed by remote-processing devices that are linked through a communications network. In a distributed-computing environment, program modules may be located in both local and remote computer-storage media including memory storage devices. The computer-useable instructions form an interface to allow a computer to react according to a source of input. The instructions cooperate with other code segments to initiate a variety of tasks in response to data received in conjunction with the source of the received data.
The present invention may be practiced in a network environment such as a communications network. Such networks are widely used to connect various types of network elements, such as routers, servers, gateways, and so forth. Further, the invention may be practiced in a multi-network environment having various, connected public and/or private networks.
Communication between network elements may be wireless or wireline (wired). As will be appreciated by those skilled in the art, communication networks may take several different forms and may use several different communication protocols. And the present invention is not limited by the forms and communication protocols described herein.
All patents, patent applications, provisional applications, and publications referred to or cited herein are incorporated by reference in their entirety, including all figures and tables, to the extent they are not inconsistent with the explicit teachings of this specification. It should be understood that the examples and embodiments described herein are for illustrative purposes only and that various modifications or changes in light thereof will be suggested to persons skilled in the art and are to be included within the spirit and purview of this application.
The present application claims the benefit of U.S. Provisional Application Ser. No. 62/315,415, filed on Mar. 30, 2016; which is hereby incorporated by reference herein in its entirety, including any figures, tables, or drawings.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2017/025130 | 3/30/2017 | WO | 00 |
Number | Date | Country | |
---|---|---|---|
62315415 | Mar 2016 | US |