One or more lock words in a non-volatile memory with write ability
correspond to lockable features of a protected system including the
memory. A lockable feature should be locked when the corresponding lock
word has a value equal to one of a limited number of predetermined
locking combination(s). The locking combination(s) are selected so as to
minimize the probability of the lock word waking up from manufacture with
a value equal to one of the locking combination(s). In order to detect
whether allowable usage of a lockable feature should be at a
predetermined locked or unlocked level, multi-sampling of the
corresponding lock word value is performed. If there is variation among
the sampled values of the lock word, a malicious attack is identified. In
one preferred embodiment, the multi-sampling occurs upon power up reset
of the protected system and if a malicious attack is identified, the
protected system is kept in reset.