It has: a device (2), which stores data; an authentication information storage unit (4), which stores authentication information; an authentication function unit (5), which performs user authentication based on the authentication information; and an encryption filter (3), which has multiple One of the encryption modes (311~31n), one of which is preset by the user for encryption processing, the authentication function part (5) performs user authentication when requesting to write data to the device from an external device, and the user authentication succeeds In this case, for the data written to the device (2), the encryption filter (3) is encrypted using the encryption mode (311~31n) set in advance by the user, and then written to the device (2). When the authentication fails, the encryption filter (3) encrypts the data written in the device (2) using an encryption mode (311 to 31n) different from the encryption mode set in advance by the user, and sends the encrypted data to the device (2). (2) Write.