Cryptographic method during which, in order to carry out a modular exponentiation of type C=AB1 mod N, where A is an operand comprising a message on which a cryptographic operation is being performed, B1 is a first exponent, N is a modulus and C is a result, comprising the following steps:
- masking the operand A by a random number s,
- carrying out a modular exponentiation of the masked operand by the exponent B1, then
- demasking the result of the exponentiation, by removing a contribution from the random number s from the result of the exponentiation, to thereby obtain a signed, encrypted or decrypted version of said message.
- wherein during the step of masking the operand A, the operand A is multiplied by a parameter in form Ks.B2, where K is a constant and B2 is a second exponent such that B1.B2=1 mod φ(N).