A claim of priority is made under 35 U.S.C. 119 of Korean Patent Application 2005-07705 filed on Jan. 27, 2005, the entire contents of which are hereby incorporated by reference.
Example embodiments of the present invention relate to cryptographic systems. More particularly, example embodiments of the present invention relate to a cryptographic logic circuits and methods of performing logic operations against power analysis attacks.
Various cryptographic technologies are capable of retrieving private information, for example, secret keys by measuring power consumption and/or operation times during an operation. Information leaking out during a cryptographic algorithm is known as side channel information, and attacks using side channel information are known as side channel attacks. Side channel attacks may be classified as timing attacks, fault insertion attacks, and power analysis attacks. Power analysis attacks may be further classified as simple power analysis (SPA) and differential power analysis (DPA).
Referring to
A SPA may directly attack a secret key embedded in a smart card by monitoring power consumption pattern of a cryptographic processor operating in the smart card. A DPA may use statistical analysis and/or error correction techniques to retrieve information correlative with a secret key from a collected power consumption data. A DPA may be used to retrieve the secret key with just a few devices (e.g., oscillator, etc.) capable of monitoring voltage variations. A DPA may also carry out fabrication and modulation as well as information analysis by means of statistical analysis. Therefore, it may be important to protect the secret information from the DPA. As a protection scheme against the DPA, a random masking technique may be employed. A random masking technique may be effective against a DPA.
A random masking scheme may set a cryptographic algorithm after executing a logic operation with input data and random data. A random masking scheme arranges the input data as a plaintext to be randomized. A random masking scheme may change power consumption features during the cryptographic algorithm even if the same value as the input data may be applied thereto. Thus, it may be possible to prevent secret information from being leaked. There are various methods of randomly masking input data, for example, a logic XOR operation with input data and random data. Assuming, for example, that input data is P and random data is R, random masking data may be set to P⊕R. In order to conduct an operation necessary for the input data as well as secure against a DPA, the operation needs to maintain data, which may arise from the procedure of processing a cryptographic algorithm, in the form of random masking pattern. Data in a form of a random masking pattern or a random masking data means data in which the random data may be combined with an operation result of the input data or a plurality of the input data.
For example, in a cryptographic algorithm, which logically XOR-operating (XORing), a plaintext P and a key K, and a random masking data of the plaintext P, for example, P⊕R, may be used instead of the plaintext P in the XOR operation to protect against the DPA. In this case, the logic XOR operation with the random masking data P⊕R and the key K results in (P⊕R)⊕K. The logic XOR operation permits a combination rule, the result may be rewritten into (P⊕R)⊕=(P⊕K)⊕R. As a result, it may be possible to obtain the result of the logic XOR operation, P⊕K, without disclosing information of the plaintext P. Further, the logic XOR operation result P⊕K need not be disclosed, if the logic XOR operation is not the last operation of the cryptographic algorithm, the random masking method may be sufficient to the condition because its output value may be formed in (P⊕K)⊕R. This method may also be known as a block cryptographic technique.
However, although such a cryptographic technique may be applicable to a logic XOR operation, it may not be possible to apply this technique directly to a cryptographic algorithm employing, for example, a logic AND operation with a plaintext P and a secret key K. A logic AND operation, to which the block cryptographic technique may be applied, may also generate a result (P⊕R)·K from a random masking data (P⊕R) and the secret key K. However, because a combination rule is not available for logic AND operation, it may not be possible to get (P⊕R)·K=(P·K)⊕R.
Therefore, it may not be possible for a random masking technique to be applicable to a cryptographic algorithm (e.g., including a composite logic operation mixed with Boolean and arithmetic operations) employing one or more logic operations (e.g., AND, OR, etc.) not available with a combination rule.
In an example embodiment of the present invention, a cryptographic logic circuit may include a first logic unit configured to execute at least one logic operation for a plurality of data pairs, the data pairs including random data and random masking data, and a second logic unit configured to execute a logic operation for the results of the first logic unit.
In another example embodiment of the present invention, a cryptographic logic arithmetic circuit of a full adder may include a plurality of first logic units, each of the first logic units including a plurality of AND gates, and a plurality of second logic units, each of the second logic units including a plurality of XOR gates. Each of the AND gates of are configured to receive at least two input of first and second random data, first and second random masking data, first carry random data, and first carry random masking data, and each of the XOR gates are configured to receive at least three inputs of the output of the respective plurality of first logic units, the first carry random data and first carry random masking data.
In an example embodiment of the present invention, a method of performing a logic operation in a cryptographic logic circuit may include converting a plurality of input data and random data into a plurality of random masking data, executing a first logic operation on the random data and random masking data, executing a second logic operation on the output of the first logic operation, and outputting the result of the second logic operation random masking data.
The accompanying drawings are included to provide a further understanding of example embodiments of the present invention, and are incorporated in and constitute a part of this specification. The drawings illustrate example embodiments of the present invention and, together with the description, serve to explain example embodiments of the present invention. In the drawings:
Example embodiments of the present invention will be described below in more detail with reference to the accompanying drawings. The present invention may, however, be embodied in different forms and should not be constructed as limited to the example embodiments set forth herein. Rather, these example embodiments are provided as working examples. Like numerals may refer to like elements throughout the specification.
Cryptographic logic circuits and methods to perform a logic operation may adapt a random masking technique for logic operations for AND, OR, NAND, NOR, XOR, XNOR, and NOT. Cryptographic logic circuits having the above described configuration may be applicable to a composite logic operation mixed with more than two logic operations (e.g., Boolean and arithmetic operations), to protect a cryptographic algorithm or an arithmetic operation unit against a power analysis attack.
Referring to
The random masking data X′ and Y′ and the random data R and S may be combined to form data pairs (X′, Y′), (X′, S), (R, Y′), (R, S), and so forth (S1200). One or more logic operations (first logic operation) may be carried out on data pairs (X′, Y′), (X′, S), (R, Y′), (R, S), and so forth (S1300). In S1300, in addition to an XOR logic circuit, an AND, OR, NAND, and NOR logic circuit may be available to conduct logic operations. During S1300, one or more logic operations may be carried out for the data pairs (X′, Y′), (X′, S), (R, Y′), (R, S). After executing one or more logic operations for the data pairs, results of the operations may be combined to be matched with the logic operation value to be used in a cryptographic logic circuit (S1400). In S1400, at least one of logic XOR and XNOR operations (second logic operation) may be carried out for the combined results of the first logic operation. A result of the second logic operation, may be formed in a pattern of the random masking data. Output data in the form of the random masking data may be output as a logic operation result of the cryptographic logic circuit (S1500).
The cryptographic logic circuits may be applicable to a composite logic operation (e.g., mixed Boolean and arithmetic operations for one of the logic operations). Output data and data used in logic operations may be composed in a form of random masking data. The operation unit with this configuration may be applicable to an arithmetic cryptographic logic circuit executing at least one of addition, subtraction, multiplication, and division. Both the result of the logic operation and data to be used in the arithmetic operation may be formed in a pattern of the random masking data, so that the original data may not be disclosed by power analysis attacks. In addition, the cryptographic logic circuits may be able to be constructed in a hardware architecture each capable of performing a logic operation (AND, OR, NAND, NOR, XOR, XNOR, and NOT). Therefore, it may be possible to design a cryptographic system capable executing a complicated algorithm by combining various cryptographic logic circuits (or units) against the power analysis attacks.
Example embodiments of various cryptographic logic circuits applicable to the logic operations scheme are illustrated in
Referring to
Results of the first through fourth logic operation circuits 102˜105 may be combined by the second logic operation unit 107, and the combined results may be output in a form of block masking data. The second logic operation unit 107 may be comprised of a first logic combination circuit 108 and a second logic combination circuit 109, and each may be constructed of an XOR gate. The first logic combination circuit 108 may execute a logic XOR operation with the result of the logic AND operation by the first logic operation circuit 102, X′·Y′, the result of the logic AND operation by the second logic operation circuit 103, X′·S, and the second random masking data Y′. The second logic combination circuit 109 may execute a logic XOR operation with the result of the logic AND operation by the third logic operation circuit 104, R·Y′, the result of the logic AND operation by the fourth logic operation circuit 105, R·S, and the second random masking data Y′.
The results of the logic XOR operations by the first and second logic combination circuits 108 and 109 may be output as results of the cryptographic logic circuit 10. The logic AND operation may result from the cryptographic AND logic circuit 10, Y′⊕(R·Y′)⊕(R·S) and Y′⊕(X′·Y′)⊕(X′·S), may all be generated in a form of random masking data. If a further XOR operation is carried out for the two logic AND operation results Y′⊕(R·Y′)⊕(R·S) and Y′⊕(X′·Y′)⊕(X′·S), the required operation result X·P may be obtained.
The result may be summarized by Equation 1 as follows.
According to the cryptographic AND logic circuit 10, when the four 1-bit data, X′(=X⊕R), Y′(=Y⊕S), R, and S, are provided thereto, the data used in the operation and the data as the result of the operation, as well as the input data X and Y, are all formed in the random masking data pattern. Thus, secret information may not be disclosed during a logic operation. As the probability distribution of the intermediate calculating values is independent from the input data X and Y, it may be possible to obtain the logic operation result originally intended when the results of the cryptographic AND logic circuit 10 are each put into the logic XOR operations.
The features shown in
The cryptographic AND logic circuits 20˜26 illustrated in
As is well known by those skilled in the art, a NAND gate has a smaller size than an AND gate. Therefore, it will be understood that substituting NAND gates for AND gates enables a hardware architecture to be simpler to provide for a smaller chip size. Such reduced in hardware architecture arises from the characteristic of a logic XOR operation defined in Equation 2 as follows.
X⊕Y=
The truth table X⊕Y and
Referring to Equation 2, Table 1, and Table 2, the AND operation results, Y′⊕(X′·Y′)⊕(X′·S) and Y′⊕(R·Y′)⊕(R·S), may be transformed into Y′⊕
The cryptographic NAND logic circuit 22 as illustrated in
Referring to
The results from the first through fourth logic operation circuits 302˜305 may be combined by the second logic operation unit 307, and the combined results may be output as block masking data. The second logic operation unit 307 may be comprised of a first logic combination circuit 308 and a second logic combination circuit 309. Each of the logic combination circuits may be an XOR gate. The first logic combination circuit 308 may execute a logic XOR operation with the result of the logic OR operation by the first logic operation circuit 302, X′+Y′, and the result of the logic AND operation by the second logic operation circuit 303, X′·S. The second logic combination circuit 309 may execute a logic XOR operation with the result of the logic AND operation by the third logic operation circuit 104, R·Y′, and the result of the logic OR operation by the fourth logic operation circuit 105, R+S.
The results of the logic XOR operations by the first and second logic combination circuits 308 and 309 may be output as results of the cryptographic OR logic circuit 30. The logic AND operation results from the cryptographic OR logic circuit 30, (X′+Y′)⊕(X′·S) and (R·Y′)⊕(R+S), may all be generated in the form of random masking data. If a further XOR operation is carried out for the two logic OR operation results (X′+Y′)⊕(X·S) and (R·Y′)⊕(R+S), the required operation result X+Y may be required.
Referring to
In the cryptographic OR logic circuits 30 and 32 shown in
According to the cryptographic NAND logic circuit 40˜46 and 50˜56, when four 1-bit data, X′(=X⊕R), Y′(=⊕S), R, and S, are given thereto, the data used in the operation and the data as the result of the operation, as well as the input data X and Y, may all be formed in a random masking data pattern. Thus, secret information may not be disclosed during the logic operation against power analysis attacks. As the probability distribution of the intermediate calculating values may be independent from input data X and Y, it may be possible to obtain the logic operation result originally intended when the results of the cryptographic NAND logic circuits 40˜46 and 50˜56 are each put into the logic XOR operations.
For example, according to the cryptographic NOR logic circuits 60 and 62 as illustrated in
Referring to
Referring to
According to the cryptographic logic circuits 70 and 80, when four 1-bit data, X′(=X⊕R), Y′(=Y⊕S), R, and S, are given thereto, the data used in the operation and the data as the result of the operation, as well as the input data X and Y, may all be formed in the random masking data pattern. Therefore, secret information may not be disclosed during a logic operation against power analysis attacks. In this case, as the probability distribution of the intermediate calculating values is independent from the input data X and Y, it may be possible to obtain the logic operation result originally intended when the results of the cryptographic logic circuits 70 and 80 are each put into the logic XOR operations.
Referring to
According to the cryptographic NOT logic circuit 90 two 1-bit data, X′(=X⊕R) and R, are given thereto, the data used in the operation and the data as the result of the operation, as well as the input data X and Y, may all be formed in the random masking data pattern. Therefore, secret information may not be disclosed during a logic operation against power analysis attacks. In this case, as the probability distribution of the intermediate calculating values is independent from the input data X and Y, it may be possible able to obtain the logic operation result originally intended when the results of the cryptographic NOT logic circuit 90 are each put into the logic XOR operation.
The full adders 100˜300 illustrated in
Although the present invention has been described in connection with example embodiments of the present invention illustrated in the accompanying drawings, example embodiments of the present invention may not be limited thereto. It will be apparent to those skilled in the art that various substitution, modifications and changes may be thereto without departing from the scope of the example embodiments of the present invention.
| Number | Date | Country | Kind |
|---|---|---|---|
| 2005-07705 | Jan 2005 | KR | national |