The invention is a method and system in which an authentication chip
having secret information stored within it, including secret data stored
in multi-level flash memory, is protected from unauthorized modification
of values stored in the flash memory. The secret information is stored
using an internal command and can only be accessed by one or more further
commands. Secret data in the information is stored in intermediate states
of the multilevel flash memory between the minimum and maximum voltage
level states. A validity check is performed on secret data items before
allowing them to be read out by a command accessing them. The validity
check involves calculation of a checksum and comparison of the result
with a checksum stored using the internal command as part of the secret
information.