A non-transitory computer readable medium storing a control program of a ciphertext generation apparatus for causing a computer to execute a method, comprising:
- generating a derived key based on a main key and a document;
- generating an auxiliary derived key based on the main key, the document, and the derived key;
- generating, based on an identifier of the document, the derived key, and the auxiliary derived key, an identifier-specific ciphertext in which the identifier is encrypted;
- and
- generating, based on the identifier and the derived key, a relative value ciphertext in which a relative value generated from the main key, the document, and the derived key is encrypted,
- wherein a character string including the identifier-specific ciphertext and the relative value ciphertext is generated as a ciphertext for the document.