An authentication system, comprising: a first device; and a second device which is communicative with the first device, wherein the first device is configured to transfer target data to the second device, wherein the second device includes: a hardware security module circuit which performs an authentication process; characterised by an error detection circuit (4, 8) used to perform an error detection process at least on the transferred target data which is processed in the hardware security module circuit, and wherein the error detection circuit (4, 8) is configured to be accessible only by the hardware security module circuit when the error detection process is performed at least on the transferred target data, wherein the first device is configured to: add error detection data to the whole target data, encrypt the whole target data to which the error detection data has been added, segment the encrypted target data into data segments, and transfer the data segments, and wherein the hardware security module circuit is configured to: perform mutual authentication with the first device before the data segments are transferred, receive the data segments, and perform mutual authentication with the first device after the data segments are transferred. a first device; and a second device which is communicative with the first device, wherein the first device is configured to transfer target data to the second device, wherein the second device includes: a hardware security module circuit which performs an authentication process; characterised by an error detection circuit (4, 8) used to perform an error detection process at least on the transferred target data which is processed in the hardware security module circuit, and a hardware security module circuit which performs an authentication process; characterised by an error detection circuit (4, 8) used to perform an error detection process at least on the transferred target data which is processed in the hardware security module circuit, and wherein the error detection circuit (4, 8) is configured to be accessible only by the hardware security module circuit when the error detection process is performed at least on the transferred target data, wherein the first device is configured to: add error detection data to the whole target data, encrypt the whole target data to which the error detection data has been added, segment the encrypted target data into data segments, and transfer the data segments, and add error detection data to the whole target data, encrypt the whole target data to which the error detection data has been added, segment the encrypted target data into data segments, and transfer the data segments, and wherein the hardware security module circuit is configured to: perform mutual authentication with the first device before the data segments are transferred, receive the data segments, and perform mutual authentication with the first device after the data segments are transferred. perform mutual authentication with the first device before the data segments are transferred, receive the data segments, and perform mutual authentication with the first device after the data segments are transferred.