Patent ID: 7796286

Claim:
An image forming apparatus comprising: a connecting unit configured to be connectable to a replacement part, the replacement part having a storage unit that stores therein information including identification information unique to the replacement part; a replacement judging unit that judges whether the replacement part that is connected to the connecting unit needs replacement based on consumption information indicative of how much the replacement part has been consumed; an identification information reading unit that reads the identification information in the storage unit of the replacement part when the replacement judging unit judges that the replacement part needs replacement; a main memory that stores therein history data for encryption and/or decryption processing performed on the replacement part; an encryption judging unit that judges whether an encryption processing has been performed with respect to a predetermined piece of information by searching the history data stored in the main memory, using the read identification information of the replacement part as a key; and an encrypting unit that encrypts the predetermined piece of information in the storage unit of the replacement part by using the key when the encryption judging unit judges that the predetermined piece of information has not been encrypted, wherein the key is unique to the identification information.