The present invention relates to an integrated circuit device containing a
memory area, which comprises, on the one hand, a data memory and a
program memory, and on the other hand, a program having N code blocks Bi
(i=1, . . . , N). It also relates to a method for making such a device
secure. The present invention is characterized in that the memory area
has M replicas Cj (j=1, . . . , M) of x program code blocks Bi (x=1, . .
. , N), which replicas reside at different addresses in said memory area,
and in that said device has selection means for randomly selecting one
replica Cj of at least one of the x blocks Bi, as a block replica to be
used when executing said program. In particular, the present invention
can be applied to smart cards.