摘要 |
PROBLEM TO BE SOLVED: To make it difficult for an attacker to estimate a secret key.SOLUTION: A semiconductor device (10) includes: a random number generating section (27); a key storage area (17) capable of storing a normal key and a dummy key in which a logic of the normal key is reversed; and an arithmetic processing section (11) capable of executing arithmetic processing using the normal key and arithmetic processing using the dummy key in order corresponding to a logical value of a random number generated in the random number generating section. The semiconductor device further includes an arithmetic result storage area (17) capable of storing the result of the arithmetic processing using the normal key and the result of the arithmetic processing using the dummy key. The arithmetic processing section obtains the result of the arithmetic processing using the normal key from the arithmetic result storage area. The order of the arithmetic processing using the normal key and the arithmetic processing using the dummy key is changed according to the logical value of the random number. Accordingly, even when an attacker rewrites a key by a failure attack, this makes it impossible to determine whether the rewritten key is the normal key or the dummy key. |