A semiconductor device comprises a semiconductor substrate, a basic module
having a memory cell unit composed of first nonvolatile memory cells or a
processor unit on a part of the substrate, an authentication module which
has second nonvolatile memory cells in an area different from that of the
basic module on the substrate, and stores an authentication code, and a
lifetime control module which has aging devices configured by third
nonvolatile memory cells in an area different from those of the basic
module and the authentication module on the substrate, and which is
turned on for a fixed period by storage of charges and permits reading of
the authentication module only during an on-period of the aging devices.