摘要 |
A device according to the present invention is an encrypted text generation device capable of comparing the size of encrypted numerical values while significantly reducing the opportunities for information leakage by maintaining secrecy. The encrypted text generation device comprises a derived key generation unit for generating a derived key on the basis of a main key and a document; an auxiliary derived key generation unit for generating an auxiliary derived key on the basis of the main key, the document and the derived key; an identifier-based encrypted text generation unit for generating an identifier-based encrypted text with an identifier encrypted on the basis of a document identifier, the derived key and the auxiliary derived key; and a relative-value encrypted text generation unit for generating on the basis of the identifier and the derived key a relative-value encrypted text prepared by encrypting a relative value generated from the main key, the document and the derived key. A character string including the identifier-based encrypted text and the relative-value encrypted text is adopted as an encrypted text for the document. |