Abstract: A flash memory includes an encoded cryptographic key “k” stored therein. A protected ROM, an external access to which is inhibited, includes a decoding program stored therein to decode the cryptographic key “k”. The cryptographic key “k” is decoded by using the decoding program. With the cryptographic key “k” as decoded, data is encrypted and stored in the flash memory. Data read out from the flash memory is output after decrypted with the cryptographic key “k.” In order to check an area having the decoding program stored therein, data which forms the decoding program is processed by using a hash function stored in the ROM, and a processing result and an expected value are compared with each other. When the processing result and the expected value matches with each other, the aforementioned area is determined as being in a normal condition.