US 20040059767 A1 Abstract A method and a circuit for masking digital data handled by an algorithm and factorized by a residue number system based on a finite base of numbers or polynomials prime to one another, comprising making the factorization base variable.
Claims(11) 1. A method for masking digital data handled by an algorithm and factorized by a residue number system based on a finite base of numbers or polynomials prime to one another, comprising making the factorization base variable. 2. The method of 3. The method of 4. The method of 5. The method of 6. The method of 7. The method of 8. The method of 9. A circuit of algorithmic processing of data factorized by a residue number system based on a finite base of numbers or polynomials prime to one another, comprised of a circuit of selection or generation and of temporary storage of said base. 10. The circuit of 11. The circuit of Description [0001] 1. Field of the Invention [0002] The present invention relates to algorithmic processings performed on digital data handled by a microprocessor or an integrated circuit. The present invention more specifically relates to processings performed on digital data in cryptographic cyphering or authentication applications implementing so-called secured algorithms. In such applications, the data handled by the algorithms and on which basic operations (additions, multiplications) are performed must be protectable against piracy, that is, against external attacks aiming at discovering secret data and/or the calculation algorithm. [0003] 2. Discussion of the Related Art [0004] For example, when an integrated circuit (be it a microprocessor or an operator in wired logic) executes a calculation on data, this calculation has an influence upon its power consumption. An analysis of the power consumption of the integrated circuit during the algorithm execution may enable a pirate to discover the processed data or the algorithm which executes them. Such attacks by analysis of the power consumption of an integrated circuit handling data are known as the SPA (single power analysis) or the DPA (differential power analysis). [0005] An example of application of the present invention relates to authentication procedures of digital files (for example, audio files) or of electronic processing elements (for example, smart cards) to validate the authorization of the user to have access to information (for example, audio data or on-chip data). [0006] For questions of calculation rapidity and of algorithm implementation ease, the numbers on which operations are desired to be performed by automatic calculation means may be factorized by application of the so-called Chinese remainder theorem (CRT). [0007] The Chinese remainder theorem, applied to integers, may be expressed as follows. For any sequence of numbers m [0008] This means that, for a finite sequence of numbers m [0009] In other words, for any integer x between 0 and M, where M represents the product of prime numbers m [0010] is the inverse of number M [0011] The advantage of residue number systems is that operations such as addition, subtraction, and multiplication are simplified and can be executed in parallel architectures. In fact, the elementary operations can be performed on each integer of the factorization of the number to be calculated. The result is then obtained by applying above formula 1 to the result. [0012] For example, two numbers x and y on which a calculation is desired to be performed are factorized by using the same base of prime numbers. After, the addition, subtraction, and product operations are carried out on the elements of the factorization, modulo the corresponding prime numbers. A set of values is obtained in the factorization base, which are recombined to obtain the result. [0013] The major advantage of an automated execution of the calculations by means of integrated circuits is that the individual operations modulo the numbers of the factorization base involve numbers always having the same size, which enables execution of these calculations by means of parallel architectures and within a same duration. [0014] However, a disadvantage is that the processed numbers are more easily detectable by the different attacks, especially, by power analysis of the integrated circuit. [0015] Conventionally, to mask the processing of one or several numbers, these numbers are combined with random quantities, before the algorithmic processing. [0016] A disadvantage is that this modifies the processed number(s), which imposes performing a reverse modification at the end of the processing to recover the expected result. [0017] Another disadvantage is that the masking increases the processing complexity as well as the duration of the full calculation. [0018] More generally, the residue number system applying the Chinese reminder theorem applies when the operations and operands are those of any finite body. For example, this system applies to a body of polynomials modulo an irreducible polynomial, or to the body of integers modulo a prime number. [0019] The present invention aims at providing a solution for masking the execution of algorithmic calculations using representations by residue number system. [0020] The present invention more specifically aims at providing a masking solution which is independent from the implemented algorithm, that is, which can apply whatever the calculations performed on the factorized numbers. [0021] The present invention also aims at providing a solution which does not adversely affect the execution rapidity of the algorithm and, especially, which adds no additional calculation step. [0022] To achieve these and other objects, the present invention provides a method for masking digital data handled by an algorithm and factorized by a residue number system based on a finite base of numbers or polynomials prime to one another, comprising making the factorization base variable. [0023] According to an embodiment of the present invention, the factorization base is chosen from a look-up table of sets of numbers or polynomials prime to one another. [0024] According to an embodiment of the present invention, the set of numbers or polynomials prime to one another used for the factorization by residue number system is randomly selected from the look-up table, for each new application of the algorithm. [0025] According to an embodiment of the present invention, the factorization base is calculated by a pseudo-random generator. [0026] According to an embodiment of the present invention, the base is chosen to be compatible with the lengths of the numbers or polynomials processed by the algorithm. [0027] According to an embodiment of the present invention, the method is applied to input data already factorized by a residue number system in an original base, the input data undergoing a factorization base change and the result provided by the algorithm undergoing, preferably, an inverse transformation towards said original base. [0028] According to an embodiment of the present invention, the method is applied to input data not yet factorized. [0029] According to an embodiment of the present invention, one or several factorization base changes are performed during the execution of the algorithm. [0030] The present invention also provides a circuit of algorithmic processing of data factorized by a residue number system based on a finite base of numbers or polynomials prime to one another, comprised of a circuit of selection or generation, and of temporary storage of said base. [0031] According to an embodiment of the present invention, the circuit comprises an element for storing a table of bases of numbers or polynomials prime to one another, said selection circuit selecting, at each application of the algorithm, a base from said table. [0032] According to an embodiment of the present invention, the circuit comprises an element for checking the conformity between the base selected for application of the factorizations by residue number system and the calculation circuits of the circuit executing the algorithm. [0033] The foregoing objects, features, and advantages of the present invention will be discussed in detail in the following non-limiting description of specific embodiments in connection with the accompanying drawing which very schematically illustrates in the form of blocks an embodiment of the masking method according to the present invention. [0034] For clarity, the present invention will be discussed hereafter in relation with an application to integers factorized based on a base of numbers prime to one another. It should however be noted that it more generally applies to a factorization of polynomials of a body modulo an irreducible polynomial based on a base of polynomials prime to one another. [0035] A feature of the present invention is to modify the factorization/recombination base of the integers processed by an algorithm in application of a residue number system. [0036] According to the present invention, the representation by the residue number system is changed, preferably, each time a new group of integers is submitted to a factorization for an algorithmic processing, or for a calculation operation. [0037] Thus, conversely to conventional solutions of calculation masking by introduction of random numbers in the processed numbers to modify them, the present invention provides making the number representation variable, said number remaining unchanged. [0038] A significant advantage as compared to the introduction of a random number is that the recovery of the expected result requires no additional calculation with respect to the conventional application of residue number system representations. Indeed, only the factorization base must be indicated to the conventional recombination process. In other words, the factorization base is made variable. [0039] Another advantage is that the calculation duration is only slightly increased by the masking. The only additional duration corresponds to the factorization base change (memory reading), which is negligible as compared to the additional calculations required, at least at the beginning and at the end of an algorithm, to combine the processed numbers (or polynomials) with a random number. [0040] The appended drawing shows, in the form of blocks, an example of application of a residue number system representation to an algorithm [0041] As previously, to ease calculations, algorithm [0042] Algorithm [0043] According to the present invention, factorization base {m [0044] According to the origin and to the destination of the input data of the algorithm, factorizations [0045] According to another embodiment, base changes (additional or not) may be performed during the algorithm. These changes are then selected by means of block [0046] Several methods may be used to select the factorization base or to change bases during the calculation. [0047] According to a first implementation mode, a table 6 of sets {M} of numbers prime to one another is stored in a storage element and a selection (for example, random) of one of the sets of the stored table is provided for each new factorization, each set representing a base in the residue number system. [0048] According to another example of implementation, a generator of sequences of numbers prime to one another which generates (on the fly), pseudo-randomly to be compatible with the parallel architecture of the circuit executing algorithm [0049] It should be noted that, for the factorization or the base change to be different from one calculation to another, it is enough for two numbers of the chosen factorization base to be inverted, that is, placed in a different order in the base number sequence. It is accordingly particularly simple to vary the factorization of any input digital datum while remaining compatible with a same circuit of processing by parallel architecture. It is enough to modify the branching of the factorized data according to the order of the numbers (or the polynomials) prime to one another of the base. The transformation mode of the base by change in the order of the numbers thereof however conditions the quality of the random character of the number representation in the residue number system. [0050] An advantage of the present invention is that its implementation is independent from the executed algorithm. [0051] Another advantage of the present invention is that it does not require a specific recalculation after completion of the algorithm to recover the expected number. Indeed, in any structure with an algorithmic processing by application of the Chinese remainder theorem, a step of recombination based on the base of numbers or polynomials prime to one another is provided to restore the result. [0052] An example of an algorithm where the present invention applies is the RSA-type algorithm such as described in article “Modular multiplication and base extension in residue number systems” by J.-C. Bajard, L.-S. Didier and P. Kornerup, published by N. Burgess, report of Arith 15, 15 [0053] Of course, the present invention is likely to have various alterations, modifications, and improvements which will readily occur to those skilled in the art. In particular, the present invention applies whatever the number of input data of the algorithm and whatever the number of data provided by this algorithm, provided that all input data be factorized based on the same base of numbers or polynomials prime to one another. [0054] Further, the choice of the size of the sets of prime numbers or polynomials forming the factorization base depends on the application and is made conventionally. [0055] Further, the practical implementation of the present invention based on the functional indications given hereabove is within the abilities of those skilled in the art by using known means. The implementation of the present invention may be performed by software or by state machines in wired logic. For example, when implemented by hardware means, factorization or input data base change blocks [0056] Such alterations, modifications, and improvements are intended to be part of this disclosure, and are intended to be within the spirit and the scope of the present invention. Accordingly, the foregoing description is by way of example only and is not intended to be limiting. The present invention is limited only as defined in the following claims and the equivalents thereto. Referenced by
Classifications
Legal Events
Rotate |