US20080175376A1 - Method and system for protecting against side channel attacks when performing cryptographic operations - Google Patents

Method and system for protecting against side channel attacks when performing cryptographic operations Download PDF

Info

Publication number
US20080175376A1
US20080175376A1 US11/144,969 US14496905A US2008175376A1 US 20080175376 A1 US20080175376 A1 US 20080175376A1 US 14496905 A US14496905 A US 14496905A US 2008175376 A1 US2008175376 A1 US 2008175376A1
Authority
US
United States
Prior art keywords
value
values
storage locations
key
storing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US11/144,969
Other versions
US7404089B1 (en
Inventor
Matthew J. Campagna
Amit Sethi
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Pitney Bowes Inc
Original Assignee
Pitney Bowes Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Pitney Bowes Inc filed Critical Pitney Bowes Inc
Priority to US11/144,969 priority Critical patent/US7404089B1/en
Priority to EP06011494A priority patent/EP1729441A1/en
Application granted granted Critical
Publication of US7404089B1 publication Critical patent/US7404089B1/en
Publication of US20080175376A1 publication Critical patent/US20080175376A1/en
Expired - Fee Related legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/723Modular exponentiation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/724Finite field arithmetic
    • G06F7/725Finite field arithmetic over elliptic curves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks
    • G06F2207/7261Uniform execution, e.g. avoiding jumps, or using formulae with the same power profile

Definitions

  • the subject invention relates to securing cryptographic systems against external attacks. More particularly it relates to reducing the amount of information which can be discovered by external monitoring of a system performing cryptographic operations (e.g. monitoring of external electromagnetic fields or power consumption for such a system).
  • external attacks e.g. monitoring of external electromagnetic fields or power consumption for such a system.
  • side channel attacks are sometimes referred to as “side channel” attacks.
  • Cryptographic systems perform operations such as encryption, decryption, and generation of digital signatures by operating on messages, or information derived from the messages with keys which, in general, must be maintained as secret.
  • keys can be a symmetric keys such as those used with known encryption protocols such as DES, or the private key of an asymmetric key pair such as those used with known public key encryption protocols such as RSA.
  • secret keys also include temporary, or ephemeral, keys that are derived from secret information, used for a limited period and replaced with a new key derived from the same information.
  • Such ephemeral keys are used in known digital signature protocols such as ECDSA. It has been shown that knowledge of an ephemeral key, publicly known parameters, and the public key is sufficient to compromise the secret information used with protocols such as ECDSA.
  • a fundamental process common to all such cryptographic systems is the process of a one-way function.
  • the binary operation [op] is addition this process is called scalar multiplication.
  • the binary operation [op] is multiplication this process is called exponentiation.
  • the terms “addition”, “multiplication”, and “exponentiation” correspond to the signs “+”, “ ⁇ ”, and “ ⁇ ”, respectively.
  • FIG. 1 illustrates the prior art computation of a scalar multiplication d-G using the fixed window method.
  • k windows i.e., binary integers W bits in length
  • steps 14 through 20 values G i are precomputed.
  • step 14 i is set equal to 0.
  • value G i is set equal to 2 iW G, and i is incremented by 1.
  • step 20 if i ⁇ k, the method returns to step 16 ; otherwise the precomputation ends. It will be apparent to those skilled in the art that steps 10 through 20 need only be performed once and that the results can be stored for use in later operations.
  • step 22 actual computation of d ⁇ G begins at step 22 ; where values A and B are set equal to an identity element in the set, usually denoted by 0 when the underlying binary operation is addition; or 1 when the binary operation is multiplication; and in the generic case by I, and index j is set equal to 2 W ⁇ 1.
  • step 24 index i is set equal to 0 (beginning the j th round of computation), and at step 28 the method determines if window d i is equal to j. If so it goes to step 30 and sets B equal to B+G i , and then, at step 32 increments index i by 1. Otherwise, if window d i is not equal to j the method goes directly to step 32 .
  • step 44 the method determines if index j is greater than 0. If so, it returns to step 24 , resets index i to 0 (and begins the j ⁇ 1) th round of computation). Otherwise, at step 46 the method returns value A, equal to d ⁇ G, and ends.
  • the value A can be used as a public key or used as part of a digital signature for cryptographic operations.
  • a typical externally detectable signal e.g. power variation, or external electromagnetic field
  • d 3
  • d 2 10
  • d 1 00
  • the result is computed by expressing the key d in base 2 W was d k-1 d k-2 . . .
  • the binary operation [op] is addition.
  • the binary operation [op] is multiplication modulo N, where N is an integer.
  • the secret key d is an asymmetric key and the message is encrypted or decrypted or digitally signed.
  • the secret key d is an ephemeral key and the message is digitally signed.
  • FIG. 1 shows a flow diagram of a prior art method for computing d ⁇ G mod N.
  • FIG. 2 illustrates a hypothetical external signal generated in executing a computation in accordance with the method of FIG. 1 .
  • FIG. 3 shows a block diagram of a cryptographic system in accordance with the subject invention.
  • FIGS. 4 a and 4 b show a flow diagram of an method for controlling the system of FIG. 3 to compute the iterative application of a binary operation [op] to a value G in accordance with the subject invention.
  • FIG. 5 illustrates a hypothetical external signal generated in executing a computation in accordance with the method of FIGS. 4 a and 4 b.
  • FIG. 6 shows an oscilloscope trace of an external signal generated in executing a computation in substantially in accordance with the method of FIG. 1 .
  • FIG. 7 shows an oscilloscope trace of an external signal generated in executing a computation in substantially in accordance with the method of FIGS. 4 a and 4 b.
  • FIG. 3 shows cryptographic system 60 that is resistant to such side channel attacks.
  • System 60 includes processor 62 having input/output channel 63 for input of message M and output of cryptographically processed message E [M].
  • Processor 62 communicates with memory 64 which stores program code for controlling processor 62 to implement a cryptographic protocol such as RSA, or ECDSA in locations 64 - 1 , window width W in location(s) 64 - 2 and secret key d, which is an integer value in location(s) 64 - 3 .
  • a cryptographic protocol such as RSA, or ECDSA in locations 64 - 1 , window width W in location(s) 64 - 2 and secret key d, which is an integer value in location(s) 64 - 3 .
  • Such cryptographic protocols are well known and need not be described further here for an understanding of the subject invention; except to note that these and other similar protocols implement processes where a binary operation [op] is iteratively applied to a value G.
  • Code and values stored in memory 64 can of course be updated for various different applications in any convenient manner.
  • Processor 62 also communicates with working memory 66 which stores values G i , 0 ⁇ i ⁇ k ⁇ 1, where k is the number of digits required to express key d base W, in locations 66 - 1 ; registers pos[j], where 1 ⁇ j ⁇ 2 W ⁇ 1, in locations 66 - 2 ; and accumulation registers (hereinafter sometimes “accumulators”) A and B, in locations 66 - 3 .
  • FIGS. 4 a and 4 b show a flow diagram of the system 60 in executing a method in accordance with the subject invention for computing [op] d G in a cryptographic protocol.
  • the binary operation [op] is addition “+” the result is the multiplication “d ⁇ G”.
  • the result is the exponentiation “G d ”.
  • step 70 parameters W, a window width and d, a secret key, taken as a binary integer, are determined; and G, a binary integer derived from message M on which the cryptographic system operates, is input.
  • d is expressed as a sequence of windows (i.e. binary integers W bits in length) d i such that d k-1 d k-2 . . . d 0 expresses d in base 2 W .
  • steps 74 through 80 values G i are precomputed.
  • step 74 i is set equal to 0.
  • step 80 if i ⁇ k, the processor 62 returns to step 76 ; otherwise the precomputation ends.
  • steps 70 through 80 need only be performed once and the results can be stored for use in later operations.
  • registers pos[j], 0 ⁇ j ⁇ 2 w ⁇ 1, are defined in working memory locations 86 - 2 , and then cleared at step 88 .
  • FIG. 5 shows the increased difficulty in recovering these values by a side channel attack.
  • initialization takes place during steps 70 through 80 . Again, little useful information is generated in the externally detectable signal during this period.
  • the table of registers pos[j] is generated, also generating little useful information. Beginning at time 16 registers pos[ 3 ], registers pos[ 2 ], and registers pos[ 1 ] are processed in that sequence at steps 102 , 104 , and 106 (shown in FIG. 4 b ).
  • the method of the subject invention may be susceptible to side channel attacks in rare cases where windows d i take on only a few values, it should be noted that it can be shown that the method of the subject invention will always provide at least as much resistance to side channel attacks as the above described prior art method.
  • the binary operation [op] is modular addition.
  • the binary operation [op] is multiplication modulo N.
  • the binary operation [op] is addition of elliptic curve points.
  • FIGS. 6 and 7 show oscilloscope traces of external signals generated by a 32 bit microprocessor performing multiplication, i.e., where the binary operation is addition.
  • the processor operates in accordance with the prior art and executes the following code:

