摘要 |
The present invention relates to a method to calculate modular exponentiation 2c mod n, said method comprising the steps of, xi referring to the value of i-th byte from the most significant byte of the exponent c (i = 1,..., (|c|)/8): - initializing (SO) an accumulator (ACC) with 1, - looping on the following operations from the first byte (x1) until the last byte (x3): - calculating (S2) modular square 8 times on the accumulator (ACC), - shifting (S3) the current value on the accumulator (ACC) to the left xi times, - applying (S3) modular reduction to the accumulator (ACC). |