A non-transitory computer readable medium storing a program causing a computer to execute key generating processing, the process comprising:
- generating a certification public key which is used when recording a signatory private key used in an electronic signature in a PKI card and a certification private key which corresponds to the certification public key;
- transmitting the generated certification private key to the PKI card via a secure communication path;
- generating a certification public key certificate for the certification public key;
- recording the generated certification public key certificate in a memory;
- generating a signatory public key used in the electronic signature and the signatory private key corresponding to the signatory public key;
- generating a signatory public key certificate for the signatory public key;
- acquiring the certification public key certificate that is recorded in the memory;
- generating an encoded signatory key which is obtained by encoding the generated signatory public key certificate and the generated signatory private key using the certification public key indicated in the acquired certification public key certificate;
- assigning a time stamp, which is issued by a time stamp authority, to the encoded signatory key;
- transmitting the encoded signatory key, to which the time stamp is assigned, to the PKI card via the secure communication path or via a non-secure communication path;
- and
- transmitting, to the PKI card, a TSA public key certificate which indicates the time stamp authority which issues the time stamp.