A non-linear processor, which subjects an input value from a feedback shift register storing an internal state of a stream cipher to non-linear processing to output a key stream, is connected to internal registers, which store output values from a non-linear substitution circuit which subjects the input value to non-linear substitution processing. The non-linear processor is provided with an exclusive-OR unit, which is at an input end of each of the internal registers and carries out an operation of a random number generated from part of values stored in the feedback shift register and the output value of the non-linear substitution circuit to mask the output value of the non-linear substitution circuit, and another exclusive-OR unit, which is provided at an output end of the internal register and performs an operation to unmask the value stored in the internal register.
展开▼