Patent ID: 8837725

Claim:
A communication system, comprising: an information processing apparatus and a device that perform a communication, wherein the information processing apparatus comprises: a first storage unit that stores one or more keys; a polling-request generating unit that generates a polling request including: a first key identifier, the first key identifier only identifying a key of the one or more keys, the key identified by the first key identifier, and a second key identifier subordinate to the first key identifier; an obtaining unit that identifies the key from the first key identifier included in the polling request and the second key identifier, that reads the key from the first storage unit, and that decrypts encrypted data by the key to obtain a random number, the encrypted data being included in a polling response supplied to the information processing apparatus from the device in response to the polling request; and a first hash calculating unit that performs a calculation in which a hash function is applied to the random number obtained by decrypting the encrypted data to calculate a first hash value; and a comparing unit that compares the first hash value calculated by the first hash calculating unit with a second hash value included in the polling response; and the device comprises a random-number generating unit that generates the random number; a second storage unit that stores one or more keys; a reading unit that reads the key corresponding to the first key identifier included in the polling request from the second storage unit; an encrypting unit that encrypts the random number generated by the random-number generating unit by the key read by the reading unit; a second hash calculating unit that performs a calculation in which a hash function is applied to the random number generated by the random-number generating unit to calculate the second hash value; and a polling-response generating unit that generates the polling response including the second hash value, the second key identifier, and data of the random number encrypted by the encrypting unit.