1. A communication device that is connected to a key generating device which generates an encryption key, the communication device comprising: a querying unit configured to send a query to the key generating device about capability information which indicates capability of the key generating device to generate the encryption key; an encryption processor configured to implement a plurality of encryption functions; and a selecting unit configured to select, from among the plurality of encryption functions, an encryption function according to the capability information, wherein the encryption processor implements the encryption function thus selected.