On an embedded device, an implementation of cryptographic operation, like an RSA modular exponentiation [12], can be attacked by side channel analysis. In particular, recent improvements on horizontal power analysis [3,10] render ineffective the usual counter-measures which randomize the data at the very beginning of the computations [4,2]. To counteract horizontal analysis it is necessary to randomize the computations all along the exponentiation. The leak resistant arithmetic (LRA) proposed in [1] implements modular arithmetic in residue number system (RNS) and randomizes the computations by randomly changing the RNS bases. We propose in this paper a variant of the LRA in RNS: we propose to change only one or a few moduli of the RNS basis. This reduces the cost of the randomization and makes it possible to be executed at each loop of a modular exponentiation.Keywords: Leak resistant arithmetic, randomization, modular multiplication, residue number system, RSA.
IntroductionNowadays, the RSA cryptosystem [12] is constantly used in e-commerce and credit card transactions. The main operation in RSA protocols is an exponentiation x K mod N where N is a product of two primes N = pq. The secret data are the two prime factors of N and the private exponent K used to decrypt or sign a message. The actual recommended size for N is around 2000-4000 bits to insure the intractability of the factorization of N . The basic approach to perform efficiently the modular exponentiation is the square-and-multiply algorithm: it scans the bits k i of the exponent K and performs a sequence of squarings followed by a multiplication only when k i is equal to one. Thus the cryptographic operations are quite costly since they involve a few thousands of multiplications or squarings modulo a large integer N .A cryptographic computation performed on an embedded device can be threaten by side channel analysis. These attacks monitor power consumption or electromagnetic emanation leaked by the device to extract the secret data. The simplest attack is the simple power analysis (SPA) [8] which applies when the power trace of a modular squaring and a modular multiplication are different. This makes it possible to read the sequence of operations on the power trace of an exponentiation and then derive the key bits of the exponent. This attack is easily overcome by using an exponentiation algorithm like the Montgomeryladder [6] which render the sequence of operation uncorrelated to the key bits. A more powerful attack, the differential power analysis (DPA) [8], makes this counter-measure against SPA inefficient. Specifically, DPA uses a large number of traces and correlate the intermediate values with the power trace: it then track the intermediate value all along the computation and then guess the bits of the exponent. Coron in [4] has shown that the exponentiation can be protected from DPA by randomizing the exponent and by blinding the integer x. Recently the horizontal attacks presented in [13,3] require only one power trace of an expone...