This application is related to U.S. patent application Ser. Nos. 10/864,569 and 10/864,568 filed on the same date as this application and entitled “Cryptographic Architecture with Random Instruction Masking to Thwart Differential Power Analysis” and “Cryptographic CPU Architecture with Random Instruction Masking to Thwart Differential Power Analysis”, the disclosures of which are hereby incorporated by reference.
1. Field of the Invention
The present invention relates Cryptographic Bus Architectures (CBA). More specifically, the present invention relates to a CBA that prevents an attacker from being able to correlate side channel information.
2. Description of Related Art
Modem cryptography uses the same basic ideas as traditional cryptography, transposition and substitution. Messages to be encrypted, known as plaintext, are transformed by a function that is parameterized by a key. The output of the encryption process, known as the ciphertext, is then transmitted. The received ciphertext is then decrypted, using a related function and key combination, back into plaintext.
One example where modern cryptography is used is in pay-TV conditional-access systems such as pay channels for cable and satellite television. Smart cards and/or security processors (containing secret keys) are used to decrypt the television signals. Attackers buy a cable or satellite receiver and then attack the smart card or security processor inside in order to determine the secret keys. Thus, it is generally assumed that the input and output information, i.e. the plaintext and ciphertext, is available to attackers, and information about the secret keys is unavailable. The cipher text is the information sent from the cable or satellite provider, and the plaintext is the decrypted television signal set to the television. An attacker, as depicted in
The following discussion is background information regarding using DPA to determine the secret key in a smartcard. One skilled in the art will appreciate that this discussion is for illustrative purposes only, and that the present invention may be utilized to protect secret keys of a number of data encryption formats and from a number of hacking techniques in which side channel information is used in order to determine the secret keys.
First, in order to better understand how hacking techniques work, knowledge of common encryption/decryption systems is useful. A common type of cryptosystem uses a block cipher for encrypt and decrypt operations. A block cipher operates on a fixed number of input bits and encrypts or decrypts these bits into a fixed number of output bits. The encrypt and decrypt functions are often constructed using a simple function called a round function. The security of the cryptographic algorithm is achieved by repeatedly applying the round function a fixed number of times. Such a cipher is referred to as an iterative-block cipher. The number of times a block is addressed by a round function is determined, in part, by the secret key.
The Data Encryption Standard (DES) defines a commonly known iterative-block cipher. DES is described in detail in ANSI X.392, “American National Standard for Data Encryption Algorithm (DEA),” American Standards Institute, 1981, which is incorporated by reference herein. One of the major components of the round function of DES is the so-called substitution box or S-box functions. The S-box functions are non-linear and are conventionally implemented using table lookups or Boolean logic gates. The secret key controls access to the S-box function.
A common implementation of the iterative-block ciphers uses the secret key each time a round function is calculated. When this secret key is accessed by a cryptographic device, information about this secret key is apt to be leaked outside the device and can be monitored by an attacker who is able to get close enough to the device to monitor it. In the case of smart cards, if the attacker has possession of the smart card, the attacker is close to the cryptographic device therein to use techniques such as DPA against the device. The information that is leaked is often very subtle and difficult to interpret. However, because this information is correlated to the actual keys within the device, an attacker can use statistical techniques, such as a DPA attack, to effectively amplify the information and breach the security of the cryptosystem.
Recently, it has been shown that Differential Power Analysis (DPA), which relies on side-channel information, can be utilized by attackers to gain information about secret keys.
One way that power dissipated by a smartcard can be monitored at the ground pin of the smartcard is by using a small resistor (R1) in series between the Vss pin on the card and the true ground. Current moving through R1 creates a time varying voltage that can be sampled, perhaps by a digital oscilloscope. In a CMOS circuit, most power is dissipated when the circuit is clocked. This is known as dynamic power dissipation. Information useful to an attacker is leaked because the amount of current being drawn when the circuit is clocked is directly related to the change of state of CLOAD or the resulting current drawn by the other gates attached to CLOAD. On a microprocessor, each clock pulse causes many bit transitions to occur simultaneously. These changes can be observed via the digital oscilloscope.
In a conventional implementation of a cryptographic algorithm, the leaked information is correlated to the secret data, thus enabling an attack. For example, Messerges et al, in “Investigations of Power Analysis on Smartcards”, Proceedings of USENIX Workshop on Smartcard Technology, May 1999, pp. 151-161, used actual results from monitoring smartcard power signals to further analyze DPA techniques for attacking DES. More recently, Manfred Aigner et al, in “Power Analysis Tutorial”, Institute for Applied Information Processing and Communication University of Technology Graz, Austria, have presented a thorough tutorial for a DPA attack, including how to measure power consumption precisely, and then divide them into two or more different sets with the aid of a selection function D. The power traces of each set are averaged and the result is a bias signal. The two bias signals are subtracted from each other. One input to the D function is six bits of the subkey. The attacker does not know these bits, but can use brute force and try all 26 possible values. For each guess, the attacker re-divides the power traces into different sets, re-calculates the averages and generates a different bias signal. If and only if the D function is correct one can see noticeable peaks in the bias signal. Thus, the attacker can use the information and determine the secret key.
Typically, prior to the beginning of the 16th round in a given DES encryption operation, the algorithm will transform a plaintext message based on a secret key into a target binary bit R2[b], with a value of either 1 or 0. The final ciphertext is available after the 16th round as shown in
Here is how a DPA attack works. During a DES transformation of a plaintext message into a corresponding target cryptographic cipher bit R2[b], DPA attempts through exhaustive guesses to arrive at the secret cipher's six key bits Ks, represented by 0≦Ks<26. In any one attempt, using the same large number of m ciphertexts, the resulting binary values of R2[b] will, as always, be either 1 or 0; however, the values will be correctly assigned for every ciphertext only if the key has been correctly guessed. The DPA attacker now groups all the ciphertexts which seemingly produce values of 1 (R2[b]=1) into a single set and all the other ciphertexts, which produce an apparent value of 0 (R2[b]=0) into another set. Since each ciphertext c1 in each set has its own corresponding power trace wi, the attacker can now calculate the average of these power traces (i.e., waveforms) from each set and then compute the difference between the two waveform averages. (Another name for such an average is the bias signal.) The difference in these two bias signals is exploited by the attacker as follows.
DPA utilizes the statistical average of these two sets to determine whether the six key bits Ks for a given target bit have been guessed correctly in the attempted key Ks′. When the key that has been guessed Ks′ is wrong, the waveform averages will be identical because about half of the ciphertexts in each set will be wrong. For example, as shown by
Of course, those skilled in the art will also appreciate that because the low-level instructions often manipulate several bits, a selection function can simultaneously select values of multiple bits rather than of just one bit R2[b].
In the prior art, certain techniques have been suggested to try to break the correlation between subsequent segment traces and thus foil such attacks. See, for example U.S. Pat. Nos. 6,298,135 and 6,295,606 to Messerges, et al. However, these approaches have certain limitations that are mentioned below.
In U.S. Pat. No. 6,298,135 Messerges discloses using a randomized starting point in the set of target bits. For each different plaintext sample, the corresponding target bits are processed in a different order, and thus it becomes difficult for a DPA attacker to group related target bits from all the plaintexts of interest to perform statistical analyses associated with given target bit positions. However, this approach does not conceal the information leaked by different address bits and cannot prevent a malicious attacker from using this information to reorder the target bit into the correct bit position.
In U.S. Pat. No. 6,295,606 Messerges discloses another technique that uses a random mask to keep the message and key hidden while they are stored in memory and during the processing of the cryptographic algorithm. Since the mask is randomly changed, new S-boxes must be updated accordingly, and this takes time. The disadvantage of this kind of masking operation not only slows down the DES algorithm by a factor of three to five; it also cannot prevent an attacker from gathering a 48-bit partial key from DES round 16 when the results must be unmasked to provide the correct output of the cipher. (DES round 16 is the last round in the DES encryption algorithm and its output is unmasked as the ciphertext output.) Thus, this approach becomes vulnerable to DPA after unmasking. With 48 bits now known at round 16, the remaining six key bits to make 56 can then be exhaustively searched by the attacker.
Therefore, a need exists for a way to prevent leakage attacks so that an attacker cannot gain information about the secret keys used in cryptographic devices. Further, what is needed is a computationally more efficient approach that will prevent an attacker from gaining even partial information that can be used to determine the keys. It should be apparent that if the technique used to foil the attack only adds 25% to the computational resources of the device, that is far superior to a design that adds a 100% or more to the computational resources of a cryptographic device.
This invention proposes a unique polarized Cryptographic Bus Architecture (CBA) as a countermeasure to attacks based on power trace analysis such as DPA, effectively making power consumption un-correlatable to cipher bit values. This approach also requires that each bit of the Arithmetic Logic Unit (ALU) register use a set of dual rails to update its content. The unique polarized CBA has the following advantages over the techniques of Messerges and others: 1) it is computationally neutral, hence does not need to slow down the DES algorithm due to updating S-boxes to support random masking, 2) it is robust even in the presence of information leaked from different address bits, 3) it can even conceal the 48-bit partial key from Round 16, and 4) it can be made “probe-resistant” because the polarization control is preferably buried deeply in the poly layer and hence camouflaged.
The present invention provides a method and architecture for securing cryptographic algorithms (i.e. RSA (known by the initials of the three discoveres Rivest, Shamir, Adleman), DES, Advanced Encryption Standard (AES) and non-linear algorithms) from attacks based on leaked power information. Specifically, this approach utilizes, on-chip, the bus architecture of a microprocessor which is used to perform cryptographic operations.
“In another aspect the present invention provides a cryptographic bus architecture which includes a random number generator having a plurality of random number outputs at which a multi-bit random number is output; a plurality of bi-directional bus drivers, each bi-directional bus driver having at least one input for receiving at least one of the random number outputs; and a bus coupling at least one of the plurality of bi-directional bus drivers to at least another of the bi-directional bus drivers; wherein bi-directional bus drivers that are coupled to a common line of the bus are controlled by a common selected one of the random number outputs.”
“In yet another aspect the present invention provides a method of preventing a breach of security comprising the steps of: sending encrypted bits over a bus and randomly toggling the polarity of the encrypted bits on that bus.”
“In still yet another aspect the present invention provides a method of preventing a breach of security comprising sending encrypted bits over a bus having dual rails for each bit transmitted in a parallel manner on the bus, one rail of the dual rails being inverted polarity-wise compared to the other rail of the dual rails.”
“In yet another aspect the present invention provides a method for protecting secret keys. The method includes providing a plurality of bi-directional bus drivers and coupling a line of a data bus between at least a first bi-directional bus driver of the plurality of bi-directional bus drivers and a second bi-directional bus driver of the plurality of bi-directional bus drivers. The method further includes signaling the first bi-directional bus driver to provide a first set of bits, having a first polarity, to the bus and signaling the second bi-directional bus driver to receive the first set of bits having the first polarity; randomly signaling the first bi-directional bus driver to provide a second set of bits to the bus, the second set of bits having an opposite polarity than the first set of bits; and signaling the second bi-directional bus driver to receive the second set of bits having the aforementioned opposite polarity.”
“In another aspect the present invention provides a method for preventing information leakage attacks comprising the steps of: randomly inverting a polarity of at least one of a plurality of signals on a first end of a bus; and signaling to a second end of the bus that the random inverting has occurred at the first end of the bus.
“In still yet another aspect the present invention provides a cryptographic bus architecture comprising: a random number generator for generating a multi-bit random number; first and second pluralities of bi-directional bus drivers, each bi-directional bus driver having a control input responsive to a selected bit of the random number; and a bus coupling the first plurality of bi-directional bus drivers to the second plurality of bi-directional bus drivers, each of the bi-directional bus drivers being associated with a single line of the bus and wherein the bi-directional bus drivers coupled to a common line of the bus are responsive to a common bit of random number.”
a) depicts the encryption of m plaintext messages by an encryption device that generates m observable power traces and m output ciphertexts;
b) shows the selection function D(ci, Ks) computing R2[b] with a correct secret key Ks;
c) shows the selection function D(ci, Ks) computing R2[b] with an incorrect secret key Ks′;
a) illustrates, in a simplified fashion, the selection function D(ci, Ks) computing R2[b] based on ciphertexts Ci and a correct secret key Ks;
b) illustrates, in a simplified fashion, the selection function D(ci, Ks) computing R2[b] based on ciphertexts Ci and an incorrectly guessed secret key Ks′;
a) depicts a conceptual representation of prior art probabilities of the resulting power analysis when an incorrectly guessed key Ks′ is used;
b) depicts a conceptual representation of prior art probabilities of the resulting power analysis when a correct key Ks is guessed;
The present invention now will be described more fully hereinafter with reference to the accompanying drawings, in which preferred embodiments of the invention are shown. This invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.
Statistical correlation between side channel information and a secret key makes current cryptographic systems vulnerable to attack. Side channel information may include information regarding the state of target data bits that have been leaked to the outside through the power consumed by the driver on the internal data bus. The internal data bus usually has relatively large capacitive loading and consumes a significant percentage of the total power of the device. The transistor switching functions to utilize either a “1” or a “0” in the target bit on the data bus driver will result in different power signatures. The power information from a single target bit is amplified by the summing of hundreds or thousands of power traces occurring at similar places in the calculations. Thus, the power trace is correlatable with the target bit on the data bus driver. The correlation can then be used to determine the secret key.
The present invention prevents usage of side channel information by DPA attackers by randomly toggling the polarity of the target bit at the data bus driver while maintaining the equal probability of having a ‘0’ or ‘1’ values. In other words, the power traces no longer statistically correlate with the secret key. Thus, side channel information cannot be used to determine the keys being used by the cryptographic system.
Specifically, with reference to DPA, the result is that within each group of messages having the same target bit values computed from the selection function with correctly guessed key Ks, the corresponding power traces will not be always ‘0’ or ‘1’. The chance of having a ‘0’ or ‘1’ at the target bit will be approximately at 0.5 due to the randomization of polarity. Thus, the selection function D is effectively un-correlatable to the actual power trace measurement. The selection function D has thus been deprived of a way of predicting the power consumption of the actual target bit. In the case of Ks being incorrectly guessed, randomization will maintain the un-correlation between D and the corresponding power traces.
The N-bit random number generator 213 controls the N-bit bi-directional drivers 215, 217. The random number generator 213 has N outputs 214, wherein each output comprises of one bit. Each bit 2140-214N controls one bus driver 215, 217, see
After the logical content of a data bus 216, which tends to have heavy capacitive loading in processor designs, is made un-correlatable to a power trace measurement, any remaining correlation could be coming from the lightly loaded capacitive wires connecting the ALU and register files. To minimize detection of this correlation, a set of dual rails (d and d_bar) is preferably used to write a given register bit as shown in
In the preferred embodiment, the present invention is implemented in an on-chip bus architecture of a microprocessor that is used to perform cryptographic operations. This architectural approach enables securing existing cryptographic algorithms (including RSA, DES, AES and non-linear algorithms).
From the foregoing description, it will be apparent that the present invention has a number of advantages, some of which have been described herein, and others of which are inherent in the embodiments of the invention described herein. Also, it will be understood that modifications can be made to the method and apparatus described herein without departing from the teachings of the subject matter described herein. As such, the invention is not to be limited to the described embodiments except as required by the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
4978955 | Howell | Dec 1990 | A |
5357465 | Challa | Oct 1994 | A |
5392441 | Brasher et al. | Feb 1995 | A |
5560000 | Vogley | Sep 1996 | A |
5866933 | Baukus et al. | Feb 1999 | A |
5944833 | Ugon | Aug 1999 | A |
6014446 | Finkelstein | Jan 2000 | A |
6060908 | Heyne et al. | May 2000 | A |
6076161 | Ho | Jun 2000 | A |
6208135 | Shattil | Mar 2001 | B1 |
6294816 | Baukus et al. | Sep 2001 | B1 |
6295606 | Messerges et al. | Sep 2001 | B1 |
6298135 | Messerges et al. | Oct 2001 | B1 |
6298153 | Oishi | Oct 2001 | B1 |
6299069 | Shona | Oct 2001 | B1 |
6317820 | Shiell et al. | Nov 2001 | B1 |
6408075 | Ohki et al. | Jun 2002 | B1 |
6613661 | Baukus et al. | Sep 2003 | B1 |
6678707 | Butler | Jan 2004 | B1 |
6715010 | Kumata | Mar 2004 | B2 |
6839847 | Ohki et al. | Jan 2005 | B1 |
7127620 | Boeckeler | Oct 2006 | B2 |
7194633 | Kaiserswerth et al. | Mar 2007 | B2 |
7284133 | Watanabe et al. | Oct 2007 | B2 |
7319758 | Pomet et al. | Jan 2008 | B2 |
20010025344 | Teglia | Sep 2001 | A1 |
20010053220 | Kocher et al. | Dec 2001 | A1 |
20020084333 | Nakano | Jul 2002 | A1 |
20020131596 | Boeckeler | Sep 2002 | A1 |
20020169968 | Gammel et al. | Nov 2002 | A1 |
20030005321 | Fujioka | Jan 2003 | A1 |
20030044003 | Chari | Mar 2003 | A1 |
20030091191 | Watanabe et al. | May 2003 | A1 |
20030093684 | Kaiserswerth et al. | May 2003 | A1 |
20030110390 | May | Jun 2003 | A1 |
20030118190 | Sedlak et al. | Jun 2003 | A1 |
20040039928 | Elbe et al. | Feb 2004 | A1 |
20040088488 | Ober et al. | May 2004 | A1 |
20040133794 | Kocher et al. | Jul 2004 | A1 |
20040143747 | Eckstein et al. | Jul 2004 | A1 |
20050169462 | Jung et al. | Aug 2005 | A1 |
20050193045 | Yamamoto et al. | Sep 2005 | A1 |
20050232430 | Gebotys | Oct 2005 | A1 |
20050273630 | Shu et al. | Dec 2005 | A1 |
20060282678 | Ali et al. | Dec 2006 | A1 |
Number | Date | Country |
---|---|---|
199 36 939 | Apr 2000 | DE |
19845073 | Apr 2000 | DE |
1 006 492 | Jun 2000 | EP |
1 098 469 | May 2001 | EP |
11191149 | Apr 2011 | EP |
2 862 150 | May 2005 | FR |
11-191149 | Jul 1999 | JP |
0190854 | Nov 2001 | WO |
2004053662 | Jun 2004 | WO |
Number | Date | Country | |
---|---|---|---|
20050273630 A1 | Dec 2005 | US |