access to the secret information may be not possible in fig6 the leakage of the secret information due to an invasive attack may be reduced without using the attack detecting unit fig7 illustrates an example of the attack detecting circuit in fig7 the output of the latch circuit before an external action is detected is adjusted to a random number as illustrated in fig7 by disposing an adjustment circuit 601 in the output lines 103 and 104 of the attack detecting circuit 108 the output state of the latch circuit which is stored in the attack detecting unit is adjusted as illustrated in fig2 when the output value before the fib processing is u201c 0 u201d the output after the fib processing is u201c 0 u201d with a probability of 50 and the output after the fib processing is u201c 1 u201d with a probability of 50 accordingly when the output value before the fib processing is u201c 0 u201d the probability that the change of the output value after the fib processing will be detected is approximately 50 of that when the output value after the fib processing is u201c 1 u201d and the probability of detection of an invasive attack is not high when the output value before the fib processing is u201c 1 u201d all the output values after the fib processing are u201c 0 u201d accordingly when the output value before the fib processing is u201c 1 u201d it may be considered that most of the output values after the fib processing is u201c 0 u201d and the change may be predicted when the output value before the fib processing is a random number the output value after the fib processing is not a random number but u201c 0.