WO2015052957A1 - 暗号文比較システム - Google Patents

暗号文比較システム Download PDF

Info

Publication number
WO2015052957A1
WO2015052957A1 PCT/JP2014/065858 JP2014065858W WO2015052957A1 WO 2015052957 A1 WO2015052957 A1 WO 2015052957A1 JP 2014065858 W JP2014065858 W JP 2014065858W WO 2015052957 A1 WO2015052957 A1 WO 2015052957A1
Authority
WO
WIPO (PCT)
Prior art keywords
ciphertext
identifier
key
document
generating
Prior art date
Application number
PCT/JP2014/065858
Other languages
English (en)
French (fr)
Inventor
古川 潤
Original Assignee
日本電気株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電気株式会社 filed Critical 日本電気株式会社
Priority to JP2015541450A priority Critical patent/JP6504405B2/ja
Priority to US15/027,602 priority patent/US10366631B2/en
Publication of WO2015052957A1 publication Critical patent/WO2015052957A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C1/00Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation

Definitions

  • the present invention relates to a ciphertext comparison system, a ciphertext comparison method, a ciphertext generation device, a ciphertext comparison device, and control programs thereof.
  • Non-Patent Document 1 discloses a technique for comparing the magnitudes of encrypted numerical values as follows.
  • Non-Patent Document 2 discloses a technique for comparing the magnitudes of encrypted numbers as follows.
  • M (b [1],..., B [n])
  • Non-Patent Document 1 when a ciphertext sequence is given, there is a problem in that all the magnitude relations of the corresponding plaintext are immediately known without having any knowledge about the key. In addition, there is a problem in that the approximate size of plaintext is known from the ciphertext because the method of Non-Patent Document 1 requires that the data order be preserved before and after encryption.
  • the user may request the database to send back all the tuples with a certain attribute larger or smaller than a certain number from the table which is a set of tuples having various attributes. is there.
  • the database is encrypted by the method described in Non-Patent Document 1, the database can determine the magnitude of the numerical value without knowing the key used for encryption, and can meet the user's request.
  • the database need only be able to determine the magnitude of the numerical value only when requested by the user, but this is possible even without a request. This unnecessary capability increases the chance of information leaking from the database.
  • Non-Patent Document 2 even if the first k matches of the ciphertext can be known, the magnitude cannot be discriminated directly. Therefore, all of the first k matching candidate ciphertexts had to be sent. In addition, since the first k of the two ciphertexts can be matched directly without holding the encryption key, when this is used for a database, there is an opportunity to leak information from the database. Will increase.
  • An object of the present invention is to provide a technique capable of comparing the magnitudes of encrypted numerical values in order to solve the above-described problems, and greatly reducing the chance of information leakage while maintaining concealment. There is to do.
  • a ciphertext generation apparatus provides: Derived key generation means for generating a derived key based on the primary key and the document; Auxiliary derivation key generating means for generating an auxiliary derivation key based on the main key, the document, and the derivation key; Based on the identifier of the document, the derivation key, and the auxiliary derivation key, an identifier-specific ciphertext generation unit that generates an identifier-specific ciphertext obtained by encrypting the identifier; Relative value ciphertext generating means for generating a relative value ciphertext obtained by encrypting a relative value generated from the main key, the document, and the derived key based on the identifier and the derived key; With A character string including the identifier-specific ciphertext and the relative value ciphertext is used as a ciphertext for the document.
  • a method for controlling a ciphertext generation apparatus includes: A derived key generation step for generating a derived key based on the primary key and the document; An auxiliary derivation key generating step for generating an auxiliary derivation key based on the main key, the document, and the derivation key; An identifier-specific ciphertext generation step for generating an identifier-specific ciphertext obtained by encrypting the identifier based on the document identifier, the derivation key, and the auxiliary derivation key; A relative value ciphertext generating step of generating a relative value ciphertext obtained by encrypting a relative value generated from the main key, the document, and the derived key based on the identifier and the derived key; Including A character string including the identifier-specific ciphertext and the relative value ciphertext is used as a ciphertext for the document.
  • a control program for a ciphertext generation apparatus includes: A derived key generation step for generating a derived key based on the primary key and the document; An auxiliary derivation key generating step for generating an auxiliary derivation key based on the main key, the document, and the derivation key; An identifier-specific ciphertext generation step for generating an identifier-specific ciphertext obtained by encrypting the identifier based on the document identifier, the derivation key, and the auxiliary derivation key; A relative value ciphertext generating step of generating a relative value ciphertext obtained by encrypting a relative value generated from the main key, the document, and the derived key based on the identifier and the derived key; A control program for a ciphertext generation apparatus that causes a computer to execute A character string including the identifier-specific ciphertext and the relative value ciphertext is used as a cipher
  • a ciphertext comparison apparatus provides: First ciphertext acquisition means for acquiring the first ciphertext, the first identifier, and the first derivation key encrypted by the ciphertext generator; Second ciphertext acquisition means for acquiring the second ciphertext and the second identifier encrypted by the ciphertext generator; Using the first ciphertext, the first identifier, the first derivation key, the second ciphertext, and the second identifier, the first document and the second ciphertext that are the source of the first ciphertext Ciphertext comparison means for determining the magnitude relationship with the original second document as ciphertext; Is provided.
  • a method for controlling a ciphertext comparison apparatus includes: A first ciphertext acquisition step of acquiring a first ciphertext encrypted by the ciphertext generator, a first identifier, and a first derivation key; A second ciphertext acquisition step of acquiring a second ciphertext and a second identifier encrypted by the ciphertext generator; Using the first ciphertext, the first identifier, the first derivation key, the second ciphertext, and the second identifier, the first document and the second ciphertext that are the source of the first ciphertext A ciphertext comparison step for determining the magnitude relationship with the original second document as ciphertext; including.
  • a control program for a ciphertext comparison apparatus includes: A first ciphertext acquisition step of acquiring a first ciphertext encrypted by the ciphertext generator, a first identifier, and a first derivation key; A second ciphertext acquisition step of acquiring a second ciphertext and a second identifier encrypted by the ciphertext generator; Using the first ciphertext, the first identifier, the first derivation key, the second ciphertext, and the second identifier, the first document and the second ciphertext that are the source of the first ciphertext A ciphertext comparison step for determining the magnitude relationship with the original second document as ciphertext; Is executed on the computer.
  • a ciphertext comparison system includes: Derived key generation means for generating a derived key based on the primary key and the document; Auxiliary derivation key generating means for generating an auxiliary derivation key based on the main key, the document, and the derivation key; Based on the identifier of the document, the derivation key, and the auxiliary derivation key, an identifier-specific ciphertext generation unit that generates an identifier-specific ciphertext obtained by encrypting the identifier; Relative value ciphertext generating means for generating a relative value ciphertext obtained by encrypting a relative value generated from the main key, the document, and the derived key based on the identifier and the derived key; A first derivation key generated from the first document by the derivation key generation unit; a first identifier of the first document; and a cipher by first identifier obtained by encrypting the first
  • the relative ciphertext generating unit includes a first ciphertext having a first relative value ciphertext obtained by encrypting a first relative value, a second identifier of a second document, and the identifier-specific ciphertext generating unit includes the first ciphertext generating unit.
  • a second ciphertext having a second identifier cipher that encrypts two identifiers and a second relative value ciphertext in which the relative value ciphertext generating means encrypts a second relative value.
  • Ciphertext comparison means for determining the magnitude relationship between the first document that is the source of the ciphertext and the second document that is the source of the second ciphertext without changing the ciphertext; Is provided.
  • a ciphertext comparison method includes: A derived key generation step for generating a derived key based on the primary key and the document; An auxiliary derivation key generating step for generating an auxiliary derivation key based on the main key, the document, and the derivation key; An identifier-specific ciphertext generation step for generating an identifier-specific ciphertext obtained by encrypting the identifier based on the document identifier, the derivation key, and the auxiliary derivation key; A relative value ciphertext generating step of generating a relative value ciphertext obtained by encrypting a relative value generated from the main key, the document, and the derived key based on the identifier and the derived key; A first derivation key generated from the first document in the derivation key generation step, a first identifier of the first document, and a cipher by first identifier obtained by encrypting the first identifier in
  • the encrypted numerical values can be compared, and the chance of information leakage can be greatly reduced while maintaining concealment.
  • a ciphertext generation apparatus 100 as a first embodiment of the present invention will be described with reference to FIG.
  • the ciphertext generation apparatus 100 is an apparatus that generates a ciphertext for comparing the size of the ciphertext as it is.
  • the ciphertext generation apparatus 100 includes a derivation key generation unit 110, an auxiliary derivation key generation unit 120, an identifier-specific ciphertext generation unit 130, and a relative value ciphertext generation 140.
  • the derived key generation unit 110 generates a derived key 104 based on the main key 101 and the document 102.
  • the auxiliary derivation key generation unit 120 generates the auxiliary derivation key 105 based on the main key 101, the document 102, and the derivation key 104.
  • the identifier-specific ciphertext generation unit 130 generates an identifier-specific ciphertext 106 obtained by encrypting the identifier 103 based on the identifier 103, the derivation key 104, and the auxiliary derivation key 105 of the document 102.
  • the relative value ciphertext generation 140 generates a relative value ciphertext 108 obtained by encrypting the relative value 107 generated from the main key 101, the document 102, and the derivation key 104 based on the identifier 103 and the derivation key 104. Then, the ciphertext generating apparatus 100 sets a character string including the identifier-specific ciphertext 106 and the relative value ciphertext 108 as the ciphertext 109 for the document 102.
  • the derivation key generation unit generates a derivation key based on the main key and the document.
  • the auxiliary derivation key generation unit generates an auxiliary derivation key based on the main key, the document, and the derivation key.
  • the identifier-specific ciphertext generation unit generates an identifier-specific ciphertext obtained by encrypting the identifier based on the document identifier, the derivation key, and the auxiliary derivation key.
  • the relative value ciphertext generation unit generates a relative value ciphertext obtained by encrypting the relative value generated from the main key, the document, and the derived key based on the identifier and the derived key.
  • the ciphertext comparison unit encrypts the first derivation key generated from the first document, the first identifier of the first document, the first identifier-specific encryption obtained by encrypting the first identifier, and the first relative value.
  • the second ciphertext having the text is used to determine the magnitude relationship between the first document that is the source of the first ciphertext and the second document that is the source of the second ciphertext without changing the ciphertext.
  • the ciphertext generation device includes a derivation key generation unit, an auxiliary derivation key generation unit, an identifier-specific ciphertext generation unit, and a relative value ciphertext generation unit, and a ciphertext comparison unit includes a ciphertext comparison unit.
  • the ciphertext generation apparatus and the ciphertext comparison apparatus are not separate apparatuses, and may be an apparatus merged into one.
  • FIG. 14 is a block diagram showing a configuration of an encryption device 1410 as a prerequisite technology.
  • FIG. 15 is a flowchart showing a processing procedure of the encryption device 1410 as the prerequisite technology.
  • the ciphertext C "1406 is set to C" (c [1], ..., c [n]).
  • the first k block elements of the ciphertext C " Assume that (c [1],..., c [k]) is referred to as a prefix k block element of the ciphertext C ′′ and C ′′ [k].
  • the plaintext ciphertext is also equal to the first k. In this way, a partial match can be discriminated with the ciphertext. Note that when the first k block elements for a certain k match in two plaintexts, there is a matching prefix, or k prefixes match.
  • the one holding the key If the one holding the key generates P (a) and passes it to the one holding the set of ciphertexts, the latter is smaller than the numerical value a from the set of ciphertexts possessed without decrypting the ciphertexts. You can choose a ciphertext that encrypts the number.
  • Hash, Hash3, and Hash2 used in the present embodiment are respectively represented as Hash: ⁇ 0,1 ⁇ * ⁇ ⁇ 0,1 ⁇ k , Hash3: ⁇ 0,1 ⁇ * ⁇ ⁇ 0,1,2 ⁇ , Hash2: Let ⁇ 0,1 ⁇ * ⁇ ⁇ 0,1 ⁇ .
  • K ⁇ ⁇ 0,1 ⁇ k is set as a main key.
  • FIG. 2A is a block diagram illustrating a configuration of a ciphertext comparison system 200 including the ciphertext generation apparatus 210 according to the present embodiment.
  • the ciphertext comparison system 200 includes a ciphertext generation device 210 and a ciphertext comparison device 220.
  • the ciphertext generation apparatus 210 includes a derivation key generation unit 211, an auxiliary derivation key generation unit 212, and a ciphertext generation unit 213.
  • the derived key generation unit 211 generates a derived key D204 based on the main key K201 and the document M202.
  • the auxiliary derivation key generation unit 212 generates an auxiliary derivation key G205 based on the main key K201, the document M202, and the derivation key D204.
  • the ciphertext generation unit 213 generates ciphertexts C and F206 based on the main key K201, the document M202, the derivation key D204, the auxiliary derivation key G205, and the identifier ID 203.
  • the identifier ID 203 is an identifier of the document M202.
  • the ciphertext generation apparatus 210 notifies the ciphertext comparison apparatus 220 of the identifier ID 203, the ciphertexts C and F206, and the derivation key D204.
  • the ciphertext generation apparatus 210 and the ciphertext comparison apparatus 220 may be connected to each other through a communication line or may be an integrated apparatus.
  • the communication line may be wireless or wired.
  • the ciphertext comparison device 220 includes a ciphertext comparison unit 221.
  • the ciphertext comparison unit 221 acquires the identifier ID 203, ciphertexts C and F 206, and the derivation key D 204 of the document M 202 from the ciphertext generation apparatus 210.
  • the ciphertext comparison unit 221 keeps the ciphertext based on the identifier ID203, the ciphertexts C and F206, the derivation key D204, and the identifier ID′207 of the other document M ′ and the ciphertexts C ′ and F′208. Compare the magnitude relationship between the document M and the document M ′. Then, the ciphertext comparison unit 221 outputs the determination result R209 of the ciphertext comparison unit 221.
  • FIG. 2B is a diagram illustrating a service to which the ciphertext comparison system 200 including the ciphertext generation apparatus 210 according to the present embodiment is applied.
  • the requested service is compared with the ciphertext as it is.
  • searching and responding is an example of searching and responding.
  • the ciphertext comparison system 200 includes a plurality of communication terminals as the ciphertext generation apparatus 210 and a service server as the ciphertext comparison apparatus 220 connected via the network 240.
  • the ciphertext comparison system 200 may also include a service information providing server 230 that provides service information that the service server stores in a service information database (hereinafter referred to as DB), as indicated by a fine broken line.
  • DB service information database
  • the ciphertext of the service request text that has been encrypted using the main key is transmitted from the plurality of communication terminals as the ciphertext generation apparatus 210 to the service server, as indicated by the solid line arrow.
  • the ciphertext of the service request text includes personal information that the service user 250 does not want to leak.
  • the ciphertext comparison unit 221 of the service server serving as the ciphertext comparison device 220 encrypts the service request text including the personal information acquired from the service user 250 as the ciphertext using the same encryption method of the service information DB. Search by comparing with service information.
  • the found service information is transmitted in ciphertext to a plurality of communication terminals as the ciphertext generating apparatus 210 as indicated by broken line arrows.
  • the ciphertext of the service information is decrypted using the main key, and the service information is provided to the service user 250.
  • the search is executed by comparing the ciphertexts, so that there is no opportunity to leak personal information.
  • encrypted information registered in the service server by the service user 250 in advance is also used for data retrieval from the database and determination of received information in the form of ciphertext, thereby eliminating the opportunity for information leakage. Can do. Therefore, registration of personal information to the service server that is also a cloud server can be performed with peace of mind.
  • FIG. 3 is a block diagram illustrating a functional configuration of the derived key generation unit 211 of the ciphertext generation apparatus 210 according to the present embodiment.
  • the derived key generation unit 211 generates a derived key based on the main key and the document.
  • the derivation key generation unit 211 has a derivation unit 311.
  • the operation of the deriving unit 311 is as follows.
  • the derived key D204 is generated as follows.
  • element d [n] K.
  • FIG. 4 is a block diagram illustrating a functional configuration of the auxiliary derivation key generation unit 212 of the ciphertext generation apparatus 210 according to the present embodiment.
  • the auxiliary derivation key generation unit 212 generates an auxiliary derivation key based on the main key, the document, and the derivation key.
  • the auxiliary derivation key generation unit 212 includes an auxiliary derivation unit 411.
  • FIG. 5A is a block diagram illustrating a functional configuration of the ciphertext generation unit 213 of the ciphertext generation apparatus 210 according to the present embodiment.
  • the ciphertext generation unit 213 includes a relative value generation unit 511, an identifier-specific ciphertext generation unit 512, and a relative value concealment unit 513.
  • the relative value generation unit 511 and the relative value concealment unit 513 constitute a relative value ciphertext generation unit.
  • the relative value ciphertext generation unit generates a relative value ciphertext obtained by encrypting the relative value generated from the main key, the document, and the derived key based on the identifier and the derived key.
  • Is generated by e [q] Hash3 (0, K, d [q + 1]) + b [q] mod 3.
  • FIG. 5B is a block diagram illustrating a functional configuration of the identifier-specific ciphertext generation unit 512 according to the present embodiment.
  • the identifier-specific ciphertext generation unit 512 includes an identifier-specific ciphertext abnormality candidate generation unit 521, a derived key positive inspection unit 522, and an auxiliary derived key negative inspection unit 523.
  • the identifier-specific ciphertext generation unit 512 generates the identifier-specific ciphertext C502 as follows.
  • FIG. 6 is a block diagram showing a functional configuration of the ciphertext comparison unit 221 of the ciphertext comparison apparatus 220 according to the present embodiment.
  • the ciphertext comparison apparatus 220 includes a first ciphertext acquisition unit that acquires the first ciphertext, the first identifier, and the first derivation key encrypted by the ciphertext generation apparatus 210.
  • the ciphertext comparison device 220 is not illustrated, but a second ciphertext acquisition unit that acquires a second ciphertext and a second identifier encrypted by a device having the same encryption function as the ciphertext generation device 210. Is provided.
  • the ciphertext comparison apparatus 220 uses the first ciphertext, the first identifier, the first derivation key, the second ciphertext, and the second identifier, and the first document and the second ciphertext that are the source of the first ciphertext.
  • a ciphertext comparison unit 221 is provided that determines the magnitude relationship with the second document that is the source of the sentence without changing the ciphertext.
  • FIG. 6 illustrates an example in which the following two ciphertexts are compared.
  • the ciphertext comparison unit 221 includes a maximum mismatch counter determination unit 611, a relative value restoration unit 612, and a relative value comparison determination unit 613.
  • the relative value restoration unit 612 uses the identifier ID 203, the identifier ID relative value ciphertext F 503, and the identifier ID ′ for the e and e ′ where e, e′ ⁇ ⁇ 0,1,2 ⁇ in the maximum mismatch counter r.
  • F [r] Hash3 (1, ID, d [r + 1]) + e mod 3f ′
  • [r] Hash3 (1, ID ′, Check if d [r + 1]) + e 'mod 3 holds. Then, a set 604 of relative values composed of e and e ′ when it is satisfied is generated.
  • the relative value comparison / determination unit 613 indicates that the document with the identifier ID is larger than the document with the identifier ID ′ (for example, “0”). ") Is output as the determination result R209.
  • a signal for example, “1” indicating that the document with the identifier ID ′ is larger than the document with the identifier ID is output as the determination result R209.
  • FIG. 7 is a block diagram illustrating a hardware configuration of the ciphertext generation apparatus 210 according to the present embodiment.
  • a CPU 710 is an arithmetic control processor, and implements each functional component of the ciphertext generation apparatus 210 in FIG. 2A by executing a program.
  • the ROM 720 stores initial data and fixed data such as programs and programs.
  • the communication control unit 730 communicates with a service server as the ciphertext comparison apparatus 220 via a network. Note that the number of CPUs 710 is not limited to one, and may be a plurality of CPUs or may include a GPU for image processing.
  • the RAM 740 is a random access memory that the CPU 710 uses as a temporary storage work area. In the RAM 740, an area for storing data necessary for realizing the present embodiment is secured.
  • the variable storage unit 741 is a plain text document or ciphertext to be processed by the CPU 710, a key, or a temporary storage unit such as counters i and j.
  • the ciphertext generation table 742 is a table used for generating the ciphertext of this embodiment from the data and parameters of the variable storage unit 741.
  • the input / output data storage unit 743 stores input / output data input / output via the input / output interface 760.
  • the transmission / reception data storage unit 744 stores transmission / reception data transmitted / received via the communication control unit 730.
  • the storage 750 stores a database, various parameters, or the following data or programs necessary for realizing the present embodiment.
  • the data storage area 751 stores data necessary for processing of the communication terminal as the ciphertext generation apparatus 210 of the present embodiment.
  • the data storage area 751 stores the encryption algorithm 752 of this embodiment.
  • the encryption algorithm 752 includes hash functions such as Hash, Hash2, and Hash3.
  • the storage 750 stores the following programs.
  • the communication terminal control program storage area 753 stores a communication terminal control program.
  • the derived key generation module 754 is a module that generates a derived key using the main key and the document to be encrypted.
  • the auxiliary derivation key generation module 755 is a module that generates an auxiliary derivation key using the main key, the document to be encrypted, and the derivation key.
  • the identifier-specific ciphertext generation module 756 is a module that generates an identifier-specific ciphertext using the derivation key, the auxiliary derivation key, and the document identifier.
  • the relative value ciphertext generation module 757 is a module that generates a relative value ciphertext using the main key, the document to be encrypted, the derivation key, the auxiliary derivation key, and the document identifier.
  • the input / output interface 760 interfaces input / output data with input / output devices.
  • a display unit 761 Connected to the input / output interface 760 are a display unit 761, an operation unit 762 such as a keyboard, a touch panel, and a pointing device, and another peripheral device 763 of the communication terminal.
  • a voice input / output unit such as a speaker or a microphone, a GPS (Global Positioning System) position generation unit, a camera, or the like can be connected.
  • GPS Global Positioning System
  • RAM 740 and the storage 750 in FIG. 7 do not show programs and data related to general-purpose functions and other feasible functions of the ciphertext generation apparatus.
  • FIG. 8 is a diagram showing a configuration of the ciphertext generation table 742 according to the present embodiment.
  • the ciphertext generation table 742 is used to generate a ciphertext to be transmitted from the document to be encrypted to the ciphertext comparison device.
  • the ciphertext generation table 742 stores the document M202 and the main key K201 in association with the identifier ID203.
  • the ciphertext generation table 742 stores the derived derivation key D204 and the auxiliary derivation key G205 in association with the identifier ID203. Further, the ciphertext generation table 742 stores ciphertexts C and F206 including the encrypted ciphertext C by identifier and the relative ciphertext F in association with the identifier ID203.
  • FIG. 9 is a flowchart showing a processing procedure of the ciphertext generation apparatus 210 according to the present embodiment. This flowchart is executed by the CPU 710 in FIG. 7 using the RAM 740, and implements each functional component of the ciphertext generation apparatus 210 in FIG. 2A. Note that the processing order of FIG. 9 is not limited to this.
  • step S901 the ciphertext generation apparatus 210 generates a derived key D from the main key and the document to be encrypted.
  • step S903 the ciphertext generation apparatus 210 generates an auxiliary derivation key G from the main key, the document to be encrypted, and the derivation key.
  • step S905 the ciphertext generating apparatus 210 generates an identifier-specific ciphertext C from the identifier of the document to be encrypted, the derivation key, and the auxiliary derivation key.
  • step S907 the ciphertext generation apparatus 210 generates a relative value ciphertext F from the main key, the document to be encrypted, the identifier of the document to be encrypted, and the derived key.
  • step S909 the ciphertext generating apparatus 210 outputs a ciphertext composed of the identifier-specific ciphertext C and the relative value ciphertext F.
  • FIG. 10A is a flowchart showing a procedure of derived key generation processing (S901) according to the present embodiment.
  • step S1013 the ciphertext generation apparatus 210 decrements the counter i by one.
  • step S1015 the ciphertext generation apparatus 210 extracts the block b [i] from the document M202.
  • FIG. 10B is a flowchart showing a procedure of auxiliary derivation key generation processing (S903) according to the present embodiment.
  • step S1033 the ciphertext generation apparatus 210 extracts the element d [j + 1] of the derived key D204.
  • step S1035 the ciphertext generation apparatus 210 extracts the block element b [j] from the document M202 and inverts it to 1-b [j].
  • step S1039 the ciphertext generation apparatus 210 increments the counter j by one.
  • FIG. 10C is a flowchart showing the procedure of the identifier-specific ciphertext generation process (S905) according to the present embodiment.
  • the ciphertext generation apparatus 210 decrements the counter p by one in step S1053.
  • step S1055 the ciphertext generating apparatus 210 randomly selects a candidate for the element c [p] from ⁇ 0, 1 ⁇ L [p] based on the safety variable (L [p] ⁇ natural number).
  • FIG. 10D is a flowchart illustrating a procedure of relative value ciphertext generation processing (S907) according to the present embodiment.
  • step S1077 the ciphertext generation apparatus 210 increments the counter q by one.
  • FIG. 11 is a block diagram showing a hardware configuration of the ciphertext comparison apparatus 220 according to the present embodiment.
  • a CPU 1110 is an arithmetic control processor, and implements each functional component of the ciphertext comparison apparatus 220 of FIG. 2A by executing a program.
  • the ROM 1120 stores fixed data and programs such as initial data and programs.
  • the communication control unit 1130 communicates with a communication terminal as the ciphertext generation apparatus 210 via a network.
  • the CPU 1110 is not limited to one, and may be a plurality of CPUs or may include a GPU for image processing.
  • the RAM 1140 is a random access memory that the CPU 1110 uses as a work area for temporary storage.
  • the RAM 1140 has an area for storing data necessary for realizing the present embodiment.
  • the variable storage unit 1141 is a temporary storage unit such as a ciphertext, an identifier or a relative value to be processed by the CPU 1110, or a counter r.
  • the ciphertext comparison table 1142 is a table used to compare the ciphertext of this embodiment from the data and parameters of the variable storage unit 1141.
  • the transmission / reception data storage unit 1143 stores transmission / reception data transmitted / received via the communication control unit 1130.
  • the storage 1150 stores a database, various parameters, or the following data or programs necessary for realizing the present embodiment.
  • the data storage area 1151 stores data necessary for processing of the service server as the ciphertext comparison apparatus 220 of this embodiment.
  • the data storage area 1151 stores the service information DB 1152 and the ciphertext comparison algorithm 1153 of this embodiment.
  • the service information DB 1152 stores service information that is retrieved and provided as ciphertext.
  • the ciphertext comparison algorithm 1153 includes hash functions such as Hash, Hash2, and Hash3.
  • the storage 1150 stores the following programs.
  • the service server control program storage area 1154 stores a service server control program.
  • the ciphertext comparison module 1155 includes the following three modules.
  • the relative value restoration module 1157 uses the identifier ID, the derivation key D for the identifier ID, the relative value ciphertext F for the identifier ID, the identifier ID ′, and the relative value ciphertext F ′ for the identifier ID ′, This is a module that restores a set of values e and e ′.
  • the relative value comparison / determination module 1158 is a module that compares and determines the magnitude relationship between the document with the identifier ID and the document with the identifier ID ′ from the set of relative values e and e ′ without changing the ciphertext.
  • RAM 1140 and storage 1150 in FIG. 11 do not show programs and data related to general-purpose functions and other realizable functions of the ciphertext comparison apparatus.
  • FIG. 12 is a diagram showing a configuration of the ciphertext comparison table 1142 according to the present embodiment.
  • the ciphertext comparison table 1142 is used to compare and determine the magnitude relationship between the document with the identifier ID and the document with the identifier ID ′ without changing the ciphertext.
  • the ciphertext comparison table 1142 is associated with the document identifier 1201 and is used for size determination, and is a ciphertext 1203 composed of a derivation key 1202, a ciphertext for each identifier of ID and ID ′, and a relative ciphertext. And remember. Further, the ciphertext comparison table 1142 stores a maximum mismatch counter r603, a pair of relative values e and e'604, and a determination result R209 in association with a set of documents to be compared.
  • the ciphertext comparison table 1142 may store the ciphertext that is the obtained comparison result as the determination result notification ciphertext 1204.
  • FIG. 12 also shows the ciphertext 1210 with the identifier ID and the ciphertext 1220 with the identifier ID ′ acquired by the ciphertext comparison unit 221 for use in the ciphertext comparison table 1142.
  • FIG. 13 is a flowchart illustrating a processing procedure of the ciphertext comparison apparatus 220 according to the present embodiment. This flowchart is executed by the CPU 1110 of FIG. 11 using the RAM 1140, and implements each functional component of the ciphertext comparison apparatus 220 of FIG. 2A.
  • step S1305 the ciphertext comparison device 220 compares the relative values based on the set of relative values consisting of e and e ′.
  • a different ciphertext is generated by a different identifier even if a part of the document is the same.
  • the size of the documents can be compared while maintaining the concealment of the different documents.
  • the identifier-specific ciphertext based on the identifier is generated according to the two conditions using the derivation key and the auxiliary derivation key, the documents are compared in size while maintaining the concealment of different encrypted documents. be able to.
  • a comparison method of this embodiment is used to determine whether the prefix of the corresponding plaintext matches between the ciphertext and this ciphertext. Can be determined. That is, if the i-th or more bits of two plaintexts match from the derived key positive test, the i-th bit of the identifier-specific ciphertext using the derived key for one ciphertext passes the derived key positive test. If the i + 1th bit or more matches, but the i-th bit does not match, the other ciphertext (ciphertext B) using the derivation key of one ciphertext (ciphertext A) is used.
  • the present embodiment when a ciphertext obtained by encrypting numerical data is given, it is possible to suppress comparison of the magnitudes of the original numerical data only from these ciphertexts.
  • the present embodiment when a request is made from a regular user for a numerical ciphertext corresponding to a certain numerical ciphertext to the database, the original character string included in the different ciphertext encrypted Can be compared with the numerical data.
  • the database user is larger than a specific encrypted numerical value included in the database (or without being known to the administrator or the like by the administrator or the like).
  • (Small) numerical data can be acquired.
  • character strings for example, prefix character strings
  • a third party who does not know the key for encryption is based on the matching of the prefix character strings.
  • finding plaintext corresponding to the ciphertext can be effectively suppressed.
  • a third party who does not know the encryption key obtains specific numerical data using the magnitude relationship between the numerical data constituting the database and the encrypted numerical data in the database. It is possible to suppress extraction or acquisition. Thereby, the security of the data contained in a database can be improved effectively.
  • the present invention may be applied to a system composed of a plurality of devices, or may be applied to a single device. Furthermore, the present invention can also be applied to a case where a control program that realizes the functions of the embodiments is supplied directly or remotely to a system or apparatus. Therefore, in order to realize the functions of the present invention on a computer, a control program installed in the computer, a medium storing the control program, and a WWW (Worl, Wid, Web) server for downloading the control program are also included in the present invention. Included in the category.
  • non-transitory computer-readable medium non-transitor, compute, readabl, medium
  • control program for causing a computer to execute the processing steps included in the above-described embodiments
  • the ciphertext generation apparatus according to any one of items 1 to 3.
  • a derived key generation step for generating a derived key based on the primary key and the document;
  • An auxiliary derivation key generating step for generating an auxiliary derivation key based on the main key, the document, and the derivation key;
  • An identifier-specific ciphertext generation step for generating an identifier-specific ciphertext obtained by encrypting the identifier based on the document identifier, the derivation key, and the auxiliary derivation key;
  • Including A method for controlling a ciphertext generation apparatus that uses a character string including the identifier-specific ciphertext and the relative value ciphertext as a ciphertext for the document.
  • a derived key generation step for generating a derived key based on the primary key and the document;
  • An auxiliary derivation key generating step for generating an auxiliary derivation key based on the main key, the document, and the derivation key;
  • An identifier-specific ciphertext generation step for generating an identifier-specific ciphertext obtained by encrypting the identifier based on the document identifier, the derivation key, and the auxiliary derivation key;
  • a control program for a ciphertext generation apparatus that causes a computer to execute
  • a control program for a ciphertext generating apparatus that uses a character string including the identifier-specific ciphertext and the relative-value ciphertext as a ciphertext for the
  • a ciphertext comparison apparatus comprising: (Appendix 8)
  • the equation 0 Hash (ID ′, d [r] , c ′ [r]) is satisfied, and r which is not satisfied for the first time is defined as a maximum mismatch counter r,
  • the relative value restoring means relates to the first identifier ID and the derived key element d [r + 1] with respect to e, e ′ where e, e′ ⁇ ⁇ 0, 1, 2 ⁇ .
  • a method for controlling a ciphertext comparison apparatus including: (Appendix 10) A first ciphertext acquisition step of acquiring a first ciphertext, a first identifier, and a first derivation key encrypted by the ciphertext generation apparatus according to
  • (Appendix 11) Derived key generation means for generating a derived key based on the primary key and the document; Auxiliary derivation key generating means for generating an auxiliary derivation key based on the main key, the document, and the derivation key; Based on the identifier of the document, the derivation key, and the auxiliary derivation key, an identifier-specific ciphertext generation unit that generates an identifier-specific ciphertext obtained by encrypting the identifier; Relative value ciphertext generating means for generating a relative value ciphertext obtained by encrypting a relative value generated from the main key, the document, and the derived key based on the identifier and the derived key; A first derivation key generated from the first document by the derivation key generation unit; a first identifier of the first document; and a cipher by first identifier obtained by encrypting the first identifier by the ciphertext generation unit by identifier.
  • the relative ciphertext generating unit includes a first ciphertext having a first relative value ciphertext obtained by encrypting a first relative value, a second identifier of a second document, and the identifier-specific ciphertext generating unit includes the first ciphertext generating unit.
  • a second ciphertext having a second identifier cipher that encrypts two identifiers and a second relative value ciphertext in which the relative value ciphertext generating means encrypts a second relative value.
  • Ciphertext comparison means for determining the magnitude relationship between the first document that is the source of the ciphertext and the second document that is the source of the second ciphertext without changing the ciphertext;
  • a ciphertext comparison system comprising: (Appendix 12) A derived key generation step for generating a derived key based on the primary key and the document; An auxiliary derivation key generating step for generating an auxiliary derivation key based on the main key, the document, and the derivation key; An identifier-specific ciphertext generation step for generating an identifier-specific ciphertext obtained by encrypting the identifier based on the document identifier, the derivation key, and the auxiliary derivation key; A relative value ciphertext generating step of generating a relative value ciphertext obtained by encrypting a relative value generated from the main key, the document, and the derived key based on the identifier and the derived key; A first derivation key generated from the
  • a ciphertext comparison step for determining a magnitude relationship between the first document that is the source of the ciphertext and the second document that is the source of the second ciphertext without changing the ciphertext;
  • Ciphertext comparison method including (Appendix 13) Derived key generation means for generating a derived key based on the primary key and the document;
  • the element d of the derived key is Hash (K, (d [i + 1], b [i])) according to the first hash function Hash: ⁇ 0,1 ⁇ * ⁇ ⁇ 0,1 ⁇ k Generate [i]

