1. A communication device that is connected to a key generating device which generates an encryption key, the communication device comprising: a querying circuit 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, the encryption functions including an encryption function using the encryption key and an encryption function not using the encryption key; and a selecting circuit configured to select, from among the plurality of encryption functions, an encryption function according to the capability information, performance information that indicates performance in a case of implementing each of the plurality of encryption functions, and resource information that indicates a resource that is usable by the communication device, wherein the encryption processor implements the encryption function thus selected.