Patent ID: 8423793

Claim:
A data processing device for executing data processing, the data processing device comprising: a first storage unit configured to store data; an encryption unit configured to encrypt the data to be stored in said first storage unit; a decryption unit configured to decrypt the encrypted data stored in said first storage unit; a second storage unit configured to store data after decrypting data last read from said first storage unit in executing the data processing or before encrypting data last written to said first storage unit in executing the data processing; a third storage unit configured to store location information representing a location of the data last read from said first storage unit or last written to said first storage unit; a judgment unit configured to compare data, which is read from the location represented by the location information stored in said third storage unit and is decrypted by said decryption unit, with the data stored in said second storage unit; and a control unit configured to enable the data processing to use said first storage unit in a case where the data, which is read from the location represented by the location information stored in the third storage unit and is decrypted, corresponds to the data stored in said second storage unit, and to limit execution of the data processing using said first storage unit in a case where the data, which is read from the location represented by the location information stored in the third storage unit and is decrypted, does not correspond to the data stored in said second storage unit, wherein in a first data processing, the data last read from a first position in said first storage unit or last written to the first position in said first storage unit is used for comparison, and in a second data processing, the data last read from a second position in said first storage unit or last written to the second position in said first storage unit is used for comparison, so that the data used for comparison changes according to the data accessed in said first storage unit.