Abstract

 本発明の装置は、暗号化された数値の大小比較をすることができると共に、隠匿性を維持して情報の漏洩する機会を大幅に減らす暗号文生成装置である。この暗号文生成装置は、主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成部と、主鍵と文書と導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成部と、文書の識別子と導出鍵と補助導出鍵とに基づいて、識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成部と、識別子記導出鍵とに基づいて、主鍵と文書と導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成部と、を備え、識別子別暗号文と相対値暗号文とを含む文字列を文書に対する暗号文とする。

Description

[規則37.2に基づきISAが決定した発明の名称] 暗号文比較システム
 本発明は、暗号文比較システム、暗号文比較方法、暗号文生成装置と暗号文比較装置およびそれらの制御プログラムに関する。
 上記技術分野において、非特許文献1には、次のような、暗号化された数値の大小比較をする技術が開示されている。平文としてのある数値Mと、鍵Kとが与えられたとき、その暗号文Cはある暗号化関数Encを用いてC=Enc(K,M)として生成される。この時、任意のM>M’なる2つの数MとM’とに関して、Enc(K,M)>Enc(K,M’)が成り立つ。すなわち、C=Enc(K,M)とC’=Enc(K,M’)とが与えられると、暗号文CやC’を復号せずとも数値Mと数値M’との大小関係を知ることができる。
 また、非特許文献2には、次のような、暗号化された数値の大小比較をする技術が開示されている。非特許文献2は、共通鍵暗号の一種であり、M=(b[1],…,b[n]) のように複数のブロックに分割して表現される平文である文書Mを暗号化して、C=(c[1],…,c[n])のように複数のブロックからなる暗号文を生成する。そして、もし2つの平文が最初のk個まで同一であるならば、それらの暗号文も最初のk個まで等しいものとなる。このように、部分的な一致を暗号文のまま判別できる方式となっている。
