To provide an encryption circuit and a decryption circuit capable of, when data are initialized for each prescribed size to be encrypted or decrypted, reducing the burden of software processing for the initialization.
A CBC encryption circuit is constituted of an input register 11, a KEY register 12, an EXOR operation section 13, an AES encryption operation section 14, a selector 15, an IV register 16 holding an initial vector IV, and an output register 17. The CBC encryption circuit is also provided with: a counter 22 counting the number of times of encryption; a cycle register 23 wherein the number of times of encryption per cycle is set; and a comparison function section 24 which, when the first encryption is performed and when the counter value of the counter 22 and the number of times of encryption per cycle coincide, outputs an enable signal 35 and resets the counter 22. The selector 15 selects output of the initial vector IV when the enable signal 35 is input, and selects output of the AES encryption operation section 14 when the enable signal 35 is not input.
Next Patent: IMAGE FORMING DEVICE, DISPLAY DEVICE, DISPLAY SCREEN SWITCHING METHOD, AND DISPLAY SCREEN SWITCHING ...