Patent ID: 8453238

Claim:
A method for checking an integrity of a key used, by an electronic circuit, in a symmetrical algorithm for ciphering or deciphering a message, the method comprising the steps of: complementing to one the key to provide a key complemented to one; complementing to one the message to provide a message complemented to one; executing the symmetrical algorithm twice, the execution comprising: randomly determining whether to first execute the symmetrical algorithm with the key and the message and subsequently execute the symmetrical algorithm with the key complemented to one and the message complemented to one or whether to first execute the symmetrical algorithm, with the key complemented to one and the message complemented to one and subsequently execute the symmetrical algorithm with the key and the message; and executing the symmetrical algorithm twice based on the determination; and checking a consistency between the execution of the symmetrical algorithm with the key and the message and the execution of the symmetrical algorithm with the key complemented to one and the message complemented to one.