Patent ID: 6970561

Claim:
An encrypting apparatus comprising: an encrypting operation section carrying out an encrypting operation to a plaintext using intermediate data at each of a plurality of encrypting stages of said encrypting operation to produce a ciphertext, wherein said encrypting operation section outputs encrypting stage data indicating an encrypting state at each of said plurality of processing stages; a determining section determining whether said encrypting operation at a next encrypting stage should be changed, based on said encrypting stage data at a current encrypting stage from said encrypting operation section; a control section changing said encrypting operation at said next encrypting stage a plurality of times when it is determined that said encrypting operation at said next encrypting stage should be changed, wherein said determining section determines whether said intermediate data at said next encrypting stage of said encrypting operation should be changed depending on at least a plurality of random numbers, based on said encrypting stage data at said current encrypting stage from said encrypting operation section, wherein said encrypting stage data includes said intermediate data at said next encrypting stage, and wherein said control section changes said intermediate data at said next encrypting stage a plurality of times depending on said plurality of random numbers, in order to cancel an influence of said plurality of random numbers on said encrypting operation, wherein said encrypting operation section divides each n-bit word of the plaintext into an upper n bits and a lower n bits, n being an even integer value greater than or equal to 16, wherein said determining section calculates a logical product of the upper n bits of the plaintext with at least one of said plurality of random numbers to obtain a first result, and said determining section calculates a logical product of the lower n bits of the plaintext with at least one of said plurality of random numbers to obtain a second result, wherein, in obtaining the first result and the second result, a first subset of the upper n bits and the lower n bits of the plaintext are exclusive-or'ed with a first of said plurality of random numbers, a second subset of the upper n bits and the lower n bits of the plaintext are exclusive-or'ed with a second of said plurality of random numbers, and a third subset of the upper n bits and the lower n bits of the plaintext are exclusive-or'ed with both the first and second random numbers.