Alexandra Boldyreva, Nathan Chenette, Younho Lee, Adam O'Neill: "Order-Preserving Symmetric Encryption. EUROCRYPT" 2009: 224-241 Georgios Amanatidis, Alexandra Boldyreva, Adam O'Neill: "Provably-Secure Schemes for Basic Query Support in Outsourced Databases". DBSec 2007: 14-30
 しかしながら、上記文献に記載の技術では、暗号化された数値の大小比較をすることができても、情報の漏洩する機会を期待するほど減らすことができなかった。非特許文献1の技術においては、暗号文の列が与えられると、鍵に関する知識を全く持たずとも直ちにその対応する平文の大小関係が全て分かってしまう問題がある。また、非特許文献1の方式が暗号化の前後でデータの順序を保存させることの要請から、暗号文から平文のおよその大きさが分かってしまう問題がある。
 さらに、データベースの運用において、様々な属性を持つタップルの集合である表の中から、ある属性がある数より大きいあるいは小さい数であるタップルを全て送り返すことを、利用者がデータベースに要求することがある。ここで、データベースが非特許文献1の方法で暗号化されていれば、データベースは暗号化に使われた鍵を知らずとも数値の大小を判定できるため、利用者の要求に応えることができる。しかし、データベースは、利用者の要求があったときのみ数値の大小が判定できれば十分であるのに、要求がなくともこれが可能である。この不必要な能力は、データベースから情報の漏洩する機会を増加させることになる。
 一方、非特許文献2においては、暗号文の最初のk個の一致を知ることができても、大小を直接判別することはできなかった。そのため、最初のk個の一致する、候補となる暗号文を全て送らねばならなかった。また、2つの暗号文の最初のk個が一致することは暗号化のための鍵を保持せずとも直接行うことができるので、これをデータベースに用いた場合、データベースから情報の漏洩する機会を増加させることになる。
 本発明の目的は、上述の課題を解決するため、暗号化された数値の大小比較をすることができると共に、隠匿性を維持して情報の漏洩する機会を大幅に減らすことができる技術を提供することにある。
 上記目的を達成するため、本発明に係る暗号文生成装置は、
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成手段と、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成手段と、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成手段と、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成手段と、
 を備え、
 前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする。
 上記目的を達成するため、本発明に係る暗号文生成装置の制御方法は、
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
 を含み、
 前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする。
 上記目的を達成するため、本発明に係る暗号文生成装置の制御プログラムは、
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
 をコンピュータに実行させる暗号文生成装置の制御プログラムであって、
 前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする。
 上記目的を達成するため、本発明に係る暗号文比較装置は、
 上記暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得手段と、
 上記暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得手段と、
 前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較手段と、
 を備える。
 上記目的を達成するため、本発明に係る暗号文比較装置の制御方法は、
 上記暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得ステップと、
 上記暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得ステップと、
 前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
 を含む。
 上記目的を達成するため、本発明に係る暗号文比較装置の制御プログラムは、
 上記暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得ステップと、
 上記暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得ステップと、
 前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
 をコンピュータに実行させる。
 上記目的を達成するため、本発明に係る暗号文比較システムは、
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成手段と、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成手段と、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成手段と、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成手段と、
 前記導出鍵生成手段が第1文書から生成した第1導出鍵と、前記第1文書の第1識別子と、前記識別子別暗号文生成手段が前記第1識別子を暗号化した第1識別子別暗号と前記相対値暗号文生成手段が第1相対値を暗号化した第1相対値暗号文とを有する第1暗号文と、第2文書の第2識別子と、前記識別子別暗号文生成手段が前記第2識別子を暗号化した第2識別子別暗号と前記相対値暗号文生成手段が第2相対値を暗号化した第2相対値暗号文とを有する第2暗号文と、を用いて、前記第1暗号文の元である前記第1文書と前記第2暗号文の元である前記第2文書との大小関係を暗号文のままで判定する暗号文比較手段と、
 を備える。
 上記目的を達成するため、本発明に係る暗号文比較方法は、
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
 前記導出鍵生成ステップにおいて第1文書から生成した第1導出鍵と、前記第1文書の第1識別子と、前記識別子別暗号文生成ステップにおいて前記第1識別子を暗号化した第1識別子別暗号と前記相対値暗号文生成ステップにおいて第1相対値を暗号化した第1相対値暗号文とを有する第1暗号文と、第2文書の第2識別子と、前記識別子別暗号文生成ステップにおいて前記第2識別子を暗号化した第2識別子別暗号と前記相対値暗号文生成ステップにおいて第2相対値を暗号化した第2相対値暗号文とを有する第2暗号文と、を用いて、前記第1暗号文の元である前記第1文書と前記第2暗号文の元である前記第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
 を含む。
 本発明によれば、暗号化された数値の大小比較をすることができると共に、隠匿性を維持して情報の漏洩する機会を大幅に減らすことができる。
