METHODS FOR GENERATION AND USE OF PRIVATE CRYPTOGRAPHIC KEYS FOR RSA-CRT OR VARIANTS OF RSA-CRT
The RSA-CRT key generation method addresses large key sizes and fault injection vulnerabilities by integrating the public exponent into the key structure, reducing memory requirements and enhancing security.
Patent Information
- Application Number
- FR2013062483
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2013-03-29
- Filing Date
- 2013-12-12
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2033-12-12
AI Technical Summary
Existing RSA-CRT cryptographic processes face challenges with large key sizes, lengthy generation times, and vulnerability to fault injection attacks, particularly in devices with limited memory resources.
A method for generating private cryptographic keys for RSA-CRT that includes instantiating a public exponent as a component of the key, reducing key size by eliminating unnecessary components, and incorporating fault detection mechanisms.
The method reduces key size, accelerates generation and transmission, and enhances security against fault injection attacks, while maintaining cryptographic integrity.
Smart Images

Figure 00000026_0000 
Figure 00000027_0000 
Figure 00000028_0000
Abstract
Description
Methods for generating and using private cryptographic keys for RSA-CRT or RSA-CRT variants 1. _ FIELD OF THE INVENTION The field of invention is that of cryptography. More specifically, the invention relates to a technique applicable to cryptographic protocols using the RSA (for "Rivest Shamir Adleman") cryptographic method, or any generalization thereof, and which is based on the Chinese remainder theorem (commonly called RSA-CRT, for "RSA Chinese Remainder Theorem" in English). The invention has numerous applications, such as for example in electronic devices, where the constraints in terms of memory size used and execution time of cryptographic methods are particularly important, which implement such a cryptographic method to secure communications and / or data exchanges (signature, etc.). 2. __ __TECHNOLOGICAL BACKGROUND In the remainder of this document, we will focus more particularly on describing the problems existing with regard to the use of the RSA-CRT cryptographic method, which the inventor of the present patent application was confronted with. The invention is of course not limited to this particular field of application, but is of interest for any variant of the RSA-CRT cryptographic method (as presented for example in the document "Fast Variants of RSA" by D. Boneh et al). The RSA cryptographic method is an asymmetric cryptographic method well known to those skilled in the art, which can be used in multiple applications (signing digital data, encrypting digital data, as part of authentication, etc.). For example, the document “Handbook of Applied Cryptography” by A. Menezes et al., published by the publisher CRC Press, discloses, in chapter 8 (entitled “Public-Key Encryption”) and in chapter 11 (entitled “Digital Signatures”) such applications of the RSA cryptographic method. In order to speed up the execution time of the RSA cryptographic process, it is well known to use the Chinese Remainder Theorem to achieve this end (the process terminology is then used cryptographic RSA-CRT). Thus, the execution time of the RSA-CRT cryptographic method is four times faster than the RSA cryptographic method. More precisely, in chapter 14 (entitled "Efficient Implementation") of the document cited above, the Garner algorithm is presented, which details a way of carrying out a recombination step applicable to RSA-CRT. The person skilled in the art can also, instead of using the Garner algorithm, use the Gauss algorithm, presented for example in chapter 2 (entitled "Mathematical Background", see the algorithm referenced 2.121) of the document mentioned above. Hardware implementations of the RSA-CRT cryptographic method, as proposed in the paper: "The Chinese Remainder Theorem and its Application in a High-Speed RSA Crypto Chip" by Johann GroBschädl, allow increasing the execution speed of such a method. It should be noted that, in order to use the RSA-CRT cryptographic method (via a hardware implementation or via the execution on hardware of a computer program product), an electronic device must obtain the following confidential (i.e. non-public) elements: - a prime number p; - a prime number q; - a number d, = d mod p-1 where d corresponds to a private exponent (i.e. secret) in the RSA cryptographic process (with d = e* mod (p-1)(q-1)) where e is a public exponent); -a number d, =d mod q-1; and ; 1 - a number to = q” mod p. Thus, in the state of the art, a private (i.e. secret) cryptographic key for an RSA-CRT cryptographic process corresponds to the following 5 elements: (p,q, dp, de ia). This formalism is found in several standards including the Javacard 2.2.2 standard (see the definition of the “RSAPrivateCrtKey” interface). Conversely, a private cryptographic key for a classic RSA cryptographic process is defined by the following 2 elements: (N, d) with the number N corresponding to the products of the prime numbers p and g. The public cryptographic key (whether for the classic RSA cryptographic process or for the RSA-CRT cryptographic process) is defined by the following 2 elements: (N, e). Thus, an electronic device which comprises means for generating cryptographic keys for use in an RSA-CRT cryptographic process must make it possible to obtain the following quintet (p,g,d,, of fa) The step of searching for prime numbers (i.e. the numbers p and q) corresponds to the step requiring the most expensive operations (from an execution time point of view) in a step of generating a private cryptographic key with a view to using an RSA-CRT cryptographic method. However, the steps of determining the numbers d, da, and i, also constitute steps that require many resources (in memory and in computing time), due to the realization of a modular inversion operation. A disadvantage of defining such a private cryptographic key for use in an RSA-CRT cryptographic method is that the size (in number of bits) of this quintet is relatively large, and therefore the device must include a relatively large memory (in the case where a large quantity of private cryptographic keys for use in an RSA-CRT cryptographic method are stored), which is not feasible when using electronic devices with few memory resources. Another disadvantage is that generating such a private cryptographic key for using an RSA-CRT cryptographic method is relatively time-consuming. Furthermore, in the case where, via a secure channel (or during a personalization step), a private cryptographic key for the use of an RSA-CRT cryptographic method is transmitted to an electronic device, due to the size in number of bits of such a key, such a step of receiving a key can be relatively long. Furthermore, it should be noted that when an electronic device executes an RSA-CRT cryptographic process, fault injection attacks can be performed by an attacker on such a device. Therefore, since the public exponent e is not always known by the device (especially in the context of JavaCard applications), it is necessary to incorporate into the implementation of an RSA-CRT cryptographic process numerous countermeasures which de facto slow down the execution of the RSA-CRT cryptographic process. Several countermeasures exist in the state of the art, such as that consisting, for example, of recalculating the corresponding public exponent e from the elements of a private cryptographic key for the use of an RSA-CRT cryptographic process (see the document "Fault Resistant RSA Signatures: Chinese Remaindering in Both Directions" by A. Boscher et al., published on the IACR website, and more precisely algorithm 2 entitled "Compute the RSA public exponent from a CRT RSA private key"). The present technique corresponds to a technique for generating private cryptographic keys for use with an RSA-CRT cryptographic method, which is faster than prior art techniques, and which requires only few modifications for use in an electronic device. Furthermore, the present technique makes it possible to secure an RSA-CRT cryptographic method against fault injection attacks in an efficient and less costly manner than the known prior art techniques. 3,— DISCLOSURE OF THE INVENTION In a particular embodiment of the invention, a method is proposed for generating, implemented by an electronic device, a private key intended to be used in a cryptographic method of the RSA-CRT type, from a public exponent e corresponding to a strictly positive integer, said private key comprising a plurality of components stored in a memory of said electronic device. Such a generation method is remarkable in that it comprises a step of instantiating a first component of said private key to said public exponent e. According to a particular characteristic, each binary representation of the other components of said plurality of components is without predetermined data block of successive t-bits, with t>2 bits. It should be noted that this approach, consisting of introducing the public exponent into a private key, is quite inventive, because it goes against the prejudices of the person skilled in the art, since as its terminology makes explicit, the exponent is public, and that the person skilled in the art is not encouraged to introduce it in this way into a private key. Thus, in this way, the public exponent e being always present / referenced in such a generated private key, it is not necessary to carry out complex operations to implement in order to use it in a cryptographic processing method. Furthermore, such a technique for generating a private key does not reduce the security of the obtained key, since each binary representation of the other components of the plurality of components of the private key is without a predetermined data block of successive t-bits, with t>2 bits (unlike key generation techniques comprising portions or blocks of predetermined data as described for example in document US 6,496,929). According to a first variant, such a generation method is remarkable in that it further comprises: - a step of instantiating a second component of said private key to a first prime number p; - a step of instantiating a third component of said private key to a second prime number q; - a step of instantiating a fourth component of said private key to a first private exponent d, = d mod p-1 = e* mod p-1 where d corresponds to a private exponent in an RSA cryptographic method verifying an equation d = e* mod (p-1)(q- 1), where e is said public exponent; and - a step of instantiating a fifth component of said private key to a second private exponent da = d mod g-1 = e* mod q-1. Thus, according to such an embodiment, such a private key comprises the following quintuplet: (e, p, à, de, da). According to a second variant, such a generation method further comprises: - a step of instantiating a second component of said private key to a first prime number p; - a step of instantiating a third component of said private key to a second prime number q; - a step of instantiating a fourth component of said private key to a private exponent d verifying an equation d = e* mod (p-1)(q-1), where e is said public exponent. Thus, according to such an embodiment, such a private key comprises the following triplet: (e, p, q, d). Thus, to find the elements d, and d,, it will be necessary to carry out modular reduction operations. According to a third variant, such a generation method further comprises: - a step of instantiating a second component of said private key to a first prime number p; - a step of instantiating a third component of said private key to a modulus being a product of said first prime number p with another prime number q; - a step of instantiating a fourth component of said private key to a private exponent d verifying an equation d = e* mod (p-1)(q-1), where e is said public exponent. Thus, such a private key consists of the following triplet: (e, p, N, d). It is then possible to obtain the other prime number q by performing a division of the public modulus N by the prime number p. Once such a prime number q is determined, it is possible to find the elements d, and da, by performing modular reduction operations via each of the prime numbers p and g. According to a particular characteristic, the generation method is remarkable in that said private key comprises only the components mentioned. Thus, when the private key corresponds exactly to the following quintuplet: (e, p, 4, dp, de), the present technique consists of replacing the number i, = d* mod p (or the number ji, = p* mod q according to the standards) in a "standard" private key by the corresponding public exponent e, with a view to using an RSA-CRT cryptographic method. Thus, the absence of the number a, = q! mod p does not constitute an obstacle to an implementation of the RSA-CRT cryptographic method. As described later, it is not necessary to explicitly determine such a number when of the execution of the RSA-CRT cryptographic method, unlike the prior art techniques (see for example document US 6,959,091, document EP 2466783, document US 2012 / 0263296 and document US 7,340,606 in which it is always necessary to explicitly determine the number at = q* mod p (or the number i, = p* mod q). Furthermore in the identified prior art techniques, the public exponent e is not considered as an integral part of the private key. Thus, such an exponent may not always be within an electronic device. Thus, the private keys generated according to the present technique for use of an RSA-CRT cryptographic method have a format allowing the number of parameters to be kept in the call interfaces (in computer program products) of a function corresponding to the RSA-CRT cryptographic method, in accordance with the various existing standards (such as the JavaCard 2.2.2 standard for example). However, because the public exponent e, which replaces the number à = qd mod p has a size (in number of bits) generally much smaller than that of the number i, the electronic device needs fewer memory resources to store such a key. In addition, the transmission and / or reception by an electronic device of such private keys is done more quickly, because there are fewer bits to transmit or emit. According to a particular characteristic, such a generation method is remarkable in that it further comprises a step of determining at least one of said prime numbers. In another embodiment of the invention, a cryptographic processing method of the RSA-CRT type is proposed, implemented by an electronic device, and applied to a message m. Such a method is remarkable in that it comprises: - a step of obtaining a private key comprising a component corresponding to a public exponent e; - a step of determining at least two numbers v; and vz which are defined by the following equations: v; = (g°.m)*(d,-1).mq°" mod p and v2 = (p°.m)*(da-1).mp°? mod a, where the numbers g and p are prime numbers obtained from at least one component of said private key, and - a step of combining said at least two numbers v; and v; delivering a result conforming to a cryptographic processing of the RSA-CRT type. Thus, the present technique makes it possible to dispense with the explicit determination of at least one number at = q* mod p (or at least one number i, = p* mod q) when carrying out a cryptographic processing method of the RSA-CRT type, or a variant of RSA-CRT. Indeed, by noting that the following relations are verified: V1 = (g°.m)(d,-1).mq°? mod p = m{d).g" mod p and v2 = (p°.m)A{da-1).mp°? mod q = m”{de).p" mod p , it is possible, starting from Gaussian recombination for example, to obtain the expected result, and this, without having to explicitly determine at least one number to = q* mod p (or at least one number i, = p°* mod q). Only the parameters (e, p, q, d,, de) are necessary to achieve this. Thus, any private key allowing the determination of these parameters can be used when executing a cryptographic processing method of the RSA-CRT type, or a variant of RSA-CRT. According to a particular characteristic, such a cryptographic processing method is remarkable in that said step of combining said at least two numbers v; and v; comprises a step of determining a number S = pv, + qv2 mod N, where N corresponds to the product of said two prime numbers p and g. According to a particular characteristic, such a cryptographic processing method is remarkable in that it comprises a step of detecting a fault injection attack based on a combination of said result, said public exponent e and said message m. According to a particular characteristic, such a cryptographic processing method is remarkable in that said detection step comprises: - a step of determining a modular exponentiation of said result to a power equal to said public exponent, said determination step delivering a number m': - a step of comparing said number m' and said message m, said comparison step providing significant information on the detection of a fault injection attack in the event of a difference between said number m° and said message m. According to a particular characteristic, such a cryptographic processing method is remarkable in that said private key comprising a component corresponding to a public exponent e is generated according to the previously mentioned generation method. According to a particular characteristic, said prime number p and said prime number q are respectively replaced, prior to the exponentiation steps, by a number p' and a number a' such that: q'=agrmodp; p'=p.rmodag;and rest is different from O0 mod p and r is different from 0 mod a. According to the invention, said method further comprises, after said step of combining said at least two numbers v; and vz, a step of multiplying said result in accordance with a cryptographic processing of the RSA-CRT type by said number r, delivering a signature of said message m. In another embodiment of the invention, there is provided a computer program product which comprises program code instructions for implementing the aforementioned method (in any of its various embodiments), when said program is executed on a computer. In another embodiment of the invention, there is provided a computer program product which comprises program code instructions for implementing the aforementioned method (in any of its various embodiments), when said program is executed on a computer. In another embodiment of the invention, an electronic component is proposed comprising means suitable for implementing the aforementioned method (in any one of its different embodiments). More specifically, according to a preferred implementation, the different steps of the method according to the invention are implemented by software or computer program, this software comprising software instructions intended to be executed by a data processor of a relay module according to the invention and being designed to control the execution of the different steps of this method. Consequently, the invention also relates to a program, capable of being executed by a computer or by a data processor, this program comprising instructions for controlling the execution of the steps of a method as mentioned above. This program may use any programming language, and may be in the form of source code, object code, or code intermediate between source code and object code, such as in a partially compiled form, or in any other desirable form. The invention also relates to an information medium readable by a data processor, and comprising instructions of a program as mentioned above. The information carrier may be any entity or device capable of storing the program. For example, the carrier may include a storage medium, such as a ROM, for example a CD ROM or a microelectronic circuit ROM, or a magnetic recording medium, for example a floppy disk or a hard disk. On the other hand, the information carrier may be a transmissible carrier such as an electrical or optical signal, which may be conveyed via an electrical or optical cable, by radio or by other means. The program according to the invention may in particular be downloaded from a network such as the Internet. Alternatively, the information carrier may be an integrated circuit in which the program is incorporated, the circuit being adapted to perform or to be used in the performance of the method in question. According to one embodiment, the invention is implemented by means of software and / or hardware components. In this regard, the term "module" may correspond in this document to a software component, a hardware component or a set of hardware and software components. A software component corresponds to one or more computer programs, one or more sub-programs of a program, or more generally to any element of a program or software capable of implementing a function or a set of functions, as described below for the module concerned. Such a software component is executed by a data processor of a physical entity (terminal, server, etc.) and is likely to access the hardware resources of this physical entity (memories, recording media, communication buses, electronic input / output cards, user interfaces, etc.). Similarly, a hardware component is any element of a hardware assembly capable of implementing a function or set of functions, as described below for the module concerned. It may be a programmable hardware component or one with an integrated processor for running software, for example an integrated circuit, a smart card, a memory card, an electronic card for running firmware, a secure element used in the context of near field communication, etc. In another embodiment of the invention, there is provided a non-transitory, computer-readable storage medium storing a computer program comprising a set of computer-executable instructions for implementing the above-mentioned method (in any of its various embodiments). In a variant of the invention, an electronic device is proposed for generating a private key intended to be used in a cryptographic method of the RSA-CRT type, from a public exponent @ corresponding to a strictly positive integer, said private key comprising a plurality of components stored in a memory of said electronic device. Such a device being remarkable in that it comprises means for instantiating a first component of said private key to said public exponent e. According to a particular characteristic, such a device makes it possible to generate a private key for which each binary representation of the other components of said plurality of components is without a predetermined data block of successive t-bits, with t>2 bits. In another variant of the invention, an electronic device is proposed capable of carrying out cryptographic processing of the RSA-CRT type, applied to a message m. Such an electronic device is remarkable in that it comprises: - means of obtaining a private key comprising a component corresponding to a public exponent e; - means for determining at least two numbers v; and vz which are defined by the following equations: v; = (q°.m)*{d,-1).mq°? mod p and v2 = (p°.m)*(de-1).mp*? mod q, where the numbers q and p are prime numbers obtained from at least one component of said private key, and - means for combining said at least two numbers v; and vz delivering a result conforming to a cryptographic processing of the RSA-CRT type. 4.__ __ LIST OF FIGURES Other characteristics and advantages of the invention will appear on reading the following description, given as an indicative and non-limiting example, and the appended drawings, in which: Figure 1 shows a flowchart of a particular embodiment of a generation method according to the invention, implemented by a device electronic; Figure 2 shows a flowchart of a particular embodiment of a signature process via cryptographic processing of the RSA-CRT type according to the invention, implemented by an electronic device; Figure 3(a) schematically represents an electronic device allowing data processing to be carried out in which the present invention is implemented; Figure 3(b) shows a microcircuit card which is an example of electronic device for processing data according to the invention as shown in Figure 3(a). 5. _ _ DETAILED DESCRIPTION In all figures of this document, identical elements and steps are designated by the same numerical reference. Figure 1 shows a flowchart of a particular embodiment of a generation method according to the invention, implemented by an electronic device. More specifically, such a method of generating a private key according to the invention allows an electronic device, following the obtaining of a public exponent € (parameter which is either itself generated or imposed as is the case in many standards (such as for example the EMV standard (acronym for "Europay, MasterCard and Visa") which stipulates that the public exponent e must be equal to one of the following values: 3, 17 or 21541}, during an obtaining step referenced 101, to generate the other components of the private key according to the invention. It should be noted that, according to the present invention, the public exponent e is an integral part of the generated private key (i.e. the public exponent € is a component of the generated private key). As mentioned previously, this approach is in itself new and inventive. Furthermore, the obtaining step 101 comprises a step of instantiating a first component of a private key to said public exponent e. Such an instantiation step consists of writing, in a memory area of the electronic device, the value of the public exponent e.Thus, this memory area stores a first component of the private key being generated. Subsequently, and generically, an instantiation step consists of writing, in a memory area of the electronic device, a value of interest to be stored. Thus, following the execution of the obtaining step 101, the electronic device obtains a first prime number p (either via a generation step carried out by the device itself, or via a reading of such a parameter in a particular memory area already referenced) during a step referenced 102. The size of such a prime number p is determined according to the value of a configuration parameter stored on the electronic device. Furthermore, the obtaining step 102 comprises a step of instantiating a second component of the private key at the value of the prime number p. Likewise, the electronic device obtains a second prime number q (either via a generation step carried out by the device itself, or via a reading of such a parameter in a particular memory area already referenced) during a step referenced 103. Furthermore, the obtaining step 103 comprises a step of instantiating a third component of the private key to the value of the prime number g. Then, the electronic device, during a step referenced 104, obtains a first private exponent d,: either by determining the following value: d mod p-1 where d corresponds to a private exponent in an RSA cryptographic process determined via the determination of €* mod (p-1){q-1), where e is said public exponent (or via the reading the parameter d in a particular memory area already referenced); either by determining the value of e* mod p-1 (or via reading the parameter d, in a particular memory area already referenced). Further, step 104 includes a step of instantiating a fourth component of the private key to the value of the first private exponent d, . Then, the electronic device, during a step referenced 105, obtains a second private exponent d,: either by determining the following value: d mod g-1 where d corresponds to a private exponent in an RSA cryptographic process determined via the determination of e* mod (p-1){q-1), where e is said public exponent (or via the reading the parameter d in a particular memory area already referenced); either by determining the value of e* mod g-1 (or via reading the parameter of in a particular memory area already referenced). Further, step 105 includes a step of instantiating a fifth component of the private key to the value of the second private exponent of . Thus, after the execution of steps 101 to 105, the electronic device, according to an embodiment of the invention, stores the generated private key which comprises the following 5 elements: (e, P, q, dp, da). Thus, the generated private key has been instantiated and is ready to be used when carrying out cryptographic processing, or for manipulation of such a key (transfer, etc.) within the electronic device. Thus, according to one embodiment of the invention, the generation method according to the present invention may consist of converting a private key comprising the following components (p,q,d,,de i3) WHERE (p,9,de,da i5) into the following private key: (e,p,q,d,,da) which has a size (in number of bits) smaller than that of the private keys unconverted. The generation process therefore makes it easier to manage the memory of the electronic device (private keys being smaller). Figure 2 shows a flowchart of a particular embodiment of a signature method via cryptographic processing of the RSA-CRT type according to the invention, implemented by an electronic device. In a step referenced 201, the electronic device performs a step of obtaining a message m to be signed and a private cryptographic key for the RSA-CRT or the variants of the RSA-CRT having been generated for example, via the generation method described in connection with FIG. 1. Thus, in one embodiment of the invention, the electronic device reads from a memory area the components of a private cryptographic key comprising the following 5 elements: (e, p, q, dp, da). According to one variant, the components of a private cryptographic key correspond to the following 4 elements: (e, p, q, d). According to another variant, the components of a private cryptographic key correspond to the following 4 elements: (e, N, q, d) or (e, N, p, d) with N corresponding to the number pq. The structure of the private cryptographic keys according to the variants mentioned, however, makes it possible to determine the other missing components compared to the structure of a private cryptographic key comprising the following 5 elements: (e, p, q, dp, da). Then in order to obtain a signature of the message m via an cryptographic processing of the RSA-CRT type according to the invention, the electronic device executes a first exponentiation step referenced 202 and a second exponentiation step referenced 203. More specifically, the first step of exponentiation 202 includes: a first step of determining a number q; = m. q°* mod p; a second step of determining a number q2 = q,. g“ mod p; an exponentiation step via the use of the first private exponent consisting of determining the following number v; = q2*(d,-1).q; Mod p. |l is suitable to note that ii if the following relation is then verified v; = (g°.m)"(d;-1).mq°* mod p= (m)A{d,).a°" mod p, and this, without having to explicitly determine the value of q“ mod p. Generally speaking, the first step of exponentiation 202 aims to determine the value of v; = {a*.m}"{a,-1).mq°? mod p. Thus, it is possible to envisage an embodiment in which a number c; = (g°.m)*{d,-1), then we determine the number c: .mq°* mod p, which is equal to the number v,. Similarly, the second exponentiation step 203 includes: a first step of determining a number p, = m. p°* mod q; a second step of determining a number p» = p,. p* mod q; an exponentiation step via the use of the first private exponent consisting of determining the following number v2 = (p2)*{da-1).p; Mod q. It is appropriate to note that it has been verified that the following relation is then verified vz = (p*.m)M{de-1).mp°* mod q= (m)A{da).p mod q, and this, without having to explicitly determine the value of p mod g. Generally speaking, the second step of exponentiation 203 aims to determine the value of v2 = (p*.m)M(da-1).mp°? mod q, and this whatever either the ordering of modular operations that we choose for achieve such a goal. Thus, following the execution of steps 202 and 203, the electronic device has, in a memory zone, the two numbers v; and vz. In order to obtain the signature of the message, it is then necessary to carry out a recombination step referenced 204. More precisely, the recombination step 204 comprises a step of determining the number S = pv; + q.vz mod N, where N corresponds to the product of said two prime numbers p and g. The number S thus obtained is identical (if no fault injection attack has been carried out) to the resultant from a cryptographic processing of the “classic” RSA-CRT type. Thus, the number S corresponds to the signature of the message m. This method offers several advantages over the classic method: we propose a new implementation of RSA-CRT which takes as input (p; Q; dp / da; e) instead of (p; to; dp; of fa); key generation is faster than that resulting from the execution of the traditional algorithms: in fact, in the proposed method it is not necessary to perform the operation at = q* mod p. Moreover, as the exponent public is always provided as an input parameter to key generation, we do not implement any additional calculation to obtain this fifth input value; the RSA-CRT key obtained by applying the method of the invention is in generally shorter than the key obtained with traditional methods since it is only necessary to record e in place of i,. In 2048 bits, we gain 253 bytes when e=2°°+1; the adaptation of hardware architectures (notably JavaCard) is relatively simple; Furthermore, because the public exponent e is a component of the private cryptographic key obtained during step 201, it is then possible to verify whether a fault injection attack has not been carried out during steps 202 to 204. To do this, the electronic device implements, during a step of detecting a fault injection attack referenced 205, which comprises: an exponentiation step including the determination of the number m' next :m'=*modN:et a step of comparing the number m' with the message m, which provides significant information on the detection of a fault injection attack in the event of a difference between said number m' and said message m. Performing step 205 may be optional if other countermeasures against fault injection attacks are already implemented by the electronic device. Figure 3({a) schematically represents an electronic device for carrying out data processing in which the present invention is implemented. This device 340 comprises a microprocessor 310, with which is associated on the one hand a random access memory 360, for example by means of a bus 370, and on the other hand a non-volatile memory 320 (for example of the EEPROM type), for example through a bus 350. The data processing device 340, and specifically the microprocessor 310 which it incorporates, can exchange data with external devices by means of a communication interface 330. 3(a) schematically represents the transmission of an input data item X received from an external device (not shown) and transmitted from the communication interface 330 to the microprocessor 310. Similarly, the transmission of an output data item Y from the microprocessor 310 to the communication interface 330 intended for an external device is represented. This output data item Y results from data processing by the microprocessor 310, generally on the data item or a part of the input data item X using a secret data item 380 internal to the system. The data processing thus carried out may comprise an execution of the comparison method according to the present invention. The input data X are for example APDU commands, and the output data Y can be APDU responses, which may include encrypted data, a signature, a random number, etc. resulting from the aforementioned data processing. Although, for illustration, the input data and output data are shown on two different arrows, the physical means that enable communication between the microprocessor 310 and the interface 330 may be achieved by unique means, for example, a serial communication port or a bus. The microprocessor 310 is capable of executing software (or computer program) which allows the electronic device to execute a method according to the invention with regard to figures 1 and 2. This method is for example executed by the electronic device on receipt of the input data X. The data of the method according to the invention can be obtained from the input data. The output data are for example obtained from the result of the method according to the invention (for example transmission of the validation of the parameter domain received (included in the input data X). The software is composed of a series of control instructions of the microprocessor 310 which are for example stored in the memory 320. In a variant, the microprocessor 310 - non-volatile memory 320 - RAM 360 assembly can be replaced by a specific application circuit which then comprises means for implementing the different steps of the data processing method. More generally, the processing device is an integrated circuit. Figure 3(b) shows a microcircuit card which constitutes an example of a data processing device according to the invention as shown in Figure 3(a). The communication interface 330 is in this case produced by means of the contacts of the microcircuit card or by an antenna housed in the card body. The microcircuit card incorporates a microprocessor 310, a random access memory 360 and a non-volatile memory 320 as shown in Figure 3(a). This microcircuit card, for example, complies with the ISO 7816 standard and is equipped with a secure microcontroller which combines the 320 microprocessor (or CPU) and the 360 RAM. Input data X are for example APDU commands, and output data Y are APDU responses. In a variant, the data processing device may be a USB key, a document or a paper information medium comprising in one of its sheets a microcircuit associated with contactless communication means. || it is preferably a portable or pocket electronic entity. For example, the device is secure. For example, the device includes means capable of protecting it against attacks aimed at fraudulently obtaining the secret data it stores (for example, a cryptographic key) such as fault attacks and / or side channel attacks. In particular, the device complies with the FIPS standard or the Common Criteria. Furthermore, the principle of the proposed method can also be implemented to achieve message hiding. In fact, the method previously presented is based on the following relationship: (g€ -mm)de=1 year q°77 = ane <q 7} mod p - m)de="1" (2) la signature s="p-51ga" n d’un message m peut être obtenue en utilisant une recombinaison gaussienne telle que : 54 +9'1g +5, mod n' (3) dans laquelle s,="m*" p, 5,="m*" q, ip="p7!" q and à,="4!" on noter l'expression précédente est équivalente à l’expression suivante (ip + sg #) (14 * sp p) (4) à partir des expressions et précédentes, on également calculer la relation +q- 51,="(q°" (5) -m-g°7? p. si,="(pe" -m)de-1.m p°7? comme l’homme du métier immédiatement le constater, s1,="m®.r"*.47*" sont respectivement les mêmes valeurs v1 v2 préalablement décrites. il possible d'utiliser pour réaliser un masquage de message. note effet lorsque l’on remplace valeur par q.r où r différent o 0 g, obtient 1 (6). en même modification s1',, (i.e. remplacer p.r q) aléatoire (avec (5}} qui égale s'="r!.5" (7) le démasquage fait simplement multipliant s’ 5 n. plus particulièrement, dispositif électronique exécute première étape d’exponentiation référencée 202 deuxième 203 puis 204 telles décrites préalablement. cependant, plutot travailler, nombres premiers étapes précédées calcul g’="a.r" p’ a. les q1 q2, d'exponentiation calculées q° plutôt p1 p2, selon mode réalisation particulier, taille comprise entre log(n) 2 log(n). cette technique présente avantages. effet, comparativement aux méthodes arithmétiques traditionnelles (ie. m — kap, k1 étant nombre 32 bit, exemple), || n’est pas nécessaire développer module>k2p, k2 being a 32-bit random number, for example). Exponentiations will therefore be faster because we are working with a small operand length. Such an improvement could be very significant in some cases, especially with a coprocessor having 128-bit addressing. In some cases, this method can be twice as fast. Compared to other multiplicative masking methods, it is not necessary to calculate the inverse of the multiplicative mask r because such a calculation is performed "for free" during the exponentiations.< / q>
Claims
CLAIMS pr Method of generating, implemented by an electronic device, a private key intended to be used in a cryptographic process of the RSA-CRT type, from of a public exponent € corresponding to a strictly positive integer, said private key comprising a plurality of components stored in a memory of said electronic device, said generation method being characterized in that it comprises a step of instantiating a first component of said private key audit public exponent e, and in that each binary representation of the others components of said plurality of components is without data block predetermined successive t-bits, with t>2 bits. 2 Generation method according to claim 1, characterized in that the method of generation further includes: a step of instantiating a second component of said private key to a first prime number p ; a step of instantiating a third component of said private key to a second prime number q; a step of instantiating a fourth component of said private key to a first private exponent d, = d mod p-1 = e* mod p-1 where d corresponds to an exponent private in an RSA cryptographic process verifying an equation d = e* mod (p- 1)(g-1), where e is said public exponent; and a step of instantiating a fifth component of said private key to a second private exponent dy = d mod g-1 = e* mod q-1. 3 Generation method according to claim 1, characterized in that the method of generation further includes: a step of instantiating a second component of said private key to a first prime number p ; a step of instantiating a third component of said private key to a second prime number q:; a step of instantiating a fourth component of said private key to a private exponent d verifying an equation d = e* mod (p-1){g-1), where e is said exponent audience. 4 Generation method according to claim 1, characterized in that the method of generation further includes: a step of instantiating a second component of said private key to a first prime number p ; a step of instantiating a third component of said private key to a modulus being a product of said first prime number p with another number first q; a step of instantiating a fourth component of said private key to a private exponent d verifying an equation d = e* mod (p-1){a-1), where e is said exponent audience.
5. Generation method according to any one of claims 2 to 4, characterized in that said private key comprises only the components mentioned.
6. Generation method according to any one of claims 2 to 5, characterized in that it further comprises a step of determining at least one of said prime numbers.
7. Cryptographic processing method of the RSA-CRT type, implemented by a electronic device, and applied to a message m, said method being characterized in that it includes: a step of obtaining a private key comprising a corresponding component to a public exhibitor; a step of determining at least two numbers v; and vz which are defined by the following equations: v; = (g°.m)"{d,-1).mq°* mod p and v2 = (p°.m)"(dg-1).mp°” mod g, where the numbers q and p are prime numbers obtained from at least one component of said private key, and a step of combining said at least two numbers v; and v, delivering a result in accordance with a cryptographic processing of the RSA-CRT type.
8. Cryptographic processing method according to claim 7, characterized in that that said step of combining said at least two numbers v; and v, comprises a step of determining a number S = pv; + qv> mod N, where N corresponds to the product of the said two prime numbers p and a. 9 Cryptographic processing method according to any one of claims 7 and 8, characterized in that it comprises a step of detecting an attack by fault injection based on a combination of said result, said exponent public e and said message m.
10. Cryptographic processing method according to claim 9, characterized in that that said detection step comprises: a step of determining a modular exponentiation of said result to a power equal to said public exponent, said determination step delivering a number m'; a step of comparing said number m' and said message m, said step of comparison providing significant information on the detection of an attack by injection of faults in the event of a difference between said number m° and said message m.
11. Cryptographic processing method according to any one of claims 7 to 10, characterized in that said private key comprising a component corresponding to a public exponent e is generated according to a generation process according to any one of claims 1 to 6.
12. Cryptographic processing method according to any one of claims 7 to 11, characterized in that said prime number p and said prime number q are respectively replaced, prior to the exponentiation steps, by a number p' and a number a' such that: g'=armodp; p'=p.rmodag;and rest is different from O0 mod p and r is different from 0 mod a.
13. …— Cryptographic processing method according to claim 12, characterized in that that it includes, after said step of combining said at least two numbers v; and v,, a step of multiplying said result in accordance with a cryptographic processing of the RSA-CRT type by said number r, delivering a signature of the said message m.
14. Computer program product, comprising code instructions program for implementing the process according to at least one of the claims 1 to 6 and / or the method according to at least one of claims 7 to 13, when said program is executed on a computer.
15. A computer-readable, non-transitory storage medium storing a program computer system comprising a set of instructions executable by a computer or a processor for implementing the method according to at least one of the claims 1 to 6 and / or the method according to at least one of claims 7 to 13.
16. Electronic device for generating a private key for use in a cryptographic process of the RSA-CRT type, from a public exponent e corresponding to a strictly positive integer, said private key comprising a plurality of components stored in a memory of said device electronic, said device being characterized in that it comprises means instantiation of a first component of said private key to said public exponent e, and that each binary representation of the other components of said plurality of components is without predetermined data block of t-bits successive, with t>2 bits.
17. — Electronic device capable of carrying out cryptographic processing of the RSA type- CRT, applied to a message m, said electronic device being characterized in that that it includes: means of obtaining a private certificate including a component corresponding to a public exponent e; means for determining at least two numbers v; and vz which are defined by the following equations: v; = (g°.m)"{d,-1).mq°* mod p and v2 = (p°.m)"{da-1).mp°* mod q, where the numbers q and p are prime numbers obtained from at least a component of said private key, and means for combining said at least two numbers v;, and v, delivering a result consistent with RSA-CRT type cryptographic processing.
