A photonic crystal device having a variable bandgap includes a periodic structural body including a plurality of separate dielectric members arranged at intervals. A data encryptor obtains a new key from the first key storage unit at each occurrence of the key time of the first key storage unit, and uses the key to encrypt an inputted data. While the agent is processing, the execution of the agent within the address space of the invoking process may be switched to execution of the agent within the separate address space. A word line voltage adjustment circuit changes the output voltage of the word line driver from the first voltage to the second voltage in accordance with the detection signal from the potential detection circuit. This makes it possible to realize intelligent peripheral circuit functions, such as are associated rather with a special-purpose microcomputer than with a general-purpose microcomputer, without using special manufacturing techniques or processes or spending a long time as in the development of a special-purpose microcomputer.