Patent ID: 8639944

Claim:
A method for securing the computation of a modular exponentiation x=m D mod N against invasive attacks, wherein m is a message, D is an exponent, and N is a modulus, comprising: given an integer k and given an integer R such that R and N are coprime, performing the following steps: a. generate a mask alpha and a mask beta, such that alpha=1 mod N, alpha=0 mod R, beta=0 mod N and beta=1 mod R, b. mask the message m with the masks alpha and beta by computing a masked message m′=(m*alpha+k*beta) mod (N*R), c. compute the modular exponentiation x′=m′ D mod(N*R) d. if (x′−k D ) mod R=O, output x=x′ mod N, otherwise apply a countermeasure.