Payment smart cards with hierarchical session key derivation providing security against differential power analysis and other attacks
09940772 ยท 2018-04-10
Assignee
Inventors
Cpc classification
H04L9/0625
ELECTRICITY
H04L9/003
ELECTRICITY
G06Q20/341
PHYSICS
H04L9/0891
ELECTRICITY
International classification
G07F7/10
PHYSICS
H04L9/06
ELECTRICITY
H04L9/00
ELECTRICITY
G06Q20/34
PHYSICS
H04L9/08
ELECTRICITY
Abstract
Chip cards are used to secure credit and debit payment transactions. To prevent fraudulent transactions, the card must protect cryptographic keys used to authenticate transactions. In particular, cards should resist differential power analysis and/or other attacks. To address security risks posed by leakage of partial information about keys during cryptographic transactions, cards may be configured to perform periodic cryptographic key update operations. The key update transformation prevents adversaries from exploiting partial information that may have been leaked about the card's keys. Update operations based on a hierarchical structure can enable efficient transaction verification by allowing a verifying party (e.g., an issuer) to derive a card's current state from a transaction counter and its initial state by performing one operation per level in the hierarchy, instead of progressing through all update operations performed by the card.
Claims
1. A cryptographic device comprising: (a) at least one memory containing a value of a secret parameter; and (b) a processor configured to perform a plurality of cryptographic transactions, each said transaction involving a cryptographically processed datum, where: (i) each of said cryptographic transactions is secured using a secret parameter; (ii) said processor configured to reduce the usefulness of information gathered through external monitoring of said cryptographic device related to said secret parameter by performing a plurality of cryptographic update operations to derive an updated value of said secret parameter at a different level within a hierarchy of secret parameters, wherein deriving an updated value of said secret parameter comprises applying at least one invertible function to the value of said secret parameter before said plurality of cryptographic operations; and (iii) said processor configured to store the updated value of said secret parameter in said at least one memory for use in at least one subsequent transaction; and (c) an interface configured to output said datum to a cryptographic processing device.
2. The cryptographic device of claim 1 where said secret parameter is a cryptographic key.
3. The cryptographic device of claim 1 where said securing using said secret parameter includes deriving a cryptographic key from said secret parameter, and applying said cryptographic key for said transaction.
4. The cryptographic device of claim 1 where said hierarchy of secret parameters is characterized by: (a) each secret parameter being at least one of a parent in said hierarchy of secret parameters or a child in said hierarchy of secret parameters; (b) each parent secret parameter having multiple child secret parameters, each of which can be derived from a parent secret parameter in a cryptographic update operation from said parent secret parameter; and (c) each child secret parameter has a parent secret parameter from which said child secret parameter can be derived in a single cryptographic update operation.
5. The cryptographic device of claim 4 where: (a) each parent secret parameter has the same number of child secret parameters; and (b) said cryptographic processing device is configured to derive a particular secret parameter used by said cryptographic device to secure a particular transaction, by performing less than the total number of possible transactions performable by said device.
6. The cryptographic device of claim 4 where: (a) elements within said hierarchy are characterizable by corresponding index parameters; (b) said device is configured to receive an index parameter; and (c) said step (b)(ii) of claim 1 includes performing a plurality of said update operations to transition from a current secret parameter, corresponding to a current index parameter, to a final secret parameter corresponding to said index parameter.
7. The device of claim 6 where: (a) said update operation utilizes said current index parameter and said current secret parameter; and (b) said device replaces the value of the current secret parameter after each cryptographic update operation, so that secret parameter values from multiple transactions are not maintained.
8. The cryptographic device of claim 1 where said cryptographic device is a smartcard.
9. A system comprising the cryptographic device of claim 1, wherein the cryptographic device comprises a smartcard, and said cryptographic processing device comprises a smartcard reader.
10. The cryptographic device of claim 1 where said device is configured to interface with said cryptographic processing device in a contactless manner.
11. A system comprising the cryptographic device of claim 1, wherein the cryptographic device comprises a contactless transaction device, and said cryptographic processing device comprises a transaction verification device.
12. A computer-implemented method of performing a cryptographic transaction, using a secret parameter stored in a non-transitory computer readable memory, comprising: (a) performing a cryptographic transaction secured using said secret parameter; (b) applying a cryptographic update operation to said secret parameter by performing n cryptographic update operations using a processor to derive an updated value of said secret parameter within a hierarchy by applying an invertible function, such that after said n cryptographic update operations have been performed, a receiving party knowing the value of the secret parameter prior to said n cryptographic update operations derives the value of said updated secret parameter in less than n operations; where all of said secret parameters from said n cryptographic update operations are within said hierarchy of secret parameters; and (c) replacing said secret parameter with said updated secret parameter in said memory.
13. The method of claim 12 where said secret parameter is a cryptographic key.
14. The method of claim 12 where said securing using said secret parameter includes deriving a cryptographic key from said secret parameter, and applying said cryptographic key for said transaction.
15. The method of claim 12 where said hierarchy of secret parameters is characterized by: (a) each secret parameter being at least one of a parent in said hierarchy of secret parameters or a child in said hierarchy of secret parameters; (b) each parent secret parameter having multiple child secret parameters, each of which can be derived from a parent secret parameter in a single cryptographic update operation from said parent secret parameter; and (c) each child secret parameter has a parent secret parameter from which said child secret parameter can be derived in a single cryptographic key update operation.
16. The method of claim 15 where: (a) each parent secret parameter has the same number of child secret parameters; and (b) said receiving party is capable of deriving a particular secret parameter, used to secure a particular transaction by a party performing said method, by performing less than the total number of possible transactions performable by said party performing said method.
17. The method of claim 15: (a) where elements within said hierarchy are characterizable by corresponding index parameters; and (b) further comprising successively iterating said update operations to transition from a current secret parameter corresponding to a current index parameter, through one or more intermediate secret parameters, to a final secret parameter corresponding to a desired an index parameter.
18. The method of claim 17 where: (a) said update operation utilizes said current index parameter and said current secret parameter; and (b) the value of the current secret parameter is replaced after each cryptographic update operation, so that only current secret parameter values are maintained.
19. The method of claim 12 where said method is performed using a smartcard, and said receiving party uses a smartcard reader.
20. The method of claim 19 where said smartcard is contactless.
21. The method of claim 12 implemented in a device that regulates access to an encrypted television signal.
22. The method of claim 12 implemented in a payment device.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
DETAILED DESCRIPTION
(5) Indexed Key Management
(6) The techniques disclosed herein can enable parties to perform cryptographic operations with increased security against external monitoring attacks. Although exemplary embodiments are described involving two parties, a client and a server, the terms client and server are chosen for convenience and might not necessarily correspond directly to any particular role in a system design. For example, the client could be a smartcard, and the server could be a mainframe computer, or vice versa. Furthermore, although most cryptographic operations involve two parties (e.g., one at the client and one at the server), the techniques can, of course, be applied in environments involving only one party (such as in secure memory or storage systems in which both client and server are under a single party's control or are combined in a single device) or in environments involving more than two parties and/or devices.
(7) In an exemplary embodiment, the client is initialized with a secret key K.sub.0 for a symmetric cryptosystem, where K.sub.0 is also known to (or derivable by) the server. The key K.sub.0 is usually (but not necessarily) specific to a particular client device or party. The client also has a (typically non-secret) index or transaction counter C, which may be initialized to zero. An additional parameter is an index depth D. The value of D may also be non-secret, and (for example) may be client-specific or may be a system-wide global constant. The value of D determines the cycle length of the key update process.
(8)
(9) Each of the boxes in the figure represents a value of the secret value (K.sub.C). Thus, multiple dots in a box represent different states sharing the same secret value K.sub.C. The top row (row 0) of the figure contains one box, which corresponds to the initial state K.sub.0 110 as well as subsequent states K.sub.30 140 and K.sub.60 170, all of which share the same secret value K.sub.C. The next row (row 1) contains two boxes, the left of which corresponds to a trio of states (K.sub.1 111, K.sub.15, and K.sub.29) sharing the same secret value, and the right box in the second row corresponds to a second trio of states (K.sub.31, K.sub.45, and K.sub.59) sharing yet another secret value. Similarly, row 2 contains four boxes, representing a total of twelve states of which 4 trios each share among themselves the same secret value. More generally, in this exemplary embodiment, row N (where N<D1) contains 2.sup.N boxes (or unique secret values) and 3(2.sup.N) states, and the last row (N=D1) contains 2.sup.N boxes and 2.sup.N states. The thicker (curved) path diagrams the process by which the states are updated, starting from the initial state 110 and continuing through to the final state 170. As the states are updated, counter C is also updated (by one for each update).
(10) The exemplary state update processes involve two functions (F.sub.A and F.sub.B), and their inverses (F.sub.A.sup.1 and F.sub.B.sup.1), for a total of four functions. At step 100, the client is initialized or personalized with a starting counter C=0 and a starting state having a starting secret value K.sub.C=K.sub.0. At step 110, the device performs the first transaction, using K.sub.C (or a key derived from K.sub.C). The key can be used in virtually any symmetric cryptographic transaction. (For example, such a transaction could involve, without limitation, computing or verifying a MAC (Message Authentication Code) on a message, encrypting or decrypting a message, producing a pseudorandom challenge value, deriving a key, etc. Examples of messages include, without limitation, data specifying the amounts of funds transfer operations, e-mail messages, challenge/response authentication data, parameter update authorizations, code updates, audio messages, digitized images, etc.)
(11) After step 110, the client device's secret value K.sub.C is updated by applying the function F.sub.A and the counter C is incremented, i.e. by performing CC+1 and K.sub.CF.sub.A(K.sub.C). (Thus, at step 111, C=1 and K.sub.C=F.sub.A(K.sub.0).) The updated value of K.sub.C is used to perform a transaction at step 111. After step 111, C is incremented again and F.sub.A is again applied to K.sub.C, i.e. by performing CC+1 and K.sub.C=2F.sub.A(K.sub.C), yielding the secret key used at step 112. The same pair of operations (CC+1 and K.sub.CF.sub.A(K.sub.C)) are similarly applied between steps 112 and 113, and between steps 113 and 114.
(12) The transaction at step 115 should use the same value of K.sub.C as did the transaction at step 113, since steps 113 and 115 are shown in the same box. Thus, after the transaction at step 114 the update process is performed by computing CC+1 (yielding C=5) and K.sub.C=5F.sub.A.sup.1(K.sub.C). Note that K.sub.C=5=F.sub.A.sup.1(K.sub.C=4)=F.sub.A.sup.1(F.sub.A(K.sub.C=3))=K.sub.C=3. Thus, the value of K.sub.C used at step 115 is the same as the value used at step 113. After the transaction at step 115, K.sub.C is updated using function K.sub.B by incrementing C and computing K.sub.C=6F.sub.B(K.sub.C). After the transaction at step 116, the secret value for transaction 117 is computed by applying the function F.sub.B.sup.1 to K.sub.C.
(13) The update process operates such that after each transaction, a key state update process is performed. The key update involves incrementing C and applying one of the functions F.sub.A, F.sub.B, F.sub.A.sup.1, or F.sub.B.sup.1 to the state K.sub.C. The use of invertable functions allows a first state and a second state to share the same secret value, where the first state precedes entry into a child (lower level) box from a parent (upper level) box, and the second state is created by reentry into the parent box from the child box. Further, the multiplicity of functions (e.g., F.sub.A and F.sub.B in the exemplary embodiment) allows the creation of multiple child boxes from each parent box and, hence, a large number of allowable states before the sequence is exhausted (e.g., at end state 190). In going from one particular state to another particular state, the choice of functions (e.g., in the exemplary embodiment of
(14) Eventually, the client may reach a point at which the entire table has been traversed. For example, the end of the process of
(15)
(In the example with D=5, there can thus be 2.sup.63=61 transactions.) By choosing a sufficiently large value for D, a system designer can make the maximum number of transactions so large that the end will never be reached. For example, D=39 will allow more than 1 trillion (10.sup.12) transactions without repeating.
Client-Side Indexed Key Update
(16) For the exemplary embodiment of
(17) At step 230, the device tests whether the variable V is equal to the quantity 2.sup.N3. If equal, function F.sub.A.sup.1 should be applied, and processing proceeds to step 235 where the device increments C and updates K.sub.C by computing K.sub.CF.sub.A.sup.1(K.sub.C). Otherwise, at step 240, the device tests whether the variable V is equal to the quantity 2(2.sup.N2). If equal, function F.sub.B.sup.1 should be applied, and processing proceeds to step 245 where the device increments C and updates K.sub.C by computing K.sub.CF.sub.B.sup.1(K.sub.C). Otherwise, at step 250, the device tests whether the variable V is equal to zero. If equal, function F.sub.A should be applied, and processing proceeds to step 255 where the device increments C and updates K.sub.C by computing K.sub.CF.sub.A(K.sub.C). Otherwise, at step 260, the device tests whether the variable V is equal to the quantity 2.sup.N2 . If equal, function F.sub.B should be applied, and processing proceeds to step 265 where the device increments C and updates K.sub.C by computing K.sub.CF.sub.B(K.sub.C).
(18) At step 270, the device checks whether the value of V exceeds 2.sup.N2 . If not, processing proceeds directly to step 280. If V is larger than 2.sup.N2, the value of V is diminished by 2.sup.N2 and processing proceeds to step 280. At step 280, V and N are each decremented, then processing proceeds to step 230.
(19) After performing a state update function at step 235, step 245, step 255, or step 265, the client process terminates successfully at step 290. After the successful conclusion of the process of
(20) Note that each iteration of the process of
(21) Server-Side Indexed Key Derivation
(22)
(23) The server also obtains the client's base key value K.sub.0 (for example, by retrieving K.sub.0 from the server's memory, by cryptographically deriving K.sub.0 using other secret keys or secret algorithms, by obtaining K.sub.0 from a third party such as a key server, etc.). The server also knows or obtains D. At step 310, the server validates C to reject any possible invalid values of C. At step 320, the temporary variables N, V, and K are initialized with the values of D, C, and K.sub.0, respectively. At step 330, the server checks whether the value of V is equal to zero. If so, the value of K equals the client's current secret (K.sub.C), and the process concludes at step 390. Otherwise, processing continues to step 340 where the server tests whether V equals the value 2.sup.N2 . If so, the value of K equals the client's current secret (K.sub.C), and the process concludes at step 390. Otherwise, processing continues to step 350 where the server tests whether V equals the value 2(2.sup.N2). If so, the value of K equals the client's current secret (K.sub.C), and the process concludes at step 390. Otherwise, at step 360, the server checks whether V is larger than 2.sup.N2. If not, processing continues at step 370 where V is decremented, K is updated by applying F.sub.A (i.e., KF.sub.A(K)), and N is decremented. If the test at step 360 reveals that V is larger than 2.sup.N2, processing continues to step 380, where the value 2.sup.N1 is subtracted from V, K is updated by applying F.sub.B (i.e., KF.sub.B(K)), and N is decremented. After either step 370 or step 380, processing continues at step 330. Processing continues until step 330, step 340, or step 350 indicates completion. When the process of
(24) State Transformation Operations
(25) The above discussion involved the exemplary cryptographic operations F.sub.A and F.sub.B, and their inverses F.sub.A.sup.1 and F.sub.B.sup.1, which will now be described in greater detail. A variety of such functions can be used, and the most appropriate form for these functions depends on the requirements and characteristics of the system.
(26) In the exemplary functions shown in
(27) The structure of the function F.sub.B can be essentially identical, except that different keys are used. In particular, the first DES operation 455 encrypts the right half of input 450 using key K.sub.B1, and DES operation 460 encrypts the XOR of the left half and the first DES result using key K.sub.B2. As with F.sub.A, the result left half 465 and right half 468 are combined to produce the final result 470.
(28) The function F.sub.A.sup.1 (the inverse of F.sub.A) is computed using similar functions as F.sub.A but in the opposite order. The input 475 is divided into a left half 476 and right half 477. At DES operation 478, the left half 476 is encrypted using the DES key K.sub.A2, and the result is XORed with the right half 477. The XOR result becomes the result right half 481 and is used as the input to DES operation 479 which encrypts using the key K.sub.A1. The result of the second DES operation 479 is XORed with the input left half 476 to produce the result left half 480. Finally, the result left half 480 and right half 481 are combined to produce the final result 482. The function F.sub.B.sup.1 is similar to F.sub.A.sup.1 except that the input 485 is transformed into output 490 using keys K.sub.B2 and K.sub.B1 instead of K.sub.A2 and K.sub.A1.
(29) The primary objective of the functions F.sub.A, F.sub.B, F.sub.A.sup.1, and F.sub.B.sup.1 is to destroy the usefulness of partial information about the input that might have been obtained by an attacker. For example, the DES operations used in the exemplary function F.sub.A shown in
(30) Thus partial statistical information about individual DES input bits does not provide useful statistical information about the DES output bits, provided that attackers never gain enough information to be able to guess the transformation operation entire input.
(31) Other Embodiments
(32)
(33) Other types of functions can be used for F.sub.A and F.sub.B. For example, if the input state is an odd value between 0 and 2.sup.B, F.sub.A and F.sub.B could be implemented using multiplication modulo 2.sup.B with odd constants and the inverse functions could be implemented using multiplication with the constants' inverses also mod 2.sup.B. (Of course, other operations such as multiplication with prime moduluses can also be used.) The foregoing are provided as examples only; one of ordinary skill in the art will appreciate that a wide variety of other functions exist that can be used to implement functions F.sub.A, F.sub.B, F.sub.A.sup.1, and F.sub.B.sup.1.
(34) For additional leak resistance, larger states can be used, for example a 256-bit state can be implemented by using four 64-bit blocks and using four (or more) DES operations to update the state, or by using two (or more) applications of a 128-bit hash function.
(35) In alternate embodiments, other key update processes can be used. For example, by using more than two update functions (and their inverses), each parent state can have more than 2 child states. In fact, parents can have any number of child states, although as the number of child states increases, the number of cryptographic operations involving the parent state value, and the number of states sharing the same secret key, also increase; thus potentially increasing attackers' opportunity to attack the system.
(36) The type of state updating process illustratively described with respect to
(37) In yet another an alternate embodiment, the client can cache a value at each vertical level or row. By caching higher-up values, it is not necessary to perform inverse operations, but slightly more memory is required. In such an embodiment, an average of two applications of F.sub.A or F.sub.B (which, in such an embodiment, do not need to have easy inverse functions) are required per operation if only bottom-level (single-use) states are used for transactions. A diagram of the state update processes for such an implementation would resemble a hash tree. For implementations requiring constant-time or more predictable performance, the additional processing time available during operations requiring only a single application of F.sub.A or F.sub.B can be used to precompute values that will be needed in the future, and thereby limit the execution time to two F.sub.A or F.sub.B operations per transaction.
(38) In still other embodiments, the key index used by the server can be a value other than a transaction counter, since all the server requires is information sufficient to derive the current transaction key from the root key.
(39) In some applications, C can be incremented periodically (e.g., if C is driven by a timer) or by some event other than transactions being performed. In such embodiments, if the client (or server) fails to correctly update C and derive the corresponding updated key, the transaction will fail. If the first value of C that is tried by the client (or server) fails, other likely session key values (such as those with close values of C) can be tried. (Of course, if the client and server versions of C diverge too far, the transaction will not proceed.) While the key index (e.g., C) is normally exchanged explicitly, in cases such as this the server might be able to guess or obtain C indirectly.
(40) If both the client and server need to be secured against external monitoring attacks, the transaction can be performed using the larger of the two parties' transaction counters C. In particular, the client and server can exchange counter values, and (if the counters are not equal) each device can set its counter value to equal the larger of its value and the received value. The device with the lower value updates its secret to derive the appropriate transaction key. This update can be implemented by applying a combination of the usual update functions and their inverses. (For example, referring to the technique exemplified in
(41) Finally, the actual value used for the transaction key can be the value produced from the transformation function, or a value derived from the transformation result can be used. For example, the transformation result can be encrypted or hashed to produce the session key. A hashing step can help to limit the number of operations performed with any given key and thus help to limit the amount of information about the key that can leak to attackers. Alternatively or additionally, additional hashing operations can be performed periodically during the use of the session key, or fresh session keys can be required periodically.
(42) To observe the largest possible number of transactions with a given secret key, an attacker might try to reset a target device before the device's memory can be updated with the new value of K.sub.C (e.g., during or immediately after the computation of F.sub.A or F.sub.B). However, such a reset does not necessarily mean an attack is in progress, since resets can occur during the normal operation of many systems. (For example, power can be lost if a smartcard is removed during a transaction.) Therefore, in a preferred embodiment, a failure counter stored in nonvolatile memory is updated prior to each update process. Before the update begins, the counter is tested to determine whether the number of sequential failures exceeds a maximum value and, if not, the transaction proceeds normally. Once the new value of K.sub.C has been computed and safely written to memory and C has been incremented, the failure counter is reset. The probability that the counter threshold will be exceeded during normal operation of the device (i.e., when no attack is in progress) will be small, particularly if the update process is rapid.
(43) The exemplary key update process described with regard to
(44) Other Considerations
(45) Cryptographic operations should normally be checked to ensure that incorrect computations do not compromise keys or enable other attacks. Cryptographic implementations of the techniques disclosed herein can be combined with error-detection and/or error-correction logic to ensure that cryptographic operations are performed correctly. For example, a simple and effective technique is to perform cryptographic operations twice, ideally using two independent hardware processors and implementations, with a comparator to verify that both produce identical results. If the results produced by the two units do not match, the comparator will prevent either result from being used. In situations where security is more important than reliability, the comparator can make the device self-destruct if serious errors occur. For example, the comparator can cause a self-destruct if two defective DES operations occur sequentially or if five defective DES operations occur during the lifetime of the device. In some cryptosystems, redundancy is not necessary. For example, with RSA, self-checking functions can be incorporated into the cryptosystem implementation itself or verification can be performed after the operations.
(46) Self-diagnostic functions such as a POST (power-on-self-test) should also be incorporated to verify that cryptographic functions have not been damaged. In some smartcards and other devices, the ATR (answer-to-reset) is provided before a comprehensive self-test can be completed. In such cases, the self-test can be deferred until the first transaction or until a sufficient idle period. For example, a flag indicating successful POST completion can be set upon initialization. While the card is waiting for a command from the host system, it can attempt the POST. Any I/O received during the POST will cause an interrupt, which will cancel the POST (leaving the POST-completed flag at zero). If any cryptographic function is called, the device will check the POST flag and (if it is not set) perform the POST first.
CONCLUSIONS
(47) This patent encompasses a family of related techniques that enable the construction of devices that are significantly more resistant to attack than devices of similar cost and complexity that do not use the techniques disclosed herein. In addition, multiple security techniques might be required to make a system secure; and leak resistance can be used in conjunction with other security methods or countermeasures.
(48) As those skilled in the art will appreciate, the techniques described above are not limited to particular host environments or form factors. Rather, they can be used in a wide variety of applications, including without limitation: cryptographic smartcards of all kinds including without limitation smartcards substantially compliant with ISO 7816-1, ISO 7816-2, and ISO 7816-3 (ISO 7816-compliant smartcards); contactless and proximity-based smartcards and cryptographic tokens; stored value cards and systems; cryptographically secured credit and debit cards; customer loyalty cards and systems; cryptographically authenticated credit cards; cryptographic accelerators; gambling and wagering systems; secure cryptographic chips; tamper-resistant microprocessors; software programs (including without limitation programs for use on personal computers, servers, etc. and programs that can be loaded onto or embedded within cryptographic devices); key management devices; banking key management systems; secure web servers; electronic payment systems; micropayment systems and meters; prepaid telephone cards; cryptographic identification cards and other identity verification systems; systems for electronic funds transfer; automatic teller machines; point of sale terminals; certificate issuance systems; electronic badges; door entry systems; physical locks of all kinds using cryptographic keys; systems for decrypting television signals (including without limitation, broadcast television, satellite television, and cable television); systems for decrypting enciphered music and other audio content (including music distributed over computer networks); systems for protecting video signals of all kinds; intellectual property protection and copy protection systems (such as those used to prevent unauthorized copying or use of movies, audio content, computer programs, video games, images, text, databases, etc.); cellular telephone scrambling and authentication systems (including telephone authentication smartcards); secure telephones (including key storage devices for such telephones); cryptographic PCMCIA cards; portable cryptographic tokens; and cryptographic data auditing systems.
(49) All of the foregoing illustrates exemplary embodiments and applications from which related variations, enhancements and modifications will be apparent without departing from the spirit and scope of those particular techniques disclosed herein. Therefore, the invention(s) should not be limited to the foregoing disclosure, but rather construed by the claims appended hereto.