本発明の第1実施形態に係る暗号文生成装置の構成を示すブロック図である。 本発明の第2実施形態に係る暗号文生成装置を含む暗号文比較システムの構成を示すブロック図である。 本発明の第2実施形態に係る暗号文生成装置を含む暗号文比較システムを適用したサービスを示す図である。 本発明の第2実施形態に係る暗号文生成装置の導出鍵生成部の構成を示すブロック図である。 本発明の第2実施形態に係る暗号文生成装置の補助導出鍵生成部の構成を示すブロック図である。 本発明の第2実施形態に係る暗号文生成装置の暗号文生成部の構成を示すブロック図である。 本発明の第2実施形態に係る識別子別暗号文生成部の構成を示すブロック図である。 本発明の第2実施形態に係る暗号文比較装置の暗号文比較部の構成を示すブロック図である。 本発明の第2実施形態に係る暗号文生成装置のハードウェア構成を示すブロック図である。 本発明の第2実施形態に係る暗号文生成テーブルの構成を示す図である。 本発明の第2実施形態に係る暗号文生成装置の処理手順を示すフローチャートである。 本発明の第2実施形態に係る導出鍵生成処理の手順を示すフローチャートである。 本発明の第2実施形態に係る補助導出鍵生成処理の手順を示すフローチャートである。 本発明の第2実施形態に係る識別子別暗号文生成処理の手順を示すフローチャートである。 本発明の第2実施形態に係る相対値暗号文生成処理の手順を示すフローチャートである。 本発明の第2実施形態に係る暗号文比較装置のハードウェア構成を示すブロック図である。 本発明の第2実施形態に係る暗号文比較テーブルの構成を示す図である。 本発明の第2実施形態に係る暗号文比較装置の処理手順を示すフローチャートである。 本発明の前提技術となる暗号化装置の構成を示すブロック図である。 本発明の前提技術となる暗号化装置の処理手順を示すフローチャートである。
 以下に、図面を参照して、本発明の実施の形態について例示的に詳しく説明する。ただし、以下の実施の形態に記載されている構成要素は単なる例示であり、本発明の技術範囲をそれらのみに限定する趣旨のものではない。
 [第1実施形態]
 本発明の第1実施形態としての暗号文生成装置100について、図1を用いて説明する。暗号文生成装置100は、暗号文のままで大小比較するための暗号文を生成する装置である。
 図1に示すように、暗号文生成装置100は、導出鍵生成部110と、補助導出鍵生成部120と、識別子別暗号文生成部130と、相対値暗号文生成140と、を含む。導出鍵生成部110は、主鍵101と文書102とに基づいて、導出鍵104を生成する。補助導出鍵生成部120は、主鍵101と文書102と導出鍵104とに基づいて、補助導出鍵105を生成する。識別子別暗号文生成部130は、文書102の識別子103と導出鍵104と補助導出鍵105とに基づいて、識別子103を暗号化した識別子別暗号文106を生成する。相対値暗号文生成140は、識別子103と導出鍵104とに基づいて、主鍵101と文書102と導出鍵104とから生成された相対値107を暗号化した相対値暗号文108を生成する。そして、暗号文生成装置100は、識別子別暗号文106と相対値暗号文108とを含む文字列を文書102に対する暗号文109とす。
 本実施形態によれば、導出鍵と補助導出鍵とを生成して暗号文生成に使用することにより、暗号化された数値の大小比較をすることができると共に、数値データの隠匿性を維持して情報の漏洩する機会を大幅に減らすことができる。
 [第2実施形態]
 次に、本発明の第2実施形態に係る暗号文生成装置と、暗号文生成装置と暗号文比較装置とを含む暗号文比較システムについて説明する。本実施形態の暗号文比較システムにおいては、導出鍵生成部が、主鍵と文書とに基づいて、導出鍵を生成する。また、補助導出鍵生成部が、主鍵と文書と導出鍵とに基づいて、補助導出鍵を生成する。また、識別子別暗号文生成部が、文書の識別子と導出鍵と補助導出鍵とに基づいて、識別子を暗号化した識別子別暗号文を生成する。相対値暗号文生成部が、識別子と導出鍵とに基づいて、主鍵と文書と導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する。そして、暗号文比較部が、第1文書から生成した第1導出鍵と、第1文書の第1識別子と、第1識別子を暗号化した第1識別子別暗号と第1相対値を暗号化した第1相対値暗号文とを有する第1暗号文と、第2文書の第2識別子と、第2識別子を暗号化した第2識別子別暗号と第2相対値を暗号化した第2相対値暗号文とを有する第2暗号文と、を用いて、第1暗号文の元である第1文書と第2暗号文の元である第2文書との大小関係を暗号文のままで判定する。
 なお、導出鍵生成部と、補助導出鍵生成部と、識別子別暗号文生成部と、相対値暗号文生成部とを暗号文生成装置が備え、暗号文比較部を暗号文比較装置が備える。しかし、暗号文生成装置と暗号文比較装置とは別の装置でなく、1つに併合された装置であってもよい。
 《前提技術》
 本実施形態の技術を説明する前に、その前提技術である非特許文献2の技術の概要を説明する。
 図14は、前提技術となる暗号化装置1410の構成を示すブロック図である。また、図15は、前提技術となる暗号化装置1410の処理手順を示すフローチャートである。
 鍵K1401と、平文としてのある文書M1402がM=(b[1],…,b[n])で与えられたとき、暗号文C”1405を次のように生成する。なお、C[0]=0とする。t=1,…,nに関してb[t]1403を選びだし(S1501)、鍵1401と暗号文のt-1番目のブロックc[t-1]1405も併せて利用して、ハッシュ関数等で実現される導出部1411を再帰的に用いて、暗号文のt番目のブロック要素c[t]1404を、c[t]=Hash(K,(c[t-1],b[t]))により計算する(S1502)。暗号文C”1406をC”(c[1],…,c[n])とする。暗号文C”の最初のk個のブロック要素=(c[1],…,c[k])を、暗号文C”の接頭kブロック要素とよび、C”[k]と表すとする。この時、もし2つの平文が最初のk個まで同一であるならば、それ平文の暗号文も最初k個まで等しいものとなる。このように、部分的な一致を暗号文のまま判別できる。なお、あるkに関して最初のk個のブロック要素が2つの平文で一致するとき、一致する接頭がある、あるいは、k個の接頭が一致すると言うこととする。
 この暗号方式を使って暗号文の順序を比較する場合、特に複数の数の暗号文の集合から、ある数値aより小さな数を暗号化した暗号文を復号することなく全て選びだしたい場合には、次のようにする。あるkに関して、数値aより小さな数の暗号文の接頭と比較対象の暗号文のk個の接頭が一致するが、数値aより大きな数の暗号文の接頭と比較対象の暗号文のk個の接頭は一致しない、暗号文C”の接頭kブロック要素C”[k]の全ての集合をP(a)とする。この集合の大きさは数値aより小さい数の個数より小さい。鍵を保持するものがP(a)を生成して、複数の暗号文の集合を保持するものに渡せば、後者は暗号文を復号することなくその所持する暗号文の集合から数値aより小さな数を暗号化した暗号文を選びだすことができる。
 (前提技術の課題)
 しかしながら、前提技術においては、暗号文の最初のk個の一致を知ることができても、大小を直接判別することはできない。そのため、最初のk個の一致する、候補となる暗号文を全て送らねばならない。また、2つの暗号文の最初のk個が一致する判定は暗号化のための鍵を保持せずとも直接行うことができるので、これをデータベースに用いた場合、データベースから情報の漏洩する機会を増加させることになる。
 以下の本実施形態の暗号方式によれば、暗号化された数値の列が与えられているとき、これらの数値だけからはそれらの大小を比較することはできないが、ある数値の暗号文に関して対応する比較の要求文を用いると、この暗号化された数値と列中の暗号化された数値との大小比較が可能になる。
 《本実施形態で使用される関数および変数の定義》
 まず、本実施形態で使用される関数および変数を定義する。文書には、全て識別子が割り当てられているとする。識別子と文書の組を(ID,M)のように表す。文書Mを、2進展開して、M=Σi=0 n-1b[i]×2iとなるようなb[i]∈{0,1}を用いM=(b[0],b[1],…,b[n-1])と書き記すとする。ここで、nは文書Mのビット長である。ここで、kを安全変数とする。
 本実施形態で用いるハッシュ関数Hash, Hash3, Hash2 をそれぞれ、Hash: {0,1}* →{0,1}k, Hash3:{0,1}* →{0,1,2}, Hash2:{0,1}* →{0,1} とする。
 また、K∈{0,1}kを主鍵とする。各p=0,…,n-1 に関して、安全変数L[p]∈自然数、が定義されているとする。
 《暗号文比較システム》
 図2Aおよび図2Bを参照して、本実施形態の暗号文生成装置210について説明する。
 (システム構成)
 図2Aは、本実施形態に係る暗号文生成装置210を含む暗号文比較システム200の構成を示すブロック図である。暗号文比較システム200は、暗号文生成装置210と暗号文比較装置220とを含む。
 暗号文生成装置210は、導出鍵生成部211と、補助導出鍵生成部212と、暗号文生成部213とを備える。導出鍵生成部211は、主鍵K201と文書M202とに基づいて導出鍵D204を生成する。補助導出鍵生成部212は、主鍵K201と文書M202と導出鍵D204とに基づいて補助導出鍵G205を生成する。暗号文生成部213は、主鍵K201と文書M202と導出鍵D204と補助導出鍵G205と識別子ID203とに基づいて、暗号文C,F206を生成する。なお、識別子ID203は、文書M202の識別子である。
 暗号文生成装置210は、暗号文比較装置220に対して、識別子ID203と暗号文C,F206と導出鍵D204とを通知する。なお、暗号文生成装置210と暗号文比較装置220とは、その間を通信回線で接続していても、あるいは、一体化した装置であってもよい。また、通信回線は無線であっても有線であってもよい。
 暗号文比較装置220は、暗号文比較部221を備える。暗号文比較部221は、暗号文生成装置210から、文書M202の識別子ID203、暗号文C,F206および導出鍵D204を取得する。暗号文比較部221は、識別子ID203、暗号文C,F206および導出鍵D204と、他の文書M’の識別子ID’207およびその暗号文C’,F’208とに基づいて、暗号文のままで文書Mと文書M’との大小関係を比較する。そして、暗号文比較部221は、暗号文比較部221の判定結果R209を出力する。
 (暗号文比較システムを適用したサービス)
 図2Bは、本実施形態に係る暗号文生成装置210を含む暗号文比較システム200を適用したサービスを示す図である。なお、図2Bには、暗号文比較装置220としてのサービスサーバが保持するサービスを、暗号文生成装置210としての通信端末から暗号文で要求すると、要求されたサービスを暗号文のままで比較することで検索して応答する例を示す。
 暗号文比較システム200は、ネットワーク240を介して接続された、暗号文生成装置210としての複数の通信端末と、暗号文比較装置220としてのサービスサーバとを備える。また、暗号文比較システム200は、細かい破線で示したように、サービスサーバがサービス情報データベース(以下、DB)に格納するサービス情報を提供するサービス情報提供サーバ230を備えてもよい。
 暗号文生成装置210としての複数の通信端末から、実線矢印で示したように、主鍵を用いて本実施形態の暗号化を行なったサービス要求文の暗号文がサービスサーバに送信される。このサービス要求文の暗号文には、サービス利用者250が漏洩を望まない個人情報が含まれる。暗号文比較装置220としてのサービスサーバの暗号文比較部221は、サービス利用者250から取得した個人情報を含むサービス要求文を暗号文のまま、サービス情報DBの同じ暗号化方式で暗号化されたサービス情報と比較して、検索をする。見付かったサービス情報は、破線矢印のように、暗号文で暗号文生成装置210としての複数の通信端末に送信される。サービス情報の暗号文は主鍵を用いて復号され、サービス利用者250にサービス情報が提供される。
 このように、本実施形態を適用することで、暗号文のままで比較して検索が実行されるので、個人情報が漏洩する機会が無くなる。
 なお、本実施形態の適用例は、図2Bに限定されない。例えば、あらかじめサービス利用者250がサービスサーバに登録した暗号化情報も、暗号文のままでデータベースからのデータ検索や、受信情報の判定に使用されることになり、情報が漏洩する機会を無くすことができる。そのため、クラウドサーバでもあるサービスサーバへの個人情報の登録を安心して行なえることになる。
 《暗号文生成装置の機能構成》
 図3乃至図5Bを参照して、本実施形態の暗号文生成装置210の各構成要素の機能構成を順に説明する。
 (導出鍵生成部)
 図3は、本実施形態に係る暗号文生成装置210の導出鍵生成部211の機能構成を示すブロック図である。導出鍵生成部211は、主鍵と文書とに基づいて導出鍵を生成する。
 導出鍵生成部211は、導出部311を有する。導出部311の動作を次のようになる。主鍵K201と文書M202がM=(b[0],…,b[n-1])としてブロックごとに与えられた場合、導出鍵D204を次のように生成する。初期値として、要素d[n]=Kとする。カウンタi=n-1,…,0に関して降順に要素b[i]301を選びだし、主鍵K201と導出鍵Dの要素d[i+1]303も併せて利用して、導出部311を再帰的に用い、導出鍵Dの要素d[i]302を、d[i]=Hash(K,(d[i+1],b[i]))、により生成する。その繰り返しの結果として、導出鍵D204をD=(d[0],d[1],…,d[n-1])とする。
 (補助導出鍵生成部)
 図4は、本実施形態に係る暗号文生成装置210の補助導出鍵生成部212の機能構成を示すブロック図である。補助導出鍵生成部212は、主鍵と文書と導出鍵とに基づいて、補助導出鍵を生成する。
 補助導出鍵生成部212は、補助導出部411を有する。補助導出部411の動作を次のようになる。主鍵K201と文書M202のM=(b[0],…,b[n-1])、導出鍵D204のD=(d[0],d[1],…,d[n-1])が与えられたとき、補助導出鍵Gを、次のように生成する。カウンタj=0,…,n-1に関して昇順に、主鍵K201と、導出鍵Dのj+1番目の要素d[j+1]403と、文書Mのj番目の要素b[j]をビット反転した結果の1-b[j]401とを用いて、補助導出鍵Gのj番目の要素g[j]402を、g[j]=Hash(K,d[j+1],1-b[j])、により生成する。導出補助鍵GをG=(g[0],g[1],…,g[n-1])とする。
 (暗号文生成部)
 図5Aは、本実施形態に係る暗号文生成装置210の暗号文生成部213の機能構成を示すブロック図である。
 暗号文生成部213は、相対値生成部511と、識別子別暗号文生成部512と、相対値隠蔽部513とを有する。ここで、相対値生成部511と相対値隠蔽部513とは、相対値暗号文生成部を構成する。相対値暗号文生成部は、識別子と導出鍵とに基づいて、主鍵と文書と導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する。
 相対値生成部511は、カウンタq=0,…,n-1に関して昇順に相対値生成処理を繰り返し、主鍵K201と文書M202と導出鍵Dとを用いて、相対値の要素e[q]501を、e[q]=Hash3(0,K,d[q+1])+b[q] mod 3、により生成する。そして、相対値隠蔽部513は、d[n]=Kとして、カウンタq=0,…,n-1に関して相対値隠蔽処理を繰り返し、識別子ID203と導出鍵D204と相対値の要素e[q]501とを用いて、相対値暗号文の要素f[q]を、f[q]=Hash3(1,ID,d[q+1])+e[q] mod 3、により生成する。相対値暗号文F503をF=(f[0],…,f[n-1])とする。
 また、識別子別暗号文生成部512は、文書の識別子と導出鍵と補助導出鍵とに基づいて、識別子を暗号化した識別子別暗号文を生成する。すなわち、識別子別暗号文生成部512は、カウンタp=n-1,…,0に関して降順に、識別子ID203と導出鍵Dと補助導出鍵Gとを用いて、識別子別暗号文C502をC=(c[0],…,c[n-1])として生成する。
 そして、相対値生成部511は、暗号文C,F206をC,F=((c[0],…,c[n-1]),(f[0],…,f[n-1]))として出力する。
 (識別子別暗号文生成部)
 図5Bは、本実施形態に係る識別子別暗号文生成部512の機能構成を示すブロック図である。
 識別子別暗号文生成部512は、識別子別暗号文異常候補生成部521と導出鍵陽性検査部522と補助導出鍵陰性検査部523とを有する。識別子別暗号文生成部512は、識別子別暗号文C502を次のように生成する。識別子別暗号文異常候補生成部521は、カウンタp=n-1,…,0に関して、要素c[p]の候補をランダムに{0,1}L[p]から選ぶ。そして、次の2つの検査を通ることを確認する。どちらか一方でも通らなかったならばランダムに選んだ要素c[p]は一度破棄して、ランダムに新たな候補を選び直す。両検査に通ればこれを要素c[p]として採用する。導出鍵陽性検査部522は、導出鍵陽性検査として、識別子IDと導出鍵Dとを用いて、0=Hash2(ID,d[p],c[p]) mod 2が成り立つことを検査する。補助導出鍵陰性検査部523は、補助導出鍵陰性検査として、識別子IDと補助導出鍵Gとを用いて、1=Hash2(ID,g[p],c[p]) mod 2、が成り立つことを検査する。
 《暗号文比較装置の機能構成》
 図6は、本実施形態に係る暗号文比較装置220の暗号文比較部221の機能構成を示すブロック図である。
 暗号文比較装置220は、図示しないが、暗号文生成装置210により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得部を備える。また、暗号文比較装置220は、図示しないが、暗号文生成装置210と同様の暗号化機能を有する装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得部を備える。そして、暗号文比較装置220は、第1暗号文、第1識別子、第1導出鍵、第2暗号文および第2識別子を用いて、第1暗号文の元である第1文書と第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較部221を備える。
 図6においては、次の2つの暗号文を比較する例を説明する。識別子ID203の文書からは、本実施形態の暗号文生成方式で生成された、識別子ID203と、暗号文C,F=((c[0],…,c[n-1]),(f[0],…,f[n-1]))の内の相対値暗号文F=(f[0],…,f[n-1])と、導出鍵D204=(d[0],d[1],…,d[n-1])とが用いられる。比較対象としての識別子ID’207の文書からは、本実施形態の暗号文生成方式で生成された、識別子ID’207と、暗号文C’,F’=((c'[0],…,c'[n-1]),(f'[0],…,f'[n-1]))とが用いられる。
 暗号文比較部221は、最大不一致カウンタ決定部611と、相対値復元部612と、相対値比較判定部613とを備える。
 最大不一致カウンタ決定部611は、カウンタr=n-1から0まで降順に、識別子ID’207と、識別子IDの導出鍵D204と、識別子ID’の識別子別暗号文C’601とを用いて、等式0=Hash(ID',d[r],c’[r])、が成り立つかを確認していく。そして、始めてこの等式が成り立たなくなったカウンタrを最大不一致カウンタr603とする。
 相対値復元部612は、最大不一致カウンタrにおいて、e,e'∈{0,1,2}なるe,e'に関して、識別子ID203と、識別子IDの相対値暗号文F503と、識別子ID’と、識別子ID’の相対値暗号文F’602とを用いて、f [r]=Hash3(1,ID,d[r+1])+e mod 3f'[r]=Hash3(1,ID',d[r+1])+e' mod 3が成り立つかを確認する。そして、成り立つ場合のeとe'とからなる相対値の組604を生成する。
 相対値比較判定部613はeとe'との組に関して、e-e'=(1 mod 3)であれば、識別子IDの文書が識別子ID’の文書より大きいことを表す信号(例えば“0”)を判定結果R209として出力する。一方、e-e'=(2 mod 3)であれば、識別子ID’の文書が識別子IDの文書より大きいことを表す信号(例えば“1”)を判定結果R209として出力する。
 《暗号文生成装置のハードウェア構成》
 図7は、本実施形態に係る暗号文生成装置210のハードウェア構成を示すブロック図である。
 図7で、CPU710は演算制御用のプロセッサであり、プログラムを実行することで図2Aの暗号文生成装置210の各機能構成部を実現する。ROM720は、初期データおよびプログラムなどの固定データおよびプログラムを記憶する。また、通信制御部730は、ネットワークを介して暗号文比較装置220としてのサービスサーバと通信する。なお、CPU710は1つに限定されず、複数のCPUであっても、あるいは画像処理用のGPUを含んでもよい。
 RAM740は、CPU710が一時記憶のワークエリアとして使用するランダムアクセスメモリである。RAM740には、本実施形態の実現に必要なデータを記憶する領域が確保されている。変数記憶部741は、CPU710が処理する対象の平文の文書や暗号文、あるいは鍵など、あるいは、カウンタi,jなどの一時記憶部である。暗号文生成テーブル742は、変数記憶部741のデータおよびパラメータから本実施形態の暗号文を生成するために使用するテーブルである。入出力データ記憶部743は、入出力インタフェース760を介して入出力される入出力データを記憶する。送受信データ記憶部744は、通信制御部730を介して送受信される送受信データを記憶する。
 ストレージ750には、データベースや各種のパラメータ、あるいは本実施形態の実現に必要な以下のデータまたはプログラムが記憶されている。データ記憶領域751は、本実施形態の暗号文生成装置210としての通信端末の処理に必要なデータを記憶する。かかるデータ記憶領域751には、本実施形態の暗号化アルゴリズム752が記憶される。暗号化アルゴリズム752には、Hash,Hash2,Hash3などのハッシュ関数も含まれる。ストレージ750には、以下のプログラムが格納される。通信端末制御プログラム記憶領域753は、通信端末制御用のプログラムを記憶する。導出鍵生成モジュール754は、主鍵と暗号化する文書とを用いて導出鍵を生成するモジュールである。補助導出鍵生成モジュール755は、主鍵と暗号化する文書と導出鍵とを用いて補助導出鍵を生成するモジュールである。識別子別暗号文生成モジュール756は、導出鍵と補助導出鍵と文書の識別子とを用いて識別子別暗号文を生成するモジュールである。相対値暗号文生成モジュール757は、主鍵と暗号化する文書と導出鍵と補助導出鍵と文書の識別子とを用いて相対値暗号文を生成するモジュールである。
 入出力インタフェース760は、入出力機器との入出力データをインタフェースする。入出力インタフェース760には、表示部761と、キーボード、タッチパネル、ポインティンデバイスなどの操作部762と、本通信端末の他の周辺機器763とが接続される。さらに、スピーカやマイクなどの音声入出力部、GPS(Global Positioning System)位置生成部やカメラなどを接続することができる。
 なお、図7のRAM740やストレージ750には、暗号文生成装置が有する汎用の機能や他の実現可能な機能に関連するプログラムやデータは図示されていない。
 (暗号文生成テーブル)
 図8は、本実施形態に係る暗号文生成テーブル742の構成を示す図である。暗号文生成テーブル742は、暗号化される文書から暗号文比較装置に送信する暗号文を生成するために使用される。
 暗号文生成テーブル742は、識別子ID203と対応付けて、文書M202と主鍵K201とを記憶する。また、暗号文生成テーブル742は、識別子ID203と対応付けて、導出された導出鍵D204と補助導出鍵G205とを記憶する。さらに、暗号文生成テーブル742は、識別子ID203と対応付けて、暗号化された識別子別暗号文Cと相対値暗号文Fとを含む暗号文C,F206を記憶する。
 《暗号文生成装置の処理手順》
 図9は、本実施形態に係る暗号文生成装置210の処理手順を示すフローチャートである。このフローチャートは、図7のCPU710がRAM740を使用しながら実行し、図2Aの暗号文生成装置210の各機能構成部を実現する。なお、図9の処理順序はこれに限定されない。
 暗号文生成装置210は、ステップS901において、主鍵と暗号化する文書とから導出鍵Dを生成する。次に、暗号文生成装置210は、ステップS903において、主鍵と暗号化する文書と導出鍵とから補助導出鍵Gを生成する。暗号文生成装置210は、ステップS905において、暗号化する文書の識別子と、導出鍵および補助導出鍵とから識別子別暗号文Cを生成する。暗号文生成装置210は、ステップS907において、主鍵と、暗号化する文書と、暗号化する文書の識別子と、導出鍵とから相対値暗号文Fを生成する。そして、暗号文生成装置210は、ステップS909において、識別子別暗号文Cと相対値暗号文Fとからなる暗号文を出力する。
 (導出鍵生成処理)
 図10Aは、本実施形態に係る導出鍵生成処理(S901)の手順を示すフローチャートである。
 暗号文生成装置210は、ステップS1011において、降順の再帰ループを行なうためにカウンタi=nとする。暗号文生成装置210は、ステップS1013において、カウンタiを1つデクリメントする。暗号文生成装置210は、ステップS1015において、文書M202からブロックb[i]を抽出する。暗号文生成装置210は、ステップS1017において、主鍵K201と、ブロック鍵1011に記憶された1つ前の導出鍵の要素d[i+1]と、要素b[i]とを用いて、d[i]=Hash(K,(d[i+1],b[i]))、により導出鍵の要素d[i]を算出する。そして、算出された導出鍵の要素d[i]をブロック鍵1011に記憶する。暗号文生成装置210は、ステップS1019において、カウンタi=0か否かを判定し、i=0になるまでステップS1013~S1019を繰り返す。カウンタi=0になると、暗号文生成装置210は、ステップS1021において、導出鍵D=(d[0],d[1],…,d[n-1])を記憶する。
 (補助導出鍵生成処理)
 図10Bは、本実施形態に係る補助導出鍵生成処理(S903)の手順を示すフローチャートである。
 暗号文生成装置210は、ステップS1031において、昇順の再帰ループを行なうためにカウンタj=0とする。暗号文生成装置210は、ステップS1033において、導出鍵D204の要素d[j+1]を抽出する。暗号文生成装置210は、ステップS1035において、文書M202からブロック要素b[j]を抽出して、1-b[j]と反転する。暗号文生成装置210は、ステップS1037において、主鍵Kと、導出鍵の要素d[i+1]と、反転ブロック要素(1-b[i])とを用いて、g[j]=Hash(K,d[j+1],1-b[j])、により補助導出鍵の要素g[j]を算出する。そして、算出された補助導出鍵の要素g[j]をブロック鍵1021に記憶する。暗号文生成装置210は、ステップS1039において、カウンタjを1つインクリメントする。暗号文生成装置210は、ステップS1041において、カウンタj=nか否かを判定し、j=nになるまでステップS1033~S1041を繰り返す。カウンタj=nになると、暗号文生成装置210は、ステップS1043において、補助導出鍵G=(g[0],g[1],…,g[n-1])を記憶する。
 (識別子別暗号文生成処理)
 図10Cは、本実施形態に係る識別子別暗号文生成処理(S905)の手順を示すフローチャートである。
 暗号文生成装置210は、ステップS1051において、降順の再帰ループを行なうためにカウンタp=nとする。暗号文生成装置210は、ステップS1053において、カウンタpを1つデクリメントする。暗号文生成装置210は、ステップS1055において、安全変数(L[p]∈自然数)による{0,1}L[p]から要素c[p]の候補をランダムに選択する。暗号文生成装置210は、ステップS1057において、識別子IDと導出鍵Dとを用いて、ランダムに選択した要素c[p]が第1条件:0=Hash2(ID,d[p],c[p]) mod 2を満足しているか否かを判定する。第1条件を満たしてないのであれば、ステップS1055に戻って、他の要素c[p]をランダムに選択する。第1条件を満たしていれば、暗号文生成装置210は、ステップS1057において、識別子IDと補助導出鍵Gとを用いて、ランダムに選択した要素c[p]が第2条件:1=Hash2(ID,g[p],c[p]) mod 2を満足しているか否かを判定する。第2条件を満たしてないのであれば、ステップS1055に戻って、他の要素c[p]をランダムに選択する。第2条件を満たしていれば、暗号文生成装置210は、ステップS1061において、要素c[p]を識別子別暗号文Cの要素として採用する。暗号文生成装置210は、ステップS1063において、カウンタp=0か否かを判定し、p=0になるまでステップS1053~S1063を繰り返す。カウンタp=0になると、暗号文生成装置210は、ステップS1065において、識別子別暗号文C=(c[0],c[1],…,c[n-1])を記憶する。
 (相対値暗号文生成処理)
 図10Dは、本実施形態に係る相対値暗号文生成処理(S907)の手順を示すフローチャートである。
 暗号文生成装置210は、ステップS1071において、昇順の再帰ループを行なうためにカウンタq=0とする。暗号文生成装置210は、ステップS1073において、主鍵K201と導出鍵D204と暗号化する文書M202とを用いて、相対値の要素e[q]=Hash3(0,K,d[q+1])+b[q] mod 3、を算出する。次に、暗号文生成装置210は、ステップS1075において、識別子ID203と導出鍵D204とを用いて、相対値暗号文Fの要素f[i]=Hash3(1,ID,d[q+1])+e[q] mod 3、を算出する。暗号文生成装置210は、ステップS1077において、カウンタqを1つインクリメントする。暗号文生成装置210は、ステップS1079において、カウンタq=nか否かを判定し、q=nになるまでステップS1073~S1079を繰り返す。カウンタq=nになると、暗号文生成装置210は、ステップS1081において、相対値暗号文F=(f[0],f[1],…,f[n-1])を記憶する。
 《暗号文比較装置のハードウェア構成》
 図11は、本実施形態に係る暗号文比較装置220のハードウェア構成を示すブロック図である。
 図11で、CPU1110は演算制御用のプロセッサであり、プログラムを実行することで図2Aの暗号文比較装置220の各機能構成部を実現する。ROM1120は、初期データおよびプログラムなどの固定データおよびプログラムを記憶する。また、通信制御部1130は、ネットワークを介して暗号文生成装置210としての通信端末と通信する。なお、CPU1110は1つに限定されず、複数のCPUであっても、あるいは画像処理用のGPUを含んでもよい。
 RAM1140は、CPU1110が一時記憶のワークエリアとして使用するランダムアクセスメモリである。RAM1140には、本実施形態の実現に必要なデータを記憶する領域が確保されている。変数記憶部1141は、CPU1110が処理する対象の暗号文、識別子あるいは相対値など、あるいは、カウンタrなどの一時記憶部である。暗号文比較テーブル1142は、変数記憶部1141のデータおよびパラメータから本実施形態の暗号文を比較するために使用するテーブルである。送受信データ記憶部1143は、通信制御部1130を介して送受信される送受信データを記憶する。
 ストレージ1150には、データベースや各種のパラメータ、あるいは本実施形態の実現に必要な以下のデータまたはプログラムが記憶されている。データ記憶領域1151は、本実施形態の暗号文比較装置220としてのサービスサーバの処理に必要なデータを記憶する。かかるデータ記憶領域1151は、サービス情報DB1152と本実施形態の暗号文比較アルゴリズム1153とが記憶される。サービス情報DB1152には、暗号文のままで検索されて提供されるサービス情報が格納されている。暗号文比較アルゴリズム1153には、Hash,Hash2,Hash3などのハッシュ関数も含まれる。ストレージ1150には、以下のプログラムが格納される。サービスサーバ制御プログラム記憶領域1154は、サービスサーバ制御用のプログラムを記憶する。暗号文比較モジュール1155は、以下の3つのモジュールを含む。最大不一致カウンタ決定モジュール1156は、識別子IDの導出鍵Dと、識別子ID’と、識別子ID’の識別子別暗号文C’とを用いて、等式0=Hash(ID',d[r],c’[r])が成り立たなくなる最大の不一致となるカウンタを決定するモジュールである。相対値復元モジュール1157は、識別子IDと、識別子IDの導出鍵Dと、識別子IDの相対値暗号文Fと、識別子ID’と、識別子ID’の相対値暗号文F’とを用いて、相対値の組みe,e’を復元するモジュールである。相対値比較判定モジュール1158は、相対値の組みe,e’から識別子IDの文書と識別子ID’の文書との大小関係を暗号文のままで比較して判定するモジュールである。
 なお、図11のRAM1140やストレージ1150には、暗号文比較装置が有する汎用の機能や他の実現可能な機能に関連するプログラムやデータは図示されていない。
 (暗号文比較テーブル)
 図12は、本実施形態に係る暗号文比較テーブル1142の構成を示す図である。暗号文比較テーブル1142は、識別子IDの文書と識別子ID’の文書との大小関係を暗号文のままで比較して判定するために使用される。
 暗号文比較テーブル1142は、文書の識別子1201に対応付けて、大小判定に使用される、導出鍵1202と、IDおよびID’のそれぞれの識別子別暗号文と相対値暗号文とからなる暗号文1203とを記憶する。また、暗号文比較テーブル1142は、比較する文書の組みに対応付けて、最大不一致カウンタr603と、相対値の組みe,e’604と、判定結果R209とを記憶する。判定結果R209には、例えば、識別子IDの文書Mが識別子ID’の文書M’より大きいと判定されたら“1”をセットし、識別子ID’の文書M’が識別子IDの文書Mより大きいと判定されたら“0”をセットする。なお、判定結果の提示に制限はない。さらに、暗号文比較テーブル1142は、求められた比較結果となった暗号文を、判定結果通知暗号文1204として記憶してもよい。
 なお、図12には、暗号文比較テーブル1142に使用するため、暗号文比較部221が取得する識別子IDの暗号文1210と識別子ID’の暗号文1220とも図示している。
 《暗号文比較装置の処理手順》
 図13は、本実施形態に係る暗号文比較装置220の処理手順を示すフローチャートである。このフローチャートは、図11のCPU1110がRAM1140を使用しながら実行し、図2Aの暗号文比較装置220の各機能構成部を実現する。
 暗号文比較装置220は、ステップS1301において、識別子IDの導出鍵D204と識別子ID’207と識別子ID’の識別子別暗号文C’601とを用いて、最大不一致カウンタを決定する。すなわち、カウンタr=n-1から0まで降順に、等式0=Hash(ID',d[r],c’[r])、が成り立つかを確認していき、始めてこの等式が成り立たなくなったカウンタrを最大不一致カウンタとする。
 暗号文比較装置220は、ステップS1303において、識別子ID203と識別子IDの導出鍵D204と識別子IDの相対値暗号文F503と識別子ID’207と識別子ID’の相対値暗号文F’602とを用いて、相対値を復元する。すなわち、最大不一致カウンタrにおいて、e,e'∈{0,1,2}なるe,e'に関して、f [r]=Hash3(1,ID,d[r+1])+e mod 3f'[r]=Hash3(1,ID',d[r+1])+e' mod 3が成り立つかを確認する。そして、成り立つ場合のeとe'とからなる相対値の組を生成する。
 暗号文比較装置220は、ステップS1305において、eとe'とからなる相対値の組に基づいて相対値を比較する。そして、暗号文比較装置220は、ステップS1307において、相対値の比較に基づいて比較結果を出力する。すなわち、eとe'との組に関して、e-e'=(1 mod 3)であれば、識別子IDの文書が識別子ID’の文書より大きいことを表す信号(例えば“0”)を出力する。一方、e-e'=(2 mod 3)であれば、識別子ID’の文書が識別子IDの文書より大きいことを表す信号(例えば“1”)を出力する。
 本実施形態によれば、導出鍵と補助導出鍵とを生成して暗号文生成に使用することにより、暗号化された数値の大小比較をすることができると共に、隠匿性を維持して情報の漏洩する機会を大幅に減らすことができる。
 例えば、数値データを含む文書から鍵情報を用いて相対値を生成し、異なる暗号文それぞれに対応した相対値を復元する構成を有することにより、暗号化された異なる文書の隠匿性を維持しつつ文書の大小比較を行うことができる。
 また、文書を特定する識別子に基づく識別子別暗号文を生成して、相対値に付加することにより、文書の一部が同じであっても異なる識別子により異なる暗号文が生成されるので、暗号化された異なる文書の隠匿性を維持しつつ文書の大小比較を行うことができる。すなわち、導出鍵と補助導出鍵とを用いた2つの条件に従って、識別子に基づく識別子別暗号文を生成したので、さらに、暗号化された異なる文書の隠匿性を維持しつつ文書の大小比較を行うことができる。
 具体的には、次のような効果が期待できる。例えば、暗号文の集合が与えられたとし、全ての要素には異なる識別子が割り振られているとする。また、主鍵は与えられていないとする。なお、以下で使用する“i”や“k”は、上記実施形態の説明中と必ずしも一致しない。
 このような条件において、導出鍵も与えられていない場合には、如何なる平文に対応する導出鍵も分からないため、第三者には各暗号文がどのような平文に対応するかは分からない。また、同じ平文に対応する、あるいは接頭の一致する平文に対応する2つの暗号文が与えられたとしても、それぞれに対応する導出鍵の接頭は一致するが、それらから異なる識別子を用いて暗号化されているため両者の一致あるいは接頭の一致を判別することはできない。
 しかし、ある暗号文とこれに対応する導出鍵が与えられている場合、ある暗号文とこの暗号文とでそれらの対応する平文の接頭が一致するかを、本実施形態の比較の方法を用いて判別することができる。すなわち、導出鍵陽性検査から2つの平文のi番目以上のビットが一致すれば、片方の暗号文に関する導出鍵を用いた識別子別暗号文のi番目のビットが導出鍵陽性検査を通過する。また、i+1番目以上のビットは一致するが、i番目のビットが一致しない場合、片方の暗号文(暗号文Aとする)の導出鍵を用いた、他方の暗号文(暗号文Bとする)の識別子別暗号文のi番目のビットの導出鍵陽性検査は通らないことが保障されている。なぜなら、この検査の結果は、暗号文Bの補助導出鍵を用いて暗号文Bのi番目のビットの補助導出鍵陰性検査に通ることと同値であるからである。暗号文Bの識別子別暗号文はそのように生成されている。
 一方、2つのカウンタk個まで接頭の一致する平文の暗号文があったとして、その対応する導出鍵があった得られているとする。k以上のカウンタiに関する要素b[i]が一致するため各要素e[i]とd[i]とf[i]も一致する。しかし、f[k-1]に関しては一致せず、その2つのf[k-1]の値から両者の大小を判定することができる。ここで重要なのは、2つのf[i]が一致しないと、それらの値から2つのb[i]を決定することができるが、f[i]が一致するとこの値からb[i]を決定することができないことである。すなわち、接頭kが一致する2つの平文の暗号からそのkブロック目での不一致と大小関係、すなわちそれらの値も知ることができるが、k番目以下のブロックでの値を知ることはできない。従って、本実施形態の暗号文生成によれば、例えば、同一の平文(文書)に対応する、あるいは接頭部分が一致する平文(文書)に対応する2つの暗号文が与えられた場合であっても、それぞれに対応する導出鍵の接頭は一致するが、異なる識別子を用いて暗号化がなされる。そのため、両平文の一致、あるいは両平文における接頭の一致が判別できないように暗号化することができる。
 このように、本実施形態では、暗号化された異なる複数の暗号文について、暗号文に含まれる文字列からそれぞれの暗号文に対応する平文の大小判定がなされるのを有効に抑制することができる。このため、暗号文の鍵に関する知識を全く持たない第3者が平文である数値データの大小関係を調べることを有効に抑制することが可能となる。
 以上のように、本実施形態では、数値データが暗号化された暗号文が与えられたときに、これらの暗号文だけからはそれらの元の数値データの大小を比較することを抑制できる。且つ、本実施形態では、データベースに対して正規利用者からある数値の暗号文に関して対応する数値データの大小比較の要求がなされた場合に、暗号かされた異なる暗号文に含まれる文字列から元の数値データと大小の比較を行うことができる。
 このため、本実施形態のデータベースシステムでは、データベース利用者は、暗号化される前の数値データを管理者等に知られることなく、データベースに含まれる、特定の暗号化された数値より大きい(または小さい)数値データを取得することができる。また、本実施形態では、2つの暗号文に含まれる文字列(例えば、接頭文字列)が一致する場合でも、暗号化のための鍵を知らない第3者がこの接頭文字列の一致に基づいて暗号文に対応する平文を探り当てることを有効に抑制することができる。このため、例えば、暗号化キーを知らない第三者が、データベースを構成する数値データとデータベース内の暗号化された数値データとの、数値データ同士の大小関係を利用して特定の数値データを抽出したり、取得したりするのを抑制することができる。これにより、データベースに含まれるデータのセキュリティを有効に高めることができる。
 [他の実施形態]
 例えば、本発明を用いてデータベースの利用者が要素を暗号化してデータベースに登録した場合、データベースの管理者は各要素の値を知ることができない。一方、利用者がある値の暗号文およびその対応する導出鍵を生成してデータベースに送付すれば、管理者はこの数より大きいあるいは小さな数の暗号文を選びだして利用者に返送することができる。そしてこの時、管理者は送られてきた暗号文とそれぞれの暗号文とが、それらの対応する平文がどのブロックで一致しなくなり、本実施形態の暗号文生成方式は、どちらが大きいかを知ることはできるが、その他の情報を得ることができない性質を持つ。
 以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。また、それぞれの実施形態に含まれる別々の特徴を如何様に組み合わせたシステムまたは装置も、本発明の範疇に含まれる。
 また、本発明は、複数の機器から構成されるシステムに適用されてもよいし、単体の装置に適用されてもよい。さらに、本発明は、実施形態の機能を実現する制御プログラムが、システムあるいは装置に直接あるいは遠隔から供給される場合にも適用可能である。したがって、本発明の機能をコンピュータで実現するために、コンピュータにインストールされる制御プログラム、あるいはその制御プログラムを格納した媒体、その制御プログラムをダウンロードさせるWWW(Worl、Wid、Web)サーバも、本発明の範疇に含まれる。特に、少なくとも、上述した実施形態に含まれる処理ステップをコンピュータに実行させる制御プログラムを格納した非一時的コンピュータ可読媒体(non-transitor、compute、readabl、medium)は本発明の範疇に含まれる。
 [実施形態の他の表現]
 上記の実施形態の一部または全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成手段と、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成手段と、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成手段と、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成手段と、
 を備え、
 前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする暗号文生成装置。
(付記2)
 前記導出鍵生成手段は、i=n-1から0の降順に従い、前記主鍵と前記文書の要素b[i]と前記導出鍵の既に生成された要素d[i+1]とを用いて、第1ハッシュ関数のHash:{0,1}*→{0,1}kに従ったHash(K,(d[i+1],b[i]))により前記導出鍵の要素d[i]を生成し、
 前記補助導出鍵生成手段は、j=0からn-1の昇順に従い、前記主鍵と前記文書の要素b[j]のビット反転(1-b[j])と前記導出鍵の要素d[j+1]とを用いて、前記第1ハッシュ関数に従ったHash(K,d[j+1],1-b[j])により補助導出鍵の要素g[j]を生成する付記1に記載の暗号文生成装置。
(付記3)
 前記識別子別暗号文生成手段は、p=n-1,…,0の降順に従い、安全変数L[p]∈自然数の場合に{0,1}L[p]から識別子別暗号文の要素c[p]の候補をランダムに選び、識別子IDと前記導出鍵の要素d[p]とを用いて、第2ハッシュ関数のHash2:{0,1}*→{0,1}において、0=Hash2(ID,d[p],c[p]) mod 2が成り立ち、かつ、前記識別子IDと前記補助導出鍵の要素g[p]とを用いて、前記第2ハッシュ関数において、1=Hash2(ID,g[p],c[p]) mod 2が成り立つ場合に、前記識別子別暗号文の要素c[p]として採用する付記1または2に記載の暗号文生成装置。
(付記4)
 前記相対値暗号文生成手段は、
  前記主鍵と前記導出鍵と前記文書とを用いて、相対値を生成する相対値生成手段と、
  前記識別子と前記導出鍵と前記相対値とを用いて、相対値暗号文を生成する相対値隠蔽手段と、
 を備え、
 前記相対値生成手段は、q=0からn-1の昇順に従い、前記主鍵と前記文書と前記導出鍵とを用いて、相対値の要素e[q]を第3ハッシュ関数のHash3:{0,1}*→{0,1,2}に従ってe[q]=Hash3(0,K,d[q+1])+b[q] mod 3により生成し、
 前記相対値隠蔽手段は、d[n]=Kとして、q=0からn-1の昇順に従い、識別子IDと前記導出鍵の要素d[q]と前記相対値の要素e[q]とを用いて、相対値暗号文の要素f[q]を前記第3ハッシュ関数に従ってf[q]=Hash3(1,ID,d[q+1])+e[q] mod 3により生成する、付記1乃至3のいずれか1項に記載の暗号文生成装置。
(付記5)
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
 を含み、
 前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする暗号文生成装置の制御方法。
(付記6)
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
 をコンピュータに実行させる暗号文生成装置の制御プログラムであって、
 前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする暗号文生成装置の制御プログラム。
(付記7)
 付記1乃至4のいずれか1項に記載の暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得手段と、
 付記1乃至4のいずれか1項に記載の暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得手段と、
 前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較手段と、
 を備える暗号文比較装置。
(付記8)
 前記暗号文比較手段は、
  最大不一致カウンタ決定手段と、
  相対値復元手段と、
  相対値比較判定手段と、
 を有し、
 前記最大不一致カウンタ決定手段は、r=n-1から0まで降順に従い、第2識別子ID’と、第1識別子IDの導出鍵の要素d[r]と、前記第2識別子ID’の識別子別暗号文の要素c’[r]とを用いて、第1ハッシュ関数のHash:{0,1}*→{0,1}kに従った等式0=Hash(ID',d[r],c’[r])が成り立つか否かを確認し、始めてこの等式が成り立たなくなったrを最大不一致カウンタrとし、
 前記相対値復元手段は、前記最大不一致カウンタrにおいて、e,e'∈{0,1,2}なるe,e'に関して、前記第1識別子IDと、前記導出鍵の要素d[r+1}、前記第1識別子IDの相対値暗号文の要素f[r]と、前記第2識別子ID’と、前記第2識別子ID’の相対値暗号文の要素f’[r]とを用いて、第3ハッシュ関数のHash3:{0,1}*→{0,1,2}に従って、f [r]=Hash3(1,ID,d[r+1])+e mod 3f'[r]=Hash3(1,ID',d[r+1])+e' mod 3が成り立つか否かを確認し、成り立つ場合のeとe'とからなる相対値の組を生成し、
 前記相対値比較判定手段は、前記eとe'との組に関して、e-e'=(1 mod 3)であれば、前記第1識別子IDの文書が前記第2識別子ID’の文書より大きいことを表す信号を判定結果として出力し、一方、e-e'=(2 mod 3)であれば、前記第2識別子ID’の文書が前記第1識別子IDの文書より大きいことを表す信号を判定結果として出力する、付記7に記載の暗号文比較装置。
(付記9)
 付記1乃至4のいずれか1項に記載の暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得ステップと、
 付記1乃至4のいずれか1項に記載の暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得ステップと、
 前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
 を含む暗号文比較装置の制御方法。
(付記10)
 付記1乃至4のいずれか1項に記載の暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得ステップと、
 付記1乃至4のいずれか1項に記載の暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得ステップと、
 前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
 をコンピュータに実行させる暗号文比較装置の制御プログラム。
(付記11)
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成手段と、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成手段と、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成手段と、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成手段と、
 前記導出鍵生成手段が第1文書から生成した第1導出鍵と、前記第1文書の第1識別子と、前記識別子別暗号文生成手段が前記第1識別子を暗号化した第1識別子別暗号と前記相対値暗号文生成手段が第1相対値を暗号化した第1相対値暗号文とを有する第1暗号文と、第2文書の第2識別子と、前記識別子別暗号文生成手段が前記第2識別子を暗号化した第2識別子別暗号と前記相対値暗号文生成手段が第2相対値を暗号化した第2相対値暗号文とを有する第2暗号文と、を用いて、前記第1暗号文の元である前記第1文書と前記第2暗号文の元である前記第2文書との大小関係を暗号文のままで判定する暗号文比較手段と、
 を備える暗号文比較システム。
(付記12)
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
 前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
 前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
 前記導出鍵生成ステップにおいて第1文書から生成した第1導出鍵と、前記第1文書の第1識別子と、前記識別子別暗号文生成ステップにおいて前記第1識別子を暗号化した第1識別子別暗号と前記相対値暗号文生成ステップにおいて第1相対値を暗号化した第1相対値暗号文とを有する第1暗号文と、第2文書の第2識別子と、前記識別子別暗号文生成ステップにおいて前記第2識別子を暗号化した第2識別子別暗号と前記相対値暗号文生成ステップにおいて第2相対値を暗号化した第2相対値暗号文とを有する第2暗号文と、を用いて、前記第1暗号文の元である前記第1文書と前記第2暗号文の元である前記第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
 を含む暗号文比較方法。
(付記13)
 主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成手段と、
 前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成手段と、
 を備え
 前記導出鍵生成手段は、i=n-1から0の降順に従い、前記主鍵と前記文書の要素b[i]と前記導出鍵の既に生成された要素d[i+1]とを用いて、第1ハッシュ関数のHash:{0,1}*→{0,1}kに従ったHash(K,(d[i+1],b[i]))により前記導出鍵の要素d[i]を生成し、
 前記補助導出鍵生成手段は、j=0からn-1の昇順に従い、前記主鍵と前記文書の要素b[j]のビット反転(1-b[j])と前記導出鍵の要素d[j+1]とを用いて、前記第1ハッシュ関数に従ったHash(K,d[j+1],1-b[j])により補助導出鍵の要素g[j]を生成する鍵導出装置。
 この出願は、2013年10月8日に出願された日本国特許出願 特願2013-211214号を基礎とする優先権を主張し、その開示の全てをここに取り込む。

Claims (10)

  1.  主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成手段と、
     前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成手段と、
     前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成手段と、
     前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成手段と、
     を備え、
     前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする暗号文生成装置。
  2.  前記導出鍵生成手段は、i=n-1から0の降順に従い、前記主鍵と前記文書の要素b[i]と前記導出鍵の既に生成された要素d[i+1]とを用いて、第1ハッシュ関数のHash:{0,1}*→{0,1}kに従ったHash(K,(d[i+1],b[i]))により前記導出鍵の要素d[i]を生成し、
     前記補助導出鍵生成手段は、j=0からn-1の昇順に従い、前記主鍵と前記文書の要素b[j]のビット反転(1-b[j])と前記導出鍵の要素d[j+1]とを用いて、前記第1ハッシュ関数に従ったHash(K,d[j+1],1-b[j])により補助導出鍵の要素g[j]を生成する請求項1に記載の暗号文生成装置。
  3.  前記識別子別暗号文生成手段は、p=n-1,…,0の降順に従い、安全変数L[p]∈自然数の場合に{0,1}L[p]から識別子別暗号文の要素c[p]の候補をランダムに選び、識別子IDと前記導出鍵の要素d[p]とを用いて、第2ハッシュ関数のHash2:{0,1}*→{0,1}において、0=Hash2(ID,d[p],c[p]) mod 2が成り立ち、かつ、前記識別子IDと前記補助導出鍵の要素g[p]とを用いて、前記第2ハッシュ関数において、1=Hash2(ID,g[p],c[p]) mod 2が成り立つ場合に、前記識別子別暗号文の要素c[p]として採用する請求項1または2に記載の暗号文生成装置。
  4.  主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
     前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
     前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
     前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
     を含み、
     前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする暗号文生成装置の制御方法。
  5.  主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
     前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
     前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
     前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
     をコンピュータに実行させる暗号文生成装置の制御プログラムであって、
     前記識別子別暗号文と前記相対値暗号文とを含む文字列を前記文書に対する暗号文とする暗号文生成装置の制御プログラム。
  6.  請求項1乃至3のいずれか1項に記載の暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得手段と、
     請求項1乃至3のいずれか1項に記載の暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得手段と、
     前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較手段と、
     を備える暗号文比較装置。
  7.  請求項1乃至3のいずれか1項に記載の暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得ステップと、
     請求項1乃至3のいずれか1項に記載の暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得ステップと、
     前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
     を含む暗号文比較装置の制御方法。
  8.  請求項1乃至3のいずれか1項に記載の暗号文生成装置により暗号化された第1暗号文と第1識別子と第1導出鍵とを取得する第1暗号文取得ステップと、
     請求項1乃至3のいずれか1項に記載の暗号文生成装置により暗号化された第2暗号文と第2識別子とを取得する第2暗号文取得ステップと、
     前記第1暗号文、前記第1識別子、前記第1導出鍵、前記第2暗号文および前記第2識別子を用いて、前記第1暗号文の元である第1文書と前記第2暗号文の元である第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
     をコンピュータに実行させる暗号文比較装置の制御プログラム。
  9.  主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成手段と、
     前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成手段と、
     前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成手段と、
     前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成手段と、
     前記導出鍵生成手段が第1文書から生成した第1導出鍵と、前記第1文書の第1識別子と、前記識別子別暗号文生成手段が前記第1識別子を暗号化した第1識別子別暗号と前記相対値暗号文生成手段が第1相対値を暗号化した第1相対値暗号文とを有する第1暗号文と、第2文書の第2識別子と、前記識別子別暗号文生成手段が前記第2識別子を暗号化した第2識別子別暗号と前記相対値暗号文生成手段が第2相対値を暗号化した第2相対値暗号文とを有する第2暗号文と、を用いて、前記第1暗号文の元である前記第1文書と前記第2暗号文の元である前記第2文書との大小関係を暗号文のままで判定する暗号文比較手段と、
     を備える暗号文比較システム。
  10.  主鍵と文書とに基づいて、導出鍵を生成する導出鍵生成ステップと、
     前記主鍵と前記文書と前記導出鍵とに基づいて、補助導出鍵を生成する補助導出鍵生成ステップと、
     前記文書の識別子と前記導出鍵と前記補助導出鍵とに基づいて、前記識別子を暗号化した識別子別暗号文を生成する識別子別暗号文生成ステップと、
     前記識別子と前記導出鍵とに基づいて、前記主鍵と前記文書と前記導出鍵とから生成された相対値を暗号化した相対値暗号文を生成する相対値暗号文生成ステップと、
     前記導出鍵生成ステップにおいて第1文書から生成した第1導出鍵と、前記第1文書の第1識別子と、前記識別子別暗号文生成ステップにおいて前記第1識別子を暗号化した第1識別子別暗号と前記相対値暗号文生成ステップにおいて第1相対値を暗号化した第1相対値暗号文とを有する第1暗号文と、第2文書の第2識別子と、前記識別子別暗号文生成ステップにおいて前記第2識別子を暗号化した第2識別子別暗号と前記相対値暗号文生成ステップにおいて第2相対値を暗号化した第2相対値暗号文とを有する第2暗号文と、を用いて、前記第1暗号文の元である前記第1文書と前記第2暗号文の元である前記第2文書との大小関係を暗号文のままで判定する暗号文比較ステップと、
     を含む暗号文比較方法。
PCT/JP2014/065858 2013-10-08 2014-06-16 暗号文比較システム WO2015052957A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2015541450A JP6504405B2 (ja) 2013-10-08 2014-06-16 暗号文比較システム、暗号文比較方法、暗号化装置と暗号文比較装置およびそれらの制御方法と制御プログラム
US15/027,602 US10366631B2 (en) 2013-10-08 2014-06-16 System, method, apparatus, and control methods for ciphertext comparison

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013-211214 2013-10-08
JP2013211214 2013-10-08

Publications (1)

Publication Number Publication Date
WO2015052957A1 true WO2015052957A1 (ja) 2015-04-16

Family

ID=52812779

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/065858 WO2015052957A1 (ja) 2013-10-08 2014-06-16 暗号文比較システム

Country Status (3)

Country Link
US (1) US10366631B2 (ja)
JP (1) JP6504405B2 (ja)
WO (1) WO2015052957A1 (ja)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018151620A (ja) * 2017-03-13 2018-09-27 パロ アルト リサーチ センター インコーポレイテッド スターネットワークにおけるプライバシー保護順序統計の方法およびシステム
JP2018174525A (ja) * 2017-03-31 2018-11-08 トヨタ モーター エンジニアリング アンド マニュファクチャリング ノース アメリカ,インコーポレイティド プライバシー配慮型の信号監視システム及び方法
WO2019114122A1 (zh) * 2017-12-14 2019-06-20 平安科技(深圳)有限公司 登录信息的加密方法、装置、电子设备及介质
KR20190133350A (ko) * 2018-05-23 2019-12-03 세종대학교산학협력단 암호문 비교 방법 및 이를 수행하기 위한 장치
EP3754894A1 (en) 2019-06-18 2020-12-23 Hitachi, Ltd. Encrypted data comparison device, encrypted data comparison system, and encrypted data comparison method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11290262B2 (en) * 2017-07-18 2022-03-29 Legic Identsystems Ag Method and devices for communicating securely between devices

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013005505A1 (ja) * 2011-07-05 2013-01-10 日本電気株式会社 暗号化装置、暗号文比較システム、暗号文比較方法、および暗号文比較プログラム

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6816968B1 (en) * 1998-07-10 2004-11-09 Silverbrook Research Pty Ltd Consumable authentication protocol and system
US7426752B2 (en) * 2004-01-05 2008-09-16 International Business Machines Corporation System and method for order-preserving encryption for numeric data
CN100337423C (zh) * 2004-01-14 2007-09-12 哈尔滨工业大学 一种电子文档的保密、认证、权限管理与扩散控制的处理方法

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013005505A1 (ja) * 2011-07-05 2013-01-10 日本電気株式会社 暗号化装置、暗号文比較システム、暗号文比較方法、および暗号文比較プログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FURUKAWA, JUN: "Request-Based Comparable Encryption, Computer Security", ESORICS 2013, September 2013 (2013-09-01), pages 129 - 146 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018151620A (ja) * 2017-03-13 2018-09-27 パロ アルト リサーチ センター インコーポレイテッド スターネットワークにおけるプライバシー保護順序統計の方法およびシステム
JP2018174525A (ja) * 2017-03-31 2018-11-08 トヨタ モーター エンジニアリング アンド マニュファクチャリング ノース アメリカ,インコーポレイティド プライバシー配慮型の信号監視システム及び方法
WO2019114122A1 (zh) * 2017-12-14 2019-06-20 平安科技(深圳)有限公司 登录信息的加密方法、装置、电子设备及介质
KR20190133350A (ko) * 2018-05-23 2019-12-03 세종대학교산학협력단 암호문 비교 방법 및 이를 수행하기 위한 장치
KR102126295B1 (ko) 2018-05-23 2020-06-24 세종대학교산학협력단 암호문 비교 방법 및 이를 수행하기 위한 장치
EP3754894A1 (en) 2019-06-18 2020-12-23 Hitachi, Ltd. Encrypted data comparison device, encrypted data comparison system, and encrypted data comparison method
JP2020204731A (ja) * 2019-06-18 2020-12-24 株式会社日立製作所 データ比較装置、データ比較システム、及びデータ比較方法
JP7186136B2 (ja) 2019-06-18 2022-12-08 株式会社日立製作所 データ比較装置、データ比較システム、及びデータ比較方法
US11971998B2 (en) 2019-06-18 2024-04-30 Hitachi, Ltd. Data comparison device, data comparison system, and data comparison method

Also Published As

Publication number Publication date
US10366631B2 (en) 2019-07-30
JP6504405B2 (ja) 2019-04-24
US20160240108A1 (en) 2016-08-18
JPWO2015052957A1 (ja) 2017-03-09

Similar Documents

Publication Publication Date Title
US11477006B2 (en) Secure analytics using an encrypted analytics matrix
JP6504405B2 (ja) 暗号文比較システム、暗号文比較方法、暗号化装置と暗号文比較装置およびそれらの制御方法と制御プログラム
Li et al. Enabling fine-grained multi-keyword search supporting classified sub-dictionaries over encrypted cloud data
JP6180177B2 (ja) プライバシーを保護することができる暗号化データの問い合わせ方法及びシステム
Wu et al. Image encryption using the two-dimensional logistic chaotic map
US10489604B2 (en) Searchable encryption processing system and searchable encryption processing method
Baldimtsi et al. Sorting and searching behind the curtain
JP5835326B2 (ja) 暗号化装置、暗号文比較システム、暗号文比較方法、および暗号文比較プログラム
KR20150130788A (ko) 데이터를 암호화하는 방법 및 그를 위한 장치
WO2019114122A1 (zh) 登录信息的加密方法、装置、电子设备及介质
Shinge et al. An encryption algorithm based on ASCII value of data
JP6120961B2 (ja) 特定フォーマットを有する代替データの生成および検証
CN107291861B (zh) 一种面向加密图的带约束近似最短距离查询方法
CN109361644B (zh) 一种支持快速搜索和解密的模糊属性基加密方法
JP6381128B2 (ja) 検索システム、クライアント、サーバ、検索プログラムおよび検索方法
US20190288848A1 (en) Cryptographic hash generation system
KR20200047002A (ko) 동형 암호를 이용한 암호문 비교 방법 및 이를 수행하기 위한 장치
JP2018005220A (ja) 多項式ベースの準同型暗号
US9866372B2 (en) Encryption apparatus, method for encryption, method for decryption and computer-readable recording medium
CN106789058B (zh) 一种代理重加密算法描述及解析方法
WO2020110830A1 (ja) 情報処理装置および情報処理方法
CN108920968B (zh) 一种基于连接关键词的文件可搜索加密方法
CN111008399B (zh) 姓名数据脱敏装置、方法及可读存储介质
JP5873822B2 (ja) 秘匿共通集合演算システム及び秘匿共通集合演算方法
KR20190133350A (ko) 암호문 비교 방법 및 이를 수행하기 위한 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14852338

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015541450

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15027602

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14852338

Country of ref document: EP

Kind code of ref document: A1