Tamper resistance is provided to avoid observation of the behavior of
portions of software by calling a function exclusively available in one
differentiated section of a processor and its peripherals and drivers from
another differentiated section. A pseudo-random binary sequence generator
is associated with each such differentiated section and incremented
incident to the calling and performance of the function, respectively. The
pseudo-random binary sequence values are compared prior to allowing or
preventing further execution of the software. The comparison can be
performed at any privilege level and a variation of the invention provides
additional security by utilizing an additional privileged function to
perform the comparison. An enhancement of the invention corrupts data or
program files using a PRBS value at one privilege level and performs the
inverse function to restore the data or program files at another privilege
level with its own PRBS value.