Patent ID: 8233614

Claim:
A cryptographic method during which an integer division of the type q=a div b and r=a mod b is performed in a processor of an electronic device, where q is a quotient, a is a number containing m bits, b is a number containing n bits, with n less than or equal to m and b n−1 is non-zero, b n−1 being the most significant bit of b, comprising the following steps: (i) performing a partial division of a word A, comprising n bits of the number a, by the number b to obtain a bit of the quotient q, wherein at least one of the numbers a and b comprises secret data; (ii) repeating step (i) for m−n+1 iterations with the same number and type of operations being performed at each iteration, regardless of the value of the quotient bit obtained, to obtain the quotient q; and (iii) generating encrypted or decrypted data in accordance with said quotient.