An exponentiation device for exponentiating Ak over a natural number field, the discrete logarithm problem being to determine the element k, when k exists, such that an element Y=Ak over the natural number field, the device comprising:
- initializing means for storing an integer value 1 as an initial value in a variable X and a variable B2;
- repetition control means for controlling calculation means, storage means, and exchange means to repeat, for the number of bits in a bit sequence resulting when the element k is represented in binary, a step composed of the respective operations of calculating, storing, and exchanging, so as to perform the exponentiation Ak, the result of the exponentiation Ak being stored in the variable X at the completion of the repetitions;
- the calculation, means for performing the multiplication using the variable X and the same variable X, performing the multiplication again using the initial multiplication result and an operand stored in the variable B2, and storing the further multiplication result in the variable X;
- the storage means for selecting an operand to be used by the calculation means in the following step and storing the selected operand in a variable B1, the operation conducted by the storage means being completed during a duration of the operation conducted by the calculation means;
- and
- the exchange means for exchanging the operand in the variable B2 for the operand in the variable B1 when the operations conducted by the calculation means and the storage means have been completed.