Abstract

A method and system for protecting against side channel attacks on cryptographic systems that attempt to recover information from externally detectable signals, such as electromagnetic fields or power input variations. A system operates in accordance with the subject invention to process a message using a cryptographic protocol involving a secret key d. The protocol includes a step for computing the result of iteratively performing a binary operation [op] on a digital quantity G, where a secret key d is taken as an integer value, such as elliptic curve scalar point multiplication or modular exponentiation

Description

    BACKGROUND OF THE INVENTION
  • The subject invention relates to securing cryptographic systems against external attacks. More particularly it relates to reducing the amount of information which can be discovered by external monitoring of a system performing cryptographic operations (e.g. monitoring of external electromagnetic fields or power consumption for such a system). Hereinafter such external attacks are sometimes referred to as “side channel” attacks.
  • Cryptographic systems perform operations such as encryption, decryption, and generation of digital signatures by operating on messages, or information derived from the messages with keys which, in general, must be maintained as secret. Such keys (hereinafter sometimes “secret keys”) can be a symmetric keys such as those used with known encryption protocols such as DES, or the private key of an asymmetric key pair such as those used with known public key encryption protocols such as RSA. As used herein secret keys also include temporary, or ephemeral, keys that are derived from secret information, used for a limited period and replaced with a new key derived from the same information. Such ephemeral keys are used in known digital signature protocols such as ECDSA. It has been shown that knowledge of an ephemeral key, publicly known parameters, and the public key is sufficient to compromise the secret information used with protocols such as ECDSA.
  • A fundamental process common to all such cryptographic systems is the process of a one-way function. Generally, a one-way function f is a function such that, given y and f, it is infeasible to find x such that f(x)=y. A process used in a number of the cryptographic systems as a one-way function is that of iteratively generating a value H by setting H=G, (where G is a digital value, and is taken as an element, hereinafter sometimes “point,” of a set) then repeating the calculation H=H[op]G d−1 times, where d is an integer utilized as a secret key. Where the binary operation [op] is addition this process is called scalar multiplication. Where the binary operation [op] is multiplication this process is called exponentiation. As used hereinafter the terms “addition”, “multiplication”, and “exponentiation” correspond to the signs “+”, “−”, and “̂”, respectively.
  • Various cryptographic systems such as those described above and, in particular uses of such one way functions in such systems, are well known and need not be described further here; except to note that naïve methods using d−1 successive additions or multiplications generally are too slow, and that various more efficient methods have been developed. A particularly efficient type of method is the fixed window type.
  • FIG. 1 illustrates the prior art computation of a scalar multiplication d-G using the fixed window method. A similar process exists for modular exponentiation. Initially, at step 10, parameters W, a window width, and d, an integer value used as a secret key, are determined and G, a digital value from a defined set over which the binary operation [op] is defined, is input. Then, at step 12, d is expressed as a sequence of k windows (i.e., binary integers W bits in length) di such that dk-1 dk-2 . . . d0 expresses d in base 2W.
  • Then at steps 14 through 20, values Gi are precomputed. At step 14 i is set equal to 0. At step 16 value Gi is set equal to 2iWG, and i is incremented by 1. At step 20, if i<k, the method returns to step 16; otherwise the precomputation ends. It will be apparent to those skilled in the art that steps 10 through 20 need only be performed once and that the results can be stored for use in later operations.
  • After precomputation of values Gi, actual computation of d·G begins at step 22; where values A and B are set equal to an identity element in the set, usually denoted by 0 when the underlying binary operation is addition; or 1 when the binary operation is multiplication; and in the generic case by I, and index j is set equal to 2W−1. The identity element I has a special property in the set from which G is a member in that regardless of the selected value G from the set G[op]I=I[op]G=G. Then at step 24 index i is set equal to 0 (beginning the jth round of computation), and at step 28 the method determines if window di is equal to j. If so it goes to step 30 and sets B equal to B+Gi, and then, at step 32 increments index i by 1. Otherwise, if window di is not equal to j the method goes directly to step 32.
  • After step 32, at step 36, the method determines if index i is equal to k. If not it returns to step 28 and again determines if window di is equal to j. Otherwise, at steps 38 and 40, the method sets value A=A+B and decrements index j by 1.
  • Then at step 44 the method determines if index j is greater than 0. If so, it returns to step 24, resets index i to 0 (and begins the j−1)th round of computation). Otherwise, at step 46 the method returns value A, equal to d·G, and ends. The value A can be used as a public key or used as part of a digital signature for cryptographic operations.
  • FIG. 2 shows hypothetical values which illustrate, in simplified form, a typical externally detectable signal (e.g. power variation, or external electromagnetic field) generated by a cryptographic system in calculating 98·G, with W=2; with time and amplitude expressed in arbitrary units. Hereinafter numbers in the form nnnnbm are to be understood as being expressed in base m; numbers without subscript are to be understood as decimal numbers.
  • Decimal 98=01100010b2; and width W=2 gives windows:
  • d3=|01|d2=10|d1=00|d0=10, or 1202b4. Examination of FIG. 2 shows that these values can readily be recovered by a side channel attack. From time 1 through time 6 initialization takes place during steps 0 through 20. Little useful information is generated in the externally detectable signal during this period. Beginning at time 6 rounds j=3,
    j=2, and j=1 are computed in that sequence. Each round is delimited by peaks
    50-3, 50-2, and 50-1 which occur substantially as the method loops through step 38, setting A=A+B at the end of each round. (It should be noted that peaks 50-3, 50-2, and 50-1 are shown as having a different amplitude from other peaks in FIG. 2, but, even if this were not so, these peaks can readily be identified by the regularity of their timing.) From inspection of the method of FIG. 1 it is readily seen that the decision, at step 28, whether or not to execute step 30, setting B=B+Gi, and generating an externally detectable peak, occurs at substantially the same time within each round. From this FIG. 2 immediately shows:
  • for j=3 no peaks indicates that no di=3, implying d=????b4;
  • for j=2 peaks 52-2 and 52-0 indicate that d2=d0=2, implying d=?2?2b4;
  • for j=1 peak 52-3 indicates that d3=1, implying d=12?2b4;
  • by elimination d1=0, implying d=1202b4=decimal 98;
  • thus showing that a side channel attack can readily yield the value used as the secret (or ephemeral) key d, i.e., decimal 98.
  • One approach to protecting cryptographic systems from side channel attacks is to physically shield the system so that external signals are more difficult to detect. Shielding however is not always feasible either because of the cost or because of physical limitations inherent in the system application. (e.g. Smart cards, which are mass market products intended to be carried by the user and so must be both low cost and small.) Further, continuing advances in signal processing techniques make it possible to recover information from signals with ever lower signal to noise ratios; making the protection offered by physical shielding increasingly uncertain over time. Another approach is to design computational methods that reduce the information contained in externally detectable signals. Techniques for doing this are described, for example, in U.S. Pat. No. 6,298,442 issued to Kocher et al. for Secure Modular Exponentiation with Leak Minimization for Smartcards and Other Cryptosystems, which describes various techniques used in methods which are resistant to side channel attacks.
  • While techniques such as those described in the above '442 patent are believed generally useful they are not believed to provide maximal protection for fixed window methods, as will be described below. Thus it is an object of the subject invention to provide a method and system for implementing a fixed window method for iteratively generating a value [op]dG; the method having increased resistance to side channel attacks.
  • BRIEF SUMMARY OF THE INVENTION
  • The above object is achieved and the disadvantages of the prior art are overcome in accordance with the subject invention by a method and system operating in accordance with the method to process a message using a cryptographic protocol involving an integer value d used as a secret or ephemeral key, the protocol including computing a result of iteratively performing a binary operation [op] on a digital quantity G. In accordance with the subject invention the result is computed by expressing the key d in base 2W was dk-1 dk-2 . . . d0; determining values Gi, for 0≦i≦k−1, such that Gi=[op]2 iW G; establishing a table of registers pos[j], 1≦j≦2W−1, such that, for each of the values of j, register pos[j] stores the values of i such that di=j; setting a value A=I, where I is the identity element in a set including said quantity G for the operation [op], setting a value j=2W−1; and then for all of said values i stored in pos[j], updating said value B=B[op]Gi; updating A=A[op]B; setting said value j=j−1; and if said value j>0 returning to update said value B, and otherwise, returning the value A=[op]dG, where the value A can be used as a public or ephemeral key in elliptic curve cryptography or the value A can be used as a digital signature in other cryptographic systems.
  • In accordance with one aspect of the subject invention the binary operation [op] is addition.
  • In accordance with another aspect of the subject invention the binary operation [op] is multiplication modulo N, where N is an integer.
  • In accordance with another aspect of the subject invention the secret key d is an asymmetric key and the message is encrypted or decrypted or digitally signed.
  • In accordance with another aspect of the subject invention the secret key d is an ephemeral key and the message is digitally signed.
  • Other objects and advantages of the subject invention will be apparent to those skilled in the art from consideration of the detailed description set forth below and the attached drawings.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 shows a flow diagram of a prior art method for computing d·G mod N.
  • FIG. 2 illustrates a hypothetical external signal generated in executing a computation in accordance with the method of FIG. 1.
  • FIG. 3 shows a block diagram of a cryptographic system in accordance with the subject invention.
  • FIGS. 4 a and 4 b show a flow diagram of an method for controlling the system of FIG. 3 to compute the iterative application of a binary operation [op] to a value G in accordance with the subject invention.
  • FIG. 5 illustrates a hypothetical external signal generated in executing a computation in accordance with the method of FIGS. 4 a and 4 b.
  • FIG. 6 shows an oscilloscope trace of an external signal generated in executing a computation in substantially in accordance with the method of FIG. 1.
  • FIG. 7 shows an oscilloscope trace of an external signal generated in executing a computation in substantially in accordance with the method of FIGS. 4 a and 4 b.
  • DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS OF THE INVENTION
  • FIG. 3 shows cryptographic system 60 that is resistant to such side channel attacks. System 60 includes processor 62 having input/output channel 63 for input of message M and output of cryptographically processed message E [M]. Processor 62 communicates with memory 64 which stores program code for controlling processor 62 to implement a cryptographic protocol such as RSA, or ECDSA in locations 64-1, window width W in location(s) 64-2 and secret key d, which is an integer value in location(s) 64-3. Such cryptographic protocols are well known and need not be described further here for an understanding of the subject invention; except to note that these and other similar protocols implement processes where a binary operation [op] is iteratively applied to a value G. Code and values stored in memory 64 can of course be updated for various different applications in any convenient manner. Processor 62 also communicates with working memory 66 which stores values Gi, 0≦i≦k−1, where k is the number of digits required to express key d base W, in locations 66-1; registers pos[j], where 1≦j≦2W−1, in locations 66-2; and accumulation registers (hereinafter sometimes “accumulators”) A and B, in locations 66-3.
  • FIGS. 4 a and 4 b show a flow diagram of the system 60 in executing a method in accordance with the subject invention for computing [op]dG in a cryptographic protocol. Where the binary operation [op] is addition “+” the result is the multiplication “d·G”. Where “[op]” is multiplication “·” the result is the exponentiation “Gd”.
  • In substantially the same manner as described above with respect to FIG. 1, at step 70, parameters W, a window width and d, a secret key, taken as a binary integer, are determined; and G, a binary integer derived from message M on which the cryptographic system operates, is input. Then, at step 72, d is expressed as a sequence of windows (i.e. binary integers W bits in length) di such that dk-1 dk-2 . . . d0 expresses d in base 2W.
  • Then at steps 74 through 80, values Gi are precomputed. At step 74 i is set equal to 0. At step 76 value Gi is set equal to [op]2 iW G (e.g. if the operation is addition: Gi=2iw·G, and if it is multiplication Gi=G2 iW , and i is incremented by 1. At step 80, if i<k, the processor 62 returns to step 76; otherwise the precomputation ends. As with the method of FIG. 1, steps 70 through 80 need only be performed once and the results can be stored for use in later operations.
  • At step 82 accumulators A and B are set equal to I where I is the identity element for the binary operation [op]: 0 for addition, 1 for multiplication; and j is set=2W−1. At step 84 registers pos[j], 0≦j≦2w−1, are defined in working memory locations 86-2, and then cleared at step 88.
  • At step 901 is set=1 and at step 92 the current value of i is stored in register pos[di]. At step 96 i is set=i+1 and at step 98, if i≠k, processor 62 returns to step 92. Thus a table is defined such that, for all j>0, pos[j] contains all those, and only those, values of i such that di=j.
  • If i=k in step 98, then at step 100 (shown in FIG. 4 b) j is set=2W−1. Then at step 102 processor 62 determines if register pos[j] is empty. If not, at step 104, processor 62 determines the next value stored in pos[j], sets i=to the selected value, and deletes the selected value from pos[j]. Then at step 106 processor 62 sets B=B[op]Gi.
  • If at step 102 register pos[j] is determined to be empty, then at step 110 processor 62 sets accumulator A=A[op]B, at step 112 sets j=j−1, and at step 114 determines if j>0, and, if so returns to step 102. Otherwise, at step 118 processor 62 returns A. As noted above, if [op] is addition A=d·G, and if it is multiplication A=Gd.
  • Again taking d=98=1202b4 as an example, examination of FIG. 5 shows the increased difficulty in recovering these values by a side channel attack. From time 1 through time 8 initialization takes place during steps 70 through 80. Again, little useful information is generated in the externally detectable signal during this period. From time 8 through time 16 the table of registers pos[j] is generated, also generating little useful information. Beginning at time 16 registers pos[3], registers pos[2], and registers pos[1] are processed in that sequence at steps 102, 104, and 106 (shown in FIG. 4 b). Each round of processing is delimited by peaks 120-3, 120-2, and 120-1 which occur substantially as the method loops through step 110, setting A=A [op]B. From inspection of the method of FIGS. 4 a and 4 b it is readily seen that the peaks generated at step 106, setting B=B[op]Gi, do not have any timing dependencies indicating the value of i when they occurred. From this FIG. 5 immediately shows:
  • for pos[3] no peaks indicates that no di=3;
  • for pos[2] peaks 122 indicate that di=2 for two values of i, without any indication of which particular values they are;
  • for pos[1] peak 124 indicates that di=1 for one (unknown) value of i; and
  • by elimination di=0 for one (unknown) value of i;
  • showing only that secret key d is equal to one of twelve possible combinations of two “2's”; one “1”; and one “0”. While twelve possibilities of course will not present an attacker with a significant obstacle, the number of possible combinations grows rapidly with k (number of windows) and, with typical secret keys being hundreds of bits in length, it is believed that a practical cryptographic system in accordance with the subject invention will present substantial obstacles to a side channel attack.
  • While it is possible that the method of the subject invention may be susceptible to side channel attacks in rare cases where windows di take on only a few values, it should be noted that it can be shown that the method of the subject invention will always provide at least as much resistance to side channel attacks as the above described prior art method.
  • In a preferred embodiment of the subject invention the binary operation [op] is modular addition. In another preferred embodiment of the subject invention the binary operation [op] is multiplication modulo N. In another preferred embodiment of the subject invention the binary operation [op] is addition of elliptic curve points.
  • FIGS. 6 and 7 show oscilloscope traces of external signals generated by a 32 bit microprocessor performing multiplication, i.e., where the binary operation is addition. In FIG. 6 the processor operates in accordance with the prior art and executes the following code:
  • for(j=15;j>0;j−−){
    for (i=0;i<n;i++){
    if(((OP−>d[i/8]&NIB_MASK[i%8])>>(4*(i%8)))==j){
    point_add(B, B, baseP[i], T);
    }
    }
    point_add(A, A, B, T);
    }

    In FIG. 7 the processor operates substantially in accordance with the subject invention and executes the following code:
  • for (j = 0; j < 16; j++) {
    index[j] = 0 ;
    }
    for (k = 0; k < n; k++) {
    nib = ((OP−>d[k/8]&NIB_MASK[k%8])>>(4*(k%8)));
    pos[nib][index[nib]++] = k;
    }
    for (j = 15; j>0; j−−) {
    for (i = 0; i < index[j]; i++) {
    point_add(B, B, baseP[pos[j][i]], T);
    }
    point_add(A, A, B, T);
    }

    In both Figures the key (i.e. integer d) used was:
      • 111111111111111115555555599559999FFFFFFFFFFFFFFFF
  • It will immediately be apparent to those skilled in the art that substantially less information about the value of the key can be determined from the external signal shown in FIG. 7 then from that shown in FIG. 6. In FIG. 6 the number of digits having each value is readily found while in FIG. 7 only the number of non-zero digits could be identified. Note that in both cases this is less than the information found in the corresponding hypothetical examples illustrated in FIGS. 2 and 5. It is believed that this is because the hypothetical examples were created assuming little or no shielding or other practical difficulties. It is also believed that, with further analysis the exact vale of the key can be determined from FIG. 6.
  • The embodiments described above and illustrated in the attached drawings have been given by way of example and illustration only. From the teachings of the present application those skilled in the art will readily recognize numerous other embodiments in accordance with the subject invention. Accordingly, limitations on the subject invention are to be found only in the claims set forth below.

Claims (16)

1. A method for cryptographically securing a message using a secret key d to iteratively perform a binary group operation of addition or multiplication [op] on a digital quantity G, said method comprising:
expressing d in base 2W was dk-1 dk-2 . . . d0, where W is a window width and k is a number of windows required to express d;
determining values Gi, for 0≦i≦k−1, where Gi=[op]2 iW G;
for values j where 1≦j≦2W−1, establishing a table of register positions [j] where, for each of said values of j, register [j] position stores each of said values of i where di=j;
setting values A=I, and B=I, where I is the identity element in a set including said quantity G for the binary group operation [op];
setting a value j=2W−1; and then
for all of said values i stored in pos[j], updating said value B=B[op]Gi;
updating A=A[op]B;
setting said value j=j−1; and
if said value j>0 returning to update said value B=B[op]Gi; and otherwise
returning said value A, where said value A=[op]dG, for use as a cryptographic; and
using said cryptographic key to cryptographically secure and message.
2. (canceled)
3. A method as described in claim 1 where the binary group operation [op] is addition of elliptic curve points.
4. A method as described in claim 1 where said binary group operation [op] is multiplication modulo N, where N is an integer.
5. A method as described in claim 1, wherein said digital quantity G is derived from a message M.
6. A method as described in claim 1, wherein said digital quantity G is a fixed value.
7. A cryptographic system for decrypting an encrypted message M using a key, d, by iteratively performing a binary group operation [op] on a digital quantity G to produce a decrypted message D(M), said quantity G being derived from said encrypted message M, said system comprising:
a plurality of first storage locations storing program code;
one or more second storage locations storing a window width W;
one or more third storage locations storing a value for said key, d;
a plurality of first working storage locations for storing a corresponding plurality of values Gi;
a plurality of second working storage locations for storing a corresponding plurality of registers positions;
a plurality of accumulators for storing variable values A and B; and
a processor communicating with said storage locations and said working storage locations, said processor having an input/output channel for input of said encrypted message M and output of said decrypted message D(M), said processor executing said program code to decrypt said message M by:
expressing said key d in base 2W was d0 d1 . . . dk-1;
determining said values Gi, for 0≦i≦k−1, such that Gi=[op]2 iW G and storing said determined values of Gi in said first working storage locations;
for values j such that 1≦j≦2W−1, establishing a table of said register positions [j] such that for each value of j, register position [j] stores values of i such that di=j;
setting said values A=I, and B=I, where I is an identity element for said binary operation [op];
setting a value j=2W−1;
determining if register position [j] is empty;
if register position [j] is not empty, selecting a next of said values of i stored in said register position [j], deleting said next value of i from said register position [j], setting said value B=said value B[op]Gi, where i=said next value, and repeating until register position [j] is empty;
setting said value A=A[op]B;
setting said index j=j−1; and
if said index j≧0, returning to determine if register position [j] is empty; otherwise
returning said value A; where said value A=[op]dG; and
outputting as said decrypted message D(M) said returned value A.
8. A system as described in claim 7 where said value d is an asymmetric key.
9. A system as described in claim 7 where said binary group operation [op] is multiplication module N, where N is an integer.
10. A system as described in claim 9 where said value d is an asymmetric key.
11. A cryptographic system for generating a public key of a public/private key pair, the public key being derived from a private key, d, taken as an integer value, of the key pair by iteratively performing a binary group operation [op] on a digital representation of a group element G, said system comprising:
a plurality of first storage locations storing program code;
one or more second storage locations storing a window width W;
one or more third storage locations storing the private key d;
a plurality of first working storage locations for storing a corresponding plurality of values Gi
a plurality of second working storage locations for storing a corresponding plurality of registers positions [j];
a plurality of accumulators for storing variable values A and B; and
a processor communicating with said storage locations and said working storage locations, said processor having an input/output channel for input of said private key and output of said public key, said processor executing said program code to generate said public key by:
determining a series of k digital values di, where index i has values ranging from 0 to k−1, where said series represents said private key in base 2W;
determining k digital values Gi, such that Gi=[op]2 iW G;
setting said variable value A and said variable value B equal to an identity element for said binary operation;
for values j such that 1≦j≦2W−1, establishing a table of registers [j] such that, for each of said values of j, register position [j] stores each of said values of i such that di=j;
set said index j=2W−1;
determining if register position [j] is empty;
if register position [j] is not empty, selecting a next of said values of i stored in said register position [j], deleting said next value of i from said register position [j], setting said value B=said value B[op]Gi, where i=said next value, and repeating until register position [j] is empty;
setting said value A=A[op]B;
setting said index j=j−1; and
if said index j≧0, returning to determine if register position [j] is empty; otherwise
returning said public key as said value A, where said value A=[op]dG.
12. A system as described in claim 11, wherein said key pair is an ephemeral key pair.
13. A cryptographic system for creating a digital signature for a message M using a key, d, by iteratively performing a binary group operation [op] on a digital quantity G to produce said digital signature sig(M), said quantity G being derived from said message M, said system comprising:
a plurality of first storage locations storing program code;
one or more second storage locations storing a window width W;
one or more third storage locations storing a value for said key, d;
a plurality of first working storage locations for storing a corresponding plurality of values Gi;
a plurality of second working storage locations for storing a corresponding plurality of register positions [j];
a plurality of accumulators for storing variable values A and B; and
a processor communicating with said storage locations and said working storage locations, said processor having an input/output channel for input of said message M and output of said digital signature sig(M), said processor executing said program code to create said digital signature by:
expressing said key d in base 2W was d0 d1 . . . dk-1;
determining said values Gi, for 0≦i≦k−1, such that Gi=[op]2 iW G and storing said determined values of Gi in said first working storage locations;
for values j such that 1≦j≦2W−1, establishing a table of said register positions [j] such that for each value of j, register position [j] stores values of i such that di=j;
setting said values A=I, and B=I, where I is an identity element for said binary operation [op];
setting a value j=2W−1; and then
for all of said values i stored in register position [j], updating said value B=B[op]Gi;
updating said value A=A[op]B
setting said value j=j−1; and
if said value j>0 returning to update said value=B[op]Gi; otherwise
returning said value A; where said value A=[op]dG; and
outputting as said digital signature sig(M) said returned value A.
14. A system as described in claim 13 where said value d is an asymmetric key.
15. A system as described in claim 13 where said binary group operation [op] is multiplication module N, where N is an integer.
16. A system as described in claim 15 where said value d is an asymmetric key.
US11/144,969 2005-06-03 2005-06-03 Method and system for protecting against side channel attacks when performing cryptographic operations Expired - Fee Related US7404089B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US11/144,969 US7404089B1 (en) 2005-06-03 2005-06-03 Method and system for protecting against side channel attacks when performing cryptographic operations
EP06011494A EP1729441A1 (en) 2005-06-03 2006-06-02 Method and system for protecting against side channel attacks when performing cryptographic operations

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US11/144,969 US7404089B1 (en) 2005-06-03 2005-06-03 Method and system for protecting against side channel attacks when performing cryptographic operations

Publications (2)

Publication Number Publication Date
US7404089B1 US7404089B1 (en) 2008-07-22
US20080175376A1 true US20080175376A1 (en) 2008-07-24

Family

ID=37025221

Family Applications (1)

Application Number Title Priority Date Filing Date
US11/144,969 Expired - Fee Related US7404089B1 (en) 2005-06-03 2005-06-03 Method and system for protecting against side channel attacks when performing cryptographic operations

Country Status (2)

Country Link
US (1) US7404089B1 (en)
EP (1) EP1729441A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070033405A1 (en) * 2005-06-14 2007-02-08 Alfred Menezes Enhanced key agreement and transport protocol
US20080049931A1 (en) * 2006-03-04 2008-02-28 Samsung Electronics Co., Ltd. Cryptographic methods including montgomery power ladder algorithms
JP2017511902A (en) * 2014-04-04 2017-04-27 クアルコム,インコーポレイテッド Elliptic curve point multiplication procedure to resist side channel information leakage

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2838210B1 (en) * 2002-04-03 2005-11-04 Gemplus Card Int CRYPTOGRAPHIC METHOD PROTECTED FROM CACHE-CHANNEL TYPE ATTACKS
JP2009532973A (en) * 2006-04-06 2009-09-10 エヌエックスピー ビー ヴィ Secure decryption method
US8205097B2 (en) * 2007-07-05 2012-06-19 Nxp B.V. Microprocessor in a security-sensitive system
CN101374043B (en) * 2007-08-24 2010-09-22 管海明 Cipher key negotiating method, enciphering/deciphering method and signature/verification method
FR2926652B1 (en) * 2008-01-23 2010-06-18 Inside Contactless COUNTER-MEASUREMENT METHOD AND DEVICES FOR ASYMMETRIC CRYPTOGRAPHY WITH SIGNATURE SCHEMA
US9645794B2 (en) * 2014-09-23 2017-05-09 Texas Instruments Incorporated Homogeneous atomic pattern for double, add, and subtract operations for digital authentication using elliptic curve cryptography
GB2544452B (en) * 2015-08-26 2019-09-11 Advanced Risc Mach Ltd Data processing systems
EP3503459B1 (en) * 2017-12-22 2021-04-21 Secure-IC SAS Device and method for protecting execution of a cryptographic operation
US11100236B2 (en) 2019-06-26 2021-08-24 Seagate Technology Llc Distributed data security
CN112329025B (en) * 2020-11-18 2022-02-01 北京智芯微电子科技有限公司 Power terminal bypass safety analysis method and power terminal bypass safety analysis system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5299262A (en) * 1992-08-13 1994-03-29 The United States Of America As Represented By The United States Department Of Energy Method for exponentiating in cryptographic systems
US6298442B1 (en) * 1998-06-03 2001-10-02 Cryptography Research, Inc. Secure modular exponentiation with leak minimization for smartcards and other cryptosystems
US20050152541A1 (en) * 2002-12-18 2005-07-14 Fujitsu Limited Tamper-proof elliptic encryption with private key

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5299262A (en) * 1992-08-13 1994-03-29 The United States Of America As Represented By The United States Department Of Energy Method for exponentiating in cryptographic systems
US6298442B1 (en) * 1998-06-03 2001-10-02 Cryptography Research, Inc. Secure modular exponentiation with leak minimization for smartcards and other cryptosystems
US20050152541A1 (en) * 2002-12-18 2005-07-14 Fujitsu Limited Tamper-proof elliptic encryption with private key

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070033405A1 (en) * 2005-06-14 2007-02-08 Alfred Menezes Enhanced key agreement and transport protocol
US9054861B2 (en) * 2005-06-14 2015-06-09 Certicom Corp. Enhanced key agreement and transport protocol
US20080049931A1 (en) * 2006-03-04 2008-02-28 Samsung Electronics Co., Ltd. Cryptographic methods including montgomery power ladder algorithms
US8379842B2 (en) * 2006-03-04 2013-02-19 Samsung Electronics Co., Ltd. Cryptographic methods including Montgomery power ladder algorithms
JP2017511902A (en) * 2014-04-04 2017-04-27 クアルコム,インコーポレイテッド Elliptic curve point multiplication procedure to resist side channel information leakage

Also Published As

Publication number Publication date
EP1729441A1 (en) 2006-12-06
US7404089B1 (en) 2008-07-22

Similar Documents

Publication Publication Date Title
US7404089B1 (en) Method and system for protecting against side channel attacks when performing cryptographic operations
EP1044405B1 (en) Power signature attack resistant cryptography
Coron Resistance against differential power analysis for elliptic curve cryptosystems
Yen et al. Power analysis by exploiting chosen message and internal collisions–vulnerability of checking mechanism for RSA-decryption
US6782100B1 (en) Accelerated finite field operations on an elliptic curve
KR100855958B1 (en) Cryptographic system and method for securing against side channel attacks based on Hamming distance
Walter MIST: An efficient, randomized exponentiation algorithm for resisting power analysis
EP0704124A4 (en) A cryptographic method
EP2264939B1 (en) Encrypting method having countermeasure function against power analyzing attacks
EP1708081B1 (en) Method and device for calculating a Montgomery conversion parameter
Chen et al. Improving timing attack on RSA-CRT via error detection and correction strategy
EP0874307A1 (en) Accelerated finite field operations on an elliptic curve
EP2119100B1 (en) Methods and apparatus for performing an elliptic curve scalar multiplication operation using splitting
US20050084098A1 (en) Method of obscuring cryptographic computations
WO2008106789A1 (en) Method and apparatus for generating a public key in a manner that counters power analysis attacks
JP4977300B2 (en) Cryptography and equipment
EP0952697B1 (en) Elliptic curve encryption method and system
US7123717B1 (en) Countermeasure method in an electronic component which uses an RSA-type public key cryptographic algorithm
JP4875686B2 (en) Accelerating finite field operations on elliptic curves
JP4108391B2 (en) Tamper resistant cryptographic processing using a secret key
Knežević et al. Speeding up bipartite modular multiplication
Walter Seeing through MIST given a small fraction of an RSA private key
Kim et al. Power analysis attacks and countermeasures on ηT pairing over binary fields
Pontie et al. An Elliptic Curve Crypto-Processor Secured by Randomized Windows
Neves et al. Degenerate curve attacks

Legal Events

Date Code Title Description
FPAY Fee payment

Year of fee payment: 4

REMI Maintenance fee reminder mailed
LAPS Lapse for failure to pay maintenance fees
STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20160722