METHOD AND APPARATUS FOR MASKING CRYPTOGRAPHIC OPERATIONS
This invention relates to cryptographic systems and in particular to a method and apparatus for minimizing successful power analysis attacks on processors.
BACKGROUND OF THE INVENTION
Cryptographic systems generally owe their security to the fact that a particular piece of information is kept secret, without which it is almost impossible to break the scheme. This secret information must generally be stored within a secure boundary, making it difficult for an attacker to get at it directly however, various schemes or attacks have been attempted in order to obtain the secret information. Of particular risk are portable cryptographic tokens, including smart cards and the like. Of the more recent attacks performed on these particularly vulnerable devices are simple power analysis, differential power analysis, higher order differential power analysis and other related techniques. These technically sophisticated and extremely powerful analysis tools can be used by an attacker to extract secret keys from cryptographic devices. It has been shown that these attacks can be mounted quickly and can be implemented using readily available hardware. The amount of time required for these attacks depends on the type of attack and varies somewhat by device. For example it has been shown that a simple power attack (SPA) typically take a few seconds per card, while the differential power attacks (DPA) can take several hours.
Cryptographic operations are performed in a processor operating in a sequential manner by performing a sequence of fundamental operations, each of which generates a distinct timing pattern. Laborious but careful analysis of end-to-end power waveforms can decompose the order of these fundamental operations performed on each bit of a secret key and thus be, analyzed to find the entire secret key, compromising the system.
In the simple power analysis (SPA) attacks on smart cards and other secure tokens, an attacker directly measures the token's power consumption changes over time.
The amount of power consumed varies depending on the executed microprocessor instructions. A
large calculation such as elliptic curve (EC) additions in a loop and DES rounds, etc, may be identified, since the operations performed with a microprocessor vary significantly during different parts of these operations. By sampling the current and voltage at a higher rate, i.e., higher resolution, individual instructions can be differentiated.
The differential power analysis attack (DPA) is a more powerful attack than the SPA
and is much more difficult to prevent. Primarily, the DPA uses statistical analysis and error correction techniques to extract information which may be correlated to secret keys, while the SPA attacks use primarily visual inspection to identify relevant power fluctuations. The DPA
attack is performed in two steps. The first step is recording data that reflects the change in power consumed by the card during execution of cryptographic routines. In the second step, the collected data is statistically analyzed to extract information correlated to secret keys. A
detailed analysis of these attacks is described in the paper entitled "Introduction to Differential Power Analysis and Related Attacks" by Paul Kocher et al.
Various techniques for addressing these power attacks have been attempted to date.
These include hardware solutions such as providing well-filtered power supplies and physical shielding of processor elements. However, in the case of smart cards and other secure tokens, this is unfeasible. The DPA vulnerabilities result from transistor and circuit electrical behaviors that propagate to expose logic gates, microprocessor operation and ultimately the software implementations.
Accordingly, there is a need for a system for reducing the risk of a successful power analysis attacks and which is particularly applicable to current hardware environments.
SUMMARY OF THE INVENTION
It is an object of this invention to provide a method for minimizing power analysis attacks on processors.
In accordance with this invention there is provided a method of masking a cryptographic operation using a secret value, comprising the steps of:
(a) dividing said secret value into a plurality of parts;
(b) combining with each part a random value to derive a new part such that the new parts when combined are equivalent to the original secret value; and (c) utilizing each of the individual parts in said operation.
2 BRIEF DESCRIPTION OF THE DRAWINGS
These and other features of the preferred embodiments of the invention will become more apparent in the following detailed description in which reference is made to the appended drawings wherein:
Figure 1 is a schematic diagram of a communication system; and Figure 2 is a flow diagram illustrating an embodiment of the invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Referring to figure 1, a communication system having at least a pair of corespondents is shown generally by numeral 10. It is assumed that the correspondents 12 and incorporate cryptographic units 16 and 18 respectively. For convenience, the first correspondent will be referred to as the sender and the second correspondent will be referred to as the receiver. Generally, a plain text message is processed by the encryption unit of the sender and transmitted as cyphertext along a communication channel to the receiver where the encryption message is decrypted by the cryptographic unit 18 to recover the original message.
The above system provides a typical environment for application of the invention as will be described below.
Referring to figure 2 a method for masking a private key or secret value used in a cryptographic operation is shown generally by numeral 200. The method comprises the steps of dividing a secret value into a plurality of parts and combining with each part a random value modulo n (where n is the number of points on the elliptic curve) to derive a new part such that the new parts are combined to be equivalent to the original secret value and utilizing each of the individual parts in the operation. Typically, the secret value is a private key, which is used to compute a public key, and more frequently used in signatures, decryption and possibly key exchange protocols, such as Diffie-Hellman key exchange.
For illustrative purposes, we will in the following discussion assume an EC
scheme, where P is a point on the elliptic curve. The secret key d is normally combined with the point P to derive dP, the public key. However, the private key may also be used more frequently in various other cryptographic operations as described above. The cryptographic processor is
3 generally initialized at manufacture time with the public key or secret value d. Initially, the valued may be divided into a number of parts, e.g. d - bia + bxo.
In,a first step :the bi's are initialized to bi - btaand bz such that d = b10 + b20.
These initial, i+itlues: cif hi and b2 are stored instead of d. Alternatively the d value may also be stored if so, desired; however in the case of a smart card' where memory is limited this may not be desir~bTc_ Typically when, a computation using the value disrequired. At a next step, a random number n is generated and the values b I and b2 are: Updated as follows:
b1: b, + .7r mod n b2 b2 n mod n The updated values of b, and b2 are stored. Computation is then performed on.
the point P usingthe:coaiponents b, and b2 as follows.
dP wo b3P + b2P
where, P is apoint on the curve which is a predefined parameter of the system.
'T'hus assuming the value n is randomly :generated for each session, then an attacker is unlikely tq':ohstrue a predictable power signatuic;
In a. typical application of the present invention a signature component s has the form:-s n ae + yk (mod n) where:
k Is a random ;integer selected as a short terra private or session key;
R kP J. the corresponding short team public key;
r~l?, x .component o.fR
a is, the. long to nl private key of the sender;
Q:,al is the senders corresponding public key;
e is a secure hash, such as the SI3A-I hash function, of a message m and the short terra public ;key R( or possibly a short message itself); and, n is, the order of the curve.
The sender sends to the recipient a message including m, s, and r and the signature is vcri Pied by coznpudng'the value R'- (sP-eQ) which should correspond to R. If the:computed
4 Y
values correspond then the signature is verified. Both the secret keys in the above example may be masked using the method of the present invention.
Specifically referring back to the above example, calculation of the product ae may reveal some information on some platforms in some environments. To minimise this, the present invention is applied. The product ae is computed as ae = (bo + b1)e for (bo + b1) =a;
where bo, b1 sum to a. The components bo , b1 are updated periodically as described above.
This updating of the components can be made on every new signature operation.
In the above embodiments the secret value was divided into two components bo , b1, however this may be generalized to a plurality of components b0....bri_1.
Furthermore the above signature scheme is used for illustrative purposes and other schemes and operations may equally well be applied using the present invention.
Although the invention has been described with reference to certain specific embodiments, various modifications thereof will be apparent to those skilled in the art without departing from the spirit and scope of the invention as outlined in the claims appended hereto.
5