Similarity calculation system, similarity calculation device, similarity calculation method, and similarity calculation program

The proposed similarity calculation system uses homomorphic encryption with defined multiplications and additions to efficiently calculate nonlinear weighted similarities, addressing computational challenges and maintaining confidentiality in similarity assessments.

JP7559926B2Active Publication Date: 2024-10-02NEC CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023508194
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-03-23
Publication Date
2024-10-02
Estimated Expiration
2041-03-23

AI Technical Summary

Technical Problem

Existing similarity calculation methods using homomorphic encryption face challenges in efficiently calculating nonlinear weighted similarities due to the computational intensity of fully homomorphic encryption, while additive homomorphic encryption struggles with precise weighting requirements.

Method used

A similarity calculation system and method utilizing homomorphic encryption that defines operations in terms of at least one multiplication and multiple additions, enabling the calculation of nonlinear weighted similarities by extracting components from a weighted similarity table and performing inner products on encrypted vectors.

Benefits of technology

Enables the calculation of nonlinear weighted similarities in an encrypted state, reducing computational burden and maintaining confidentiality of user evaluation values, while allowing for efficient and precise similarity assessments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007559926000012
    Figure 0007559926000012
  • Figure 0007559926000013
    Figure 0007559926000013
  • Figure 0007559926000014
    Figure 0007559926000014
Patent Text Reader

Abstract

This similarity calculation system calculates a degree of similarity between a first vector and a second vector using homomorphic encryption defining a homomorphic computation relating to at least one multiplication operation and multiple addition operations. The similarity calculation system obtains the degree of similarity between the first vector and the second vector by using homomorphic computation to calculate the inner product of: a first encrypted vector obtained by using a homomorphic encryption public key to encrypt a row extracted from a weighted similarity table of degrees of similarity for components between the first vector and the second vector, the row corresponding to a component value of the first vector; and a second encrypted vector obtained by transforming a component value of the second vector to a component that becomes one in a unit vector and encrypting the transformation result with the homomorphic encryption public key.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a similarity calculation system, a similarity calculation device, a similarity calculation method, and a similarity calculation program. [Background technology]

[0002] One type of encryption technology is homomorphic encryption. Homomorphic encryption is a technology that, when ciphertexts Enc(m1) and Enc(m2) of plaintexts m1 and m2 are given, it is possible to calculate the ciphertext Enc(m1○m2) of the binary operation m1○m2 of plaintexts m1 and m2 without decrypting it to plaintexts m1 and m2. Here, "○" is a binary operation, such as addition "+" or multiplication "×". Homomorphic encryption for addition "+" is called additive homomorphic encryption. Homomorphic encryption that is also homomorphic for multiplication "×" is called fully homomorphic encryption.

[0003] Fully homomorphic encryption has the best properties because it is homomorphic with respect to addition and multiplication. However, fully homomorphic encryption requires a large amount of calculations and is difficult to put into practical use. Therefore, homomorphic encryption with intermediate properties between additive homomorphic encryption and fully homomorphic encryption has been developed. For example, an encryption method called Somewhat homomorphic encryption is a homomorphic encryption method that has homomorphism with respect to a finite number of additions and multiplications (see, for example, Non-Patent Document 1). Also, for example, an encryption method called Level 2 homomorphic encryption is a homomorphic encryption method that allows one homomorphic multiplication and multiple homomorphic additions (see, for example, Non-Patent Document 2). In these Somewhat homomorphic encryption and Level 2 homomorphic encryption, while the allowable operations are limited, the amount of calculation is less than that of fully homomorphic encryption. Therefore, the amount of calculation can be reduced by selecting and implementing an appropriate homomorphic encryption method according to the purpose.

[0004] Similarity calculation is one of the encryption protocols that use homomorphic encryption. Here, we explain similarity calculation using a movie recommendation service as an application example. In a movie recommendation service, a user Y recommends a movie M. *When deciding whether a movie is suitable for you, * In particular, we perform a calculation to find other users who have similar ratings for other movies. i Movie M1, Movie M2, ..., Movie M n The similarity of the evaluation value for movie M is calculated, and if this similarity is close, movie M * It is judged that the preferences will also match. As an example of this similarity, Euclidean distance or cosine similarity can be used, but an important requirement is that the similarity is calculated while keeping the evaluation value of each user secret. When performing calculations while keeping the target secret in this way, homomorphic encryption is used (for example, see Patent Document 1 and Patent Document 2). [Prior art documents] [Patent documents]

[0005] [Patent Document 1] International Publication No. 2017 / 061024 [Patent Document 2] JP 2016-111594 A [Non-patent literature]

[0006] [Non-Patent Document 1] Yasuda M., Shimoyama T., Kogure J., Yokoyama K., Koshiba T. (2013) Packed Homomorphic Encryption Based on Ideal Lattices and Its Application to Biometrics. In: Cuzzocrea A., Kittl C., Simos DE, Weippl E., Xu L. (eds) Security Engineering and Intelligence Informatics. CD-ARES 2013. Lecture Notes in Computer Science, vol 8128. Springer, Berlin, Heidelberg. [Non-Patent Document 2] Boneh D., Goh EJ., Nissim K. (2005) Evaluating 2-DNF Formulas on Ciphertexts. In: Kilian J. (eds) Theory of Cryptography. TCC 2005. Lecture Notes in Computer Science, vol 3378. Springer, Berlin, Heidelberg. Summary of the Invention [Problem to be solved by the invention]

[0007] The disclosures of the above-mentioned prior art documents are incorporated herein by reference. The following analysis has been carried out by the present inventors.

[0008] By the way, weighting may be applied to the design of similarity. For example, if the similarity of the evaluation values ​​of movie M1 is more important than the similarity of the evaluation values ​​of movie M2, the evaluation is performed using a similarity in which the similarity of the evaluation values ​​of each movie is weighted. The so-called "weighted Euclidean distance" is an example of a similarity in which weighting is applied. In such a case, additive homomorphic encryption can be used to calculate the similarity while keeping the evaluation values ​​of each user confidential. This is because additive homomorphic encryption can calculate the scalar multiplication of a plaintext without decrypting the ciphertext.

[0009] On the other hand, when weighting is performed more precisely, it becomes difficult to use additive homomorphic encryption for calculations. For example, even for the rating values ​​of the same movie, it may be desirable to weight differently between movies that are close in preference and movies that are close in dislike. Specifically, for example, if the rating values ​​are scaled from 0 to 5 in order of preference, the difference between a rating value of 0 and 1 and the difference between a rating value of 4 and 5 are both 1, but an example would be to reflect the difference between ratings of 4 and 5, which are close in preference, more strongly in the similarity.

[0010] Therefore, it is possible to use an encryption method with better properties, such as fully homomorphic encryption, instead of additive homomorphic encryption. However, as described above, fully homomorphic encryption requires a large amount of calculation. Therefore, there is a demand for a method that allows the calculation of nonlinear weighted similarity while using fewer operations.

[0011] In view of the above-mentioned problems, an object of the present invention is to provide a similarity calculation system, a similarity calculation device, a similarity calculation method, and a similarity calculation program that contribute to calculating nonlinear weighted similarity using ciphertext as is. [Means for solving the problem]

[0012] In a first aspect of the present invention, there is provided a similarity calculation system for calculating a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined for at least one multiplication and multiple additions, the similarity calculation system including: a similarity calculation device that stores a first encrypted vector obtained by extracting a row corresponding to a value of a component of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the row with a public key of the homomorphic encryption; and a second input terminal that inputs a second encrypted vector obtained by converting a value of a component of the second vector into a component that is 1 in a unit vector and encrypting the converted vector with the public key of the homomorphic encryption to the similarity calculation device, wherein the similarity calculation device calculates an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted similarity between the first vector and the second vector.

[0013] In a second aspect of the present invention, there is provided a similarity calculation device that calculates a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined for at least one multiplication and multiple additions, the similarity calculation device comprising: a memory unit that stores a first encrypted vector obtained by extracting a row corresponding to a component value of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the row with a public key of the homomorphic encryption; a receiving unit that receives a second encrypted vector obtained by converting values ​​of the components of the second vector into components that are 1 in a unit vector and encrypting the converted vector with the public key of the homomorphic encryption; and a calculation unit that obtains an encrypted similarity between the first vector and the second vector by calculating an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation.

[0014] In a third aspect of the present invention, there is provided a similarity calculation method for calculating a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined for at least one multiplication and multiple additions, the similarity calculation method comprising the steps of: referring to a first encrypted vector obtained by extracting a row corresponding to a value of a component of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted row with a public key of the homomorphic encryption; receiving a second encrypted vector obtained by converting values ​​of the components of the second vector into components that are 1 in a unit vector and encrypting the converted vector with the public key of the homomorphic encryption; and calculating an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted similarity between the first vector and the second vector.

[0015] In a fourth aspect of the present invention, there is provided a similarity calculation method for making a computer calculate a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined for at least one multiplication and a plurality of additions, the similarity calculation program comprising the steps of: referring to a first encrypted vector obtained by extracting a row corresponding to a value of a component of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted row with a public key of the homomorphic encryption; receiving a second encrypted vector obtained by converting a value of a component of the second vector into a component that is 1 in a unit vector and encrypting the converted vector with the public key of the homomorphic encryption; and calculating an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted similarity between the first vector and the second vector. The program can be recorded in a computer-readable storage medium. The storage medium can be a non-transient medium such as a semiconductor memory, a hard disk, a magnetic recording medium, or an optical recording medium. The present invention can also be embodied as a computer program product. Effect of the Invention

[0016] According to each aspect of the present invention, it is possible to provide a similarity calculation system, a similarity calculation device, a similarity calculation method, and a similarity calculation program that contribute to calculating a nonlinear weighted similarity as encrypted text. [Brief description of the drawings]

[0017] [Figure 1] FIG. 1 is a block diagram showing a schematic configuration example of a similarity calculation system according to the first embodiment. [Diagram 2] FIG. 2 is a block diagram showing an example of a schematic configuration of a similarity calculation device according to the first embodiment. [Diagram 3] FIG. 3 is a system flowchart of the similarity calculation system according to the first embodiment. [Figure 4]FIG. 4 is a block diagram showing a schematic configuration example of a similarity calculation system according to the second embodiment. [Diagram 5] FIG. 5 is a block diagram showing a schematic configuration example of a similarity calculation system according to the third embodiment. [Figure 6] FIG. 6 is a diagram illustrating an example of a hardware configuration of the similarity calculation device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0018] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. However, the present invention is not limited to the embodiment described below. In addition, in each drawing, the same or corresponding elements are appropriately assigned the same reference numerals. Furthermore, it should be noted that the drawings are schematic, and the dimensional relationship of each element, the ratio of each element, etc. may differ from the actual ones. There may also be parts in which the dimensional relationship and ratio differ between the drawings.

[0019] [First embodiment] A similarity calculation system according to a first embodiment will be described below with reference to Figures 1 and 2. The first embodiment is an embodiment that describes only the basic concept of the present invention.

[0020] FIG. 1 is a block diagram showing a schematic configuration example of a similarity calculation system according to the first embodiment. As shown in FIG. 1, the similarity calculation system 100 according to the first embodiment includes a similarity calculation device 110 and an input terminal 120. The similarity calculation device 110 is an information processing device (computer) whose hardware configuration will be exemplified later. On the other hand, the input terminal 120 can be an independent information processing device (computer) or a device attached to the similarity calculation device 110. The relationship between the similarity calculation device 110 and the input terminal 120 may be a connection by wired communication or may be a connection by wireless communication. For example, the input terminal 120 can be a general-purpose personal computer or a mobile terminal such as a smartphone.

[0021] The similarity calculation system 100 according to the first embodiment shown in FIG. 1 is for calculating the similarity between a first vector and a second vector using homomorphic encryption in which homomorphic operations are defined with respect to at least one multiplication and multiple additions. i_num ) is the value of each component x i (i=1,...,i_num) takes values ​​from 1 to S (i.e. x i ∈{1,2,...,S}), the second vector (y1,y2,..,y i_num ) also represents the value of each component y i (i=1,...,i_num) takes values ​​from 0 to S (i.e. y i ∈{1,2,...,S}), where the first vector (x1,x2,..,x i_num ) and a second vector (y1,y2,..,y i_num ) similarity is allowed to be weighted nonlinearly. In addition, nonlinear weighting means that the first vector (x1, x2, .., x i_num ) and a second vector (y1,y2,..,y i_num ), we weight each component x i ,y i The weight value changes according to

[0022] The homomorphic encryption used in the first embodiment can use homomorphic operations defined for at least one multiplication and multiple additions. That is, the homomorphic encryption used in the first embodiment defines homomorphic addition and homomorphic multiplication that satisfy the following relational expressions. Homomorphic addition HomAdd pk (Enc pk (m1), Enc pk (m2))=Enc pk (m1+m2) Homomorphic multiplication HomMul pk (Enc pk (m1), Enc pk (m2))=Enc pk (m1×m2)

[0023] FIG. 2 is a block diagram showing a schematic configuration example of a similarity calculation device in the first embodiment. As shown in FIG. 2, the similarity calculation device 110 includes a storage unit 111, a receiving unit 112, and a calculation unit 113. The storage unit 111 stores a first encrypted vector obtained by extracting a row corresponding to the value of a component of the first vector from a weighted similarity table of the similarity of each component between the first vector and the second vector and encrypting the extracted row with the public key of the homomorphic encryption. The receiving unit 112 receives a second encrypted vector obtained by converting the value of a component of the second vector into a component that is 1 in a unit vector and encrypting the converted vector with the public key of the homomorphic encryption. The calculation unit 113 obtains an encrypted similarity between the first vector and the second vector by calculating an inner product of the first encrypted vector and the second encrypted vector using homomorphic operation.

[0024] Next, a method for calculating the similarity between a first vector and a second vector using a weighted similarity table will be described. i_num ) and a second vector (y1,y2,..,y i_num ) is fixed to the i-th component, and the same calculation method is applied to each component.

[0025] Weighted Similarity Table T i is a table showing the similarity of the i component between a first vector and a second vector. i takes values ​​from 1 to S, and the value y of the i component of the second vector i Since takes values ​​from 1 to S, the weighted similarity table T i is an S × S table (matrix). The following table is the weighted similarity table T when S = 5. i The following table shows an example of the value of the i component of the first vector, x i and the value y of the i component of the second vector i The closer the similarity between the two, the lower the score is stored.

[0026] [Table 1]

[0027] Then, the weighted similarity table T i to the value x of the i component of the first vector i Extract the row that corresponds to x. i If =2, you get the following 1x5 table:

[0028] [Table 2]

[0029] This 1 × 5 table can be considered to be a vector (1, 0, 1, 30, 50), so by encrypting this vector (1, 0, 1, 30, 50) with the public key of homomorphic encryption, the first encrypted vector can be obtained.

[0030] On the other hand, the second encrypted vector is the value y of the i component of the second vector. i is converted to a component that is 1 in a unit vector and encrypted with the public key of homomorphic encryption. In other words, the value y i The second encrypted vector is the unit vector (0,...,0,1,0,...,) whose only component is 1, encrypted with the public key of homomorphic encryption. For example, y i If =5, the second encrypted vector is the encrypted unit vector (0, 0, 0, 0, 1).

[0031] By constructing the first encrypted vector and the second encrypted vector in this manner, the inner product of the first encrypted vector and the second encrypted vector can be calculated using homomorphic operations to obtain an encrypted version of the similarity between the first vector and the second vector.

[0032] For example, if the first encrypted vector is (1, 0, 1, 30, 50) and the second encrypted vector is (0, 0, 0, 0, 1), the inner product is 50. This is the weighted similarity table T i From x i =2, y i This is the same as extracting the components with weighted similarity table T i is a table showing the similarity of the i component between the first vector and the second vector, so it is possible to obtain the similarity between the first vector and the second vector. Note that this inner product is calculated while the vector is still encrypted, so the similarity obtained is also the similarity in the encrypted state. The similarity obtained in the encrypted state can be decrypted and passed on to the next process, but it can also be passed on to the next process without decrypting. These are problems related to the application of the obtained similarity.

[0033] [Table 3]

[0034] Here, the first vector (x1, x2, .., x i_num ) and a second vector (y1,y2,..,y i_num Here, we will provide a supplementary explanation of the part where the component of is fixed to the i-th component. For simplicity, we will consider the relationship between the i-th component and the i+1-th component as x i =2, x i+1 =3, y i =5, y i+1 Let us explain using the example of =4.

[0035] [Table 4]

[0036] As can be seen from the table above, the i and i+1 components of the first and second vectors are x i =2, x i+1 =3, y i =5, y i+1If = 4, the similarity limited to the i component and the i+1 component is 50 + 11 = 61. To obtain this value, the first encrypted vector and the second encrypted vector can be calculated for each component and then serially combined. Specifically, it can be obtained as follows.

[0037] [Table 5]

[0038] The dot product of the first encrypted vector (1, 0, 1, 30, 50, 40, 11, 0, 11, 40) and the second encrypted vector (0, 0, 0, 0, 1, 0, 0, 0, 1, 0) thus obtained is 61. This process is then repeated to obtain the first vector (x1, x2, .., x i_num ) and a second vector (y1,y2,..,y i_num ) for each component.

[0039] Next, the process between the similarity calculation device 110 and the input terminal 120 will be described with reference to Fig. 3. Fig. 3 is a system flowchart of the similarity calculation system in the first embodiment. The system flowchart shown in Fig. 3 shows the procedure of a similarity calculation method for calculating the similarity between a first vector and a second vector using homomorphic encryption in which homomorphic operations are defined for at least one multiplication and multiple additions.

[0040] In step S1, the similarity calculation device 110 refers to a first encrypted vector obtained by extracting a row corresponding to the value of a component of the first vector from a weighted similarity table of the similarity of each component between the first vector and the second vector and encrypting the extracted row with the public key of the homomorphic encryption. Here, the first encrypted vector may be stored in a storage unit 111 inside the similarity calculation device 110, or may be stored in a database server outside the similarity calculation device 110. The first encrypted vector may be obtained by inputting it from the input terminal 120 or another input terminal.

[0041] In step S2, the input terminal 120 converts the values ​​of the components of the second vector into components that are 1 in a unit vector, and then encrypts the converted vector with the public key of the homomorphic encryption, and transmits the resulting second encrypted vector to the similarity calculation device 110.

[0042] Then, in step S3, the similarity calculation device 110 calculates the inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted similarity between the first vector and the second vector.

[0043] As described above, the similarity calculation system in the first embodiment can contribute to calculating a nonlinear weighted similarity using the encrypted text as is. The similarity calculation system in the first embodiment can be implemented as a similarity calculation method, and the similarity calculation method in the first embodiment can also be implemented as a program executed by an information processing device (computer) having a hardware configuration described later.

[0044] [Second embodiment] Hereinafter, a similarity calculation system according to the second embodiment will be described with reference to FIG. 4. The second embodiment is an embodiment including a specific method of applying homomorphic encryption. Here, the second embodiment will be described using so-called level 2 homomorphic encryption, in which homomorphic operations are defined for at least one multiplication and multiple additions. However, the second embodiment is not limited to level 2 homomorphic encryption, and homomorphic encryption in which homomorphic operations are defined for at least one multiplication and multiple additions, such as somewhat homomorphic encryption and fully homomorphic encryption, can be used.

[0045] As shown in FIG. 4, the similarity calculation system 200 according to the second embodiment includes a similarity calculation device 210, a first input terminal 221, a second input terminal 222, and a decryption device 230. The similarity calculation device 210 and the decryption device 230 are information processing devices (computers) whose hardware configurations will be exemplified later. On the other hand, the first input terminal 221 and the second input terminal 222 can be independent information processing devices (computers) or devices attached to the similarity calculation device 210. The relationship between the similarity calculation device 210 and the first input terminal 221 and the second input terminal 222 may be connected by wired communication or wireless communication. For example, the input terminal 220 can be a general-purpose personal computer or a mobile terminal such as a smartphone.

[0046] In the second embodiment, the first vector (x1, x2, .., x i_num ) is the value of each component x i (i=1,...,i_num) takes values ​​from 1 to S (i.e. x i ∈{1,2,...,S}), the second vector (y1,y2,..,y i_num ) also represents the value of each component y i (i=1,...,i_num) takes values ​​from 0 to S (i.e. y i ∈{1,2,...,S}). The first vector (x1,x2,..,x i_num ) and a second vector (y1,y2,..,y i_num ) similarity, nonlinear weighting is allowed, and a weighted similarity table T indicating the similarity of the i component between the first vector and the second vector is created. i In addition, the weighted similarity table T i The value of jth row and kth column of T i,j,k It is written as follows.

[0047] The homomorphic encryption used in the second embodiment can use, for example, the homomorphic encryption described in Non-Patent Document 2, in which homomorphic operations are defined for at least one multiplication and multiple additions. That is, the homomorphic encryption used in the second embodiment defines homomorphic addition and homomorphic multiplication that satisfy the following relational expressions. Note that the homomorphic encryption used in the second embodiment can use a scalar instead of a vector as a plaintext. Homomorphic addition HomAdd pk (Enc pk (m1), Enc pk (m2))=Enc pk (m1+m2) Homomorphic multiplication HomMul pk (Enc pk (m1), Enc pk (m2))=Enc pk (m1×m2)

[0048] In preparation for homomorphic encryption, a public key pk and a private key sk are prepared such that the plaintext space size s>s_score. The score space size s_score is a quantity indicating the extent to which a variable can move. The public key pk is used to generate encryption capable of performing homomorphic operations from a scalar plaintext, and to perform homomorphic operations on homomorphic encryption encrypted using the public key pk. On the other hand, the private key sk is used to decrypt homomorphic encryption encrypted using the public key pk. Therefore, the public key pk is held by the similarity calculation device 210, the first input terminal 221, and the second input terminal 222, and the private key sk is held by the decryption device 230.

[0049] The first input terminal 221 receives a public key pk and a first vector (x1, x2, .., x i_num ) as input, the first vector (x1,x2,..,x i_num ) to calculate the first encrypted vector, where the first encrypted vector is calculated using the weighted similarity table T i The value of the j-th component of the first vector is x jThe lines corresponding to the extracted ones are encrypted with the public key of homomorphic encryption, but since the homomorphic encryption used in the second embodiment uses a scalar plaintext, each element of the extracted lines is encrypted. Specifically, the following first encrypted vector c1 is obtained. The obtained first encrypted vector c1 is transmitted to the similarity calculation device 210.

[0050]

number

[0051] The second input terminal 222 receives the public key pk and the second vector (y1, y2, . . . , y i_num ) as input to calculate the second encrypted vector, where the second encrypted vector is the second vector (y1, y2, .., y i_num ) the value of the jth component y j is converted into a component that is 1 in a unit vector and encrypted with the public key pk of homomorphic encryption. Therefore, the second encrypted vector c2 is as follows. The obtained second encrypted vector c2 is transmitted to the similarity calculation device 210.

[0052]

number

[0053] The similarity calculation device 210 calculates the inner product of the first encrypted vector and the second encrypted vector using homomorphic calculation. However, since the first encrypted vector and the second encrypted vector are encrypted for each component, the similarity calculation device 210 multiplies each component of the first encrypted vector and the second encrypted vector using homomorphic calculation, and adds each component after this multiplication using homomorphic calculation. Specifically, the similarity calculation device 210 calculates the inner product of the first encrypted vector and the second encrypted vector using homomorphic calculation. mul Calculate c mul HomAdd each element of pk The obtained ciphertext c is transmitted to the decryption device 230.

[0054]

number

[0055] The decryption device 230 uses the private key sk to decrypt the ciphertext c calculated by the homomorphic operation as described above. The value m decrypted from the ciphertext c is the similarity between the first vector and the second vector.

[0056] As described above, the similarity calculation system in the second embodiment can contribute to calculating the nonlinear weighted similarity using the encrypted text as is. Moreover, the similarity calculation system in the second embodiment is superior to the similarity calculation system in the third embodiment described later in that it does not perform mask processing.

[0057] [Third embodiment] Hereinafter, a similarity calculation system according to the third embodiment will be described with reference to FIG. 5. The third embodiment is an embodiment including a specific method of applying homomorphic encryption. Here, the third embodiment will be described using so-called Somewhat homomorphic encryption, in which homomorphic encryption having homomorphism regarding a finite number of additions and multiplications is defined. However, the third embodiment is not limited to Somewhat homomorphic encryption, and homomorphic encryption in which homomorphic encryption having homomorphism regarding a finite number of additions and multiplications is defined, such as fully homomorphic encryption, can be used.

[0058] As shown in FIG. 5, the similarity calculation system 300 according to the third embodiment includes a similarity calculation device 310, a first input terminal 321, a second input terminal 322, and a decryption device 330. The similarity calculation device 310 and the decryption device 330 are information processing devices (computers) whose hardware configurations will be exemplified later. Meanwhile, the first input terminal 321 and the second input terminal 322 can be independent information processing devices (computers) or can be devices attached to the similarity calculation device 310. The relationship between the similarity calculation device 310 and the first input terminal 321 and the second input terminal 322 may be connected by wired communication or wireless communication. For example, the input terminal 320 can be a general-purpose personal computer or a mobile terminal such as a smartphone.

[0059] In the third embodiment, the first vector (x1, x2, .., x i_num ) is the value of each component x i (i=1,...,i_num) takes values ​​from 1 to S (i.e. x i ∈{1,2,...,S}), the second vector (y1,y2,..,y i_num ) also represents the value of each component y i (i=1,...,i_num) takes values ​​from 0 to S (i.e. y i ∈{1,2,...,S}). The first vector (x1,x2,..,x i_num ) and a second vector (y1,y2,..,y i_num ) similarity, nonlinear weighting is allowed, and a weighted similarity table T indicating the similarity of the i component between the first vector and the second vector is created. i In addition, the weighted similarity table T i The jth row of is T i,j It is written as follows.

[0060] The homomorphic encryption used in the third embodiment may be, for example, the homomorphic encryption described in Non-Patent Document 1, which defines homomorphic encryption having homomorphism for a finite number of additions and multiplications. That is, the homomorphic encryption used in the third embodiment defines homomorphic additions and homomorphic multiplications that satisfy the following relational expressions. Note that the homomorphic encryption used in the second embodiment uses a polynomial in which the plaintext is regarded as a vector. That is, when a first vector (x1, x2, .., x i_num ) is m1=x1+x2t 1 +...+x i_num t i_num-1 and the second vector (y1,y2,..,y i_num ) is m2=y1+y2t 1 +...+y i_num t i_num-1 The first vector (x1,x2,..,x i_num ) and a second vector (y1,y2,..,y i_num ) as a plaintext is the polynomial m1=x1+x2t 1 +...+x i_num t i_num-1 and polynomial m2=y1+y2t 1 +...+y i_num t i_num-1 It is. Homomorphic addition HomAdd pk (Enc pk (m1), Enc pk (m2))=Enc pk (m1+m2) Homomorphic multiplication HomMul pk (Enc pk (m1), Enc pk (m2))=Enc pk (m1×m2)

[0061] In the homomorphic encryption used in the third embodiment, the homomorphic inner product operation can be defined as follows using the properties of polynomials and the homomorphic multiplication described above. pk (m2) is an encryption for homomorphic inner product operations. i * is a value in the plaintext space.

[0062]

number

[0063] As a preparation for homomorphic encryption, a public key pk and a private key sk of a Somewhat homomorphic encryption that can handle an n-1 degree polynomial (n≧i_num×S) with coefficient space size s>s_score as a plaintext are prepared. The score space size s_score is a quantity indicating the amount of movement of a variable. The public key pk is used to generate an encryption capable of performing homomorphic operations from a scalar plaintext, and to perform homomorphic operations on a homomorphic encryption encrypted using the public key pk. On the other hand, the private key sk is used to decrypt a homomorphic encryption encrypted using the public key pk. Therefore, the public key pk is held by the similarity calculation device 310, the first input terminal 321, and the second input terminal 322, and the private key sk is held by the decryption device 330.

[0064] The first input terminal 321 receives a public key pk and a first vector (x1, x2, .., x i_num ) as input, the first vector (x1,x2,..,x i_num ) to calculate the first encrypted vector, where the first encrypted vector is calculated using the weighted similarity table T i The value of the j-th component of the first vector is x j The first input terminal 321 first extracts the rows corresponding to the weighted similarity table T i The value of the j-th component of the first vector is x j The resulting plaintext vector is m1 as follows: Then, the first input terminal 321 encrypts this vector m1 to obtain a first encrypted vector c1=Enc pk The obtained first encrypted vector c1 is transmitted to the similarity calculation device 310.

[0065]

number

[0066] A second input terminal 322 receives the public key pk and a second vector (y1, y2, . . . , y i_num ) as input to calculate the second encrypted vector, where the second encrypted vector is the second vector (y1, y2, .., y i_num ) the value of the jth component y j is converted into a component that is 1 in a unit vector and encrypted with the public key pk of homomorphic encryption. Therefore, the second input terminal 322 first inputs the second vector (y1, y2, . . . , y i_num ) the value of the jth component y j The plaintext vector obtained by converting the vector m2 into a component that is 1 in a unit vector is calculated. The resulting plaintext vector is m2 as follows. Then, the second input terminal 322 encrypts this vector m2 to obtain a second encrypted vector c2=Enc2 pk The obtained first encrypted vector c1 is transmitted to the similarity calculation device 310.

[0067]

number

[0068] In the above example, the first encrypted vector is c1=Enc pk (m1), and the second encryption vector is c2=Enc2 pk (m2), but the first encryption vector is c1=Enc2 pk (m1), and the second encryption vector is c2=Enc pk Even if we use (m2), the result of the inner product operation will not change.

[0069] The similarity calculation device 310 calculates the inner product of the first encrypted vector and the second encrypted vector using homomorphic calculation. However, in homomorphic inner product calculation using the product of polynomials, the constant term of the obtained polynomial is the inner product, but there is a possibility that information may leak from the non-constant term. Therefore, the terms other than the constant term that represents the inner product are masked with random numbers.

[0070] Specifically, the similarity calculation device 310 first performs homomorphic multiplication of the first encrypted vector c1 and the second encrypted vector c2 to obtain a polynomial ciphertext c ip =HomMul pk On the other hand, in order to mask the non-constant terms, the similarity calculation device 310 calculates a random vector r=(0, r2, r3, ..., r n ) and generate the masking ciphertext c r =Enc pk (r) is created. Then, the ciphertext c of the above polynomial is created. ip and the mask ciphertext c r By homomorphic addition, the ciphertext c = HomAdd pk (c ip , c r The obtained ciphertext c is transmitted to the decryption device 330.

[0071] The decryption device 330 uses the private key sk to decrypt the ciphertext c calculated by the homomorphic operation as described above. However, the value m decrypted from the ciphertext c is a polynomial, and the constant term of this polynomial is the similarity between the first vector and the second vector. At this time, terms other than the constant term of the polynomial are also decrypted at the same time, but as described above, the random vector r=(0, r2, r3, ..., r n ), so that no information leaks from any terms other than the constant term of the polynomial.

[0072] As described above, the similarity calculation system in the third embodiment can contribute to calculating a nonlinear weighted similarity using the encrypted text as is. In addition, the similarity calculation system in the third embodiment uses an inner product calculation using polynomial multiplication, thereby reducing the number of calculations.

[0073] [Hardware configuration example] 6 is a diagram illustrating an example of the hardware configuration of the similarity calculation device 110, 210, and 310.

[0074] An information processing device (computer) employing the hardware configuration shown in Fig. 6 executes the above-described similarity calculation method as a program, thereby enabling each function of the similarity calculation devices 110, 210, and 310 to be realized. However, the hardware configuration example shown in Fig. 6 is an example of a hardware configuration for realizing each function of the similarity calculation devices 110, 210, and 310, and is not intended to limit the hardware configuration of the similarity calculation devices 110, 210, and 310. The similarity calculation devices 110, 210, and 310 may include hardware not shown in Fig. 6.

[0075] As shown in FIG. 6, a hardware configuration 10 that can be adopted by the similarity calculation devices 110, 210, 310 includes a CPU (Central Processing Unit) 11, a main memory device 12, an auxiliary memory device 13, and an IF (Interface) unit 14, which are interconnected by an internal bus, for example.

[0076] The CPU 11 executes each command included in the similarity calculation program executed by the similarity calculation devices 110, 210, and 310. The main storage device 12 is, for example, a RAM (Random Access Memory), and temporarily stores various programs such as the similarity calculation program executed by the similarity calculation devices 110, 210, and 310 for processing by the CPU 11.

[0077] The auxiliary storage device 13 is, for example, a hard disk drive (HDD), and can store various programs such as the similarity calculation program executed by the similarity calculation device 110, 210, 310 in the medium to long term. Various programs such as the similarity calculation program can be provided as a program product recorded in a non-transitory computer-readable storage medium. The auxiliary storage device 13 can be used to store various programs such as the similarity calculation program recorded in the non-transitory computer-readable storage medium in the medium to long term. The IF unit 14 provides an interface related to input / output between the similarity calculation device 110, 210, 310 and an input terminal.

[0078] An information processing apparatus employing the above-described hardware configuration 10 realizes the functions of the similarity calculation apparatuses 110, 210, and 310 by executing the above-described similarity calculation method as a program.

[0079] Some or all of the above embodiments may be described as follows, but are not limited to the following: The similarity may be, for example, a distance. [Appendix 1] A similarity calculation system for calculating a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined with respect to at least one multiplication and a plurality of additions, a similarity calculation device that stores a first encrypted vector obtained by extracting rows corresponding to values ​​of components of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted rows with a public key of the homomorphic encryption; a second input terminal for inputting a second encrypted vector obtained by converting values ​​of components of the second vector into components that are 1 in a unit vector and encrypting the converted vector with a public key of the homomorphic encryption to the similarity calculation device; The similarity calculation device is a similarity calculation system that obtains an encrypted value of the similarity between the first vector and the second vector by calculating the inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation. [Appendix 2] the first encrypted vector and the second encrypted vector are encrypted component-wise; the similarity calculation device multiplies each component of the first encrypted vector and the second encrypted vector in the homomorphic operation, and adds each component after the multiplication in the homomorphic operation. 2. A similarity calculation system according to claim 1. [Appendix 3] the first vector and the second vector are coefficients of a polynomial; The multiplication in the homomorphic operation is a multiplication of the polynomials, The inner product is a constant term obtained by multiplying the polynomials. 2. A similarity calculation system according to claim 1. [Appendix 4] The similarity calculation system according to claim 3, further comprising: masking, with random numbers, terms other than a constant term representing the inner product of a polynomial obtained from multiplication in the homomorphic operation on a vector obtained from the first vector and the second vector. [Appendix 5] the first encrypted vector is obtained by extracting rows corresponding to values ​​of components of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector, encrypting the extracted rows with the public key of the homomorphic encryption, and serially concatenating the extracted rows for each component of the first vector; The second encrypted vector is a vector in which the values ​​of the components of the second vector are converted into components that are 1 in a unit vector, and the converted components are encrypted with the public key of the homomorphic encryption and serially concatenated for each component of the second vector. 5. A similarity calculation system according to any one of claims 1 to 4. [Appendix 6] a first input terminal that uses the first vector as an input to calculate the first encrypted vector from the first vector and inputs the first encrypted vector to the similarity calculation device; 6. A similarity calculation system according to any one of claims 1 to 5. [Appendix 7] The encryption method further includes the steps of: decrypting the encrypted similarity between the first vector and the second vector using a private key of the homomorphic encryption; 7. A similarity calculation system according to any one of claims 1 to 6. [Appendix 8] A similarity calculation device that calculates a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined with respect to at least one multiplication and a plurality of additions, a storage unit that stores a first encrypted vector obtained by extracting rows corresponding to values ​​of components of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted rows with a public key of the homomorphic encryption; a receiving unit that receives a second encrypted vector obtained by converting values ​​of components of the second vector into components that are 1 in a unit vector and encrypting the converted vector with a public key of the homomorphic encryption; a calculation unit that calculates an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted similarity between the first vector and the second vector; A similarity calculation device comprising: [Appendix 9] A similarity calculation method for calculating a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined with respect to at least one multiplication and a plurality of additions, comprising: referencing a first encrypted vector obtained by extracting a row corresponding to a value of a component of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted row with a public key of the homomorphic encryption; receiving a second encrypted vector obtained by converting values ​​of components of the second vector into components that are 1 in a unit vector and encrypting the converted vector with the public key of the homomorphic encryption; A similarity calculation method, comprising: calculating an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted similarity between the first vector and the second vector. [Appendix 10] A similarity calculation program that causes a computer to calculate a similarity between a first vector and a second vector using homomorphic encryption in which homomorphic operations are defined with respect to at least one multiplication and multiple additions, referencing a first encrypted vector obtained by extracting a row corresponding to a value of a component of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted row with a public key of the homomorphic encryption; receiving a second encrypted vector obtained by converting values ​​of components of the second vector into components that are 1 in a unit vector and encrypting the converted vector with the public key of the homomorphic encryption; a similarity calculation program for obtaining an encrypted similarity between the first vector and the second vector by calculating an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation.

[0080] The disclosures of the above cited patent documents are incorporated herein by reference. Within the scope of the entire disclosure of the present invention (including the scope of claims), modifications and adjustments of the embodiments and examples are possible based on the basic technical ideas. Furthermore, within the scope of the entire disclosure of the present invention, various combinations or selections (including partial deletions) of various disclosed elements (including each element of each claim, each element of each embodiment or example, each element of each drawing, etc.) are possible. In other words, the present invention naturally includes various modifications and corrections that a person skilled in the art would be able to make in accordance with the entire disclosure including the scope of claims and the technical ideas. In particular, with regard to the numerical ranges described in this specification, any numerical value or small range included in the range should be construed as being specifically described even if not otherwise specified. Furthermore, the disclosures of the above cited documents, if necessary, in accordance with the spirit of the present invention, may be used in part or in whole in combination with the disclosures of this specification as part of the disclosure of the present invention, and are deemed to be included in the disclosures of this application. [Explanation of symbols]

[0081] 100,200,300 Similarity Calculation System 110,210,310 Similarity calculation device 111 Storage section 112 Receiving unit 113 Arithmetic section 120,221,222,321,322 Input terminals 230,330 Decoding device 10 Hardware Configuration 11 CPU(Central Processing Unit) 12 Main storage 13 Auxiliary storage device 14 IF (Interface) Section

Claims

1. A similarity calculation system for calculating a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined with respect to at least one multiplication and a plurality of additions, a similarity calculation device that stores a first encrypted vector obtained by extracting rows corresponding to values ​​of components of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted rows with a public key of the homomorphic encryption; a second input terminal for inputting a second encrypted vector obtained by converting values ​​of components of the second vector into components that are 1 in a unit vector and encrypting the converted vector with a public key of the homomorphic encryption to the similarity calculation device, The similarity calculation device is a similarity calculation system that obtains an encrypted value of the similarity between the first vector and the second vector by calculating the inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation.

2. the first encrypted vector and the second encrypted vector are component-wise encrypted; the similarity calculation device multiplies each component of the first encrypted vector and the second encrypted vector in the homomorphic operation, and adds each component after the multiplication in the homomorphic operation. The similarity calculation system according to claim 1 .

3. the first vector and the second vector are coefficients of a polynomial; The multiplication in the homomorphic operation is a multiplication of the polynomials, The inner product is a constant term obtained by multiplying the polynomials. The similarity calculation system according to claim 1 .

4. The similarity calculation system according to claim 3 , further comprising: masking, with random numbers, terms other than a constant term representing the inner product of a polynomial obtained from multiplication in the homomorphic operation on a vector obtained from the first vector and the second vector.

5. the first encrypted vector is obtained by extracting rows corresponding to values ​​of components of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector, encrypting the extracted rows with a public key of the homomorphic encryption, and serially concatenating the extracted rows for each component of the first vector; The second encrypted vector is a vector in which the values ​​of the components of the second vector are converted into components that are 1 in a unit vector, the converted components are encrypted with the public key of the homomorphic encryption, and the resulting vector is serially concatenated for each component of the second vector. The similarity calculation system according to any one of claims 1 to 4.

6. a first input terminal for inputting the first vector, calculating the first encrypted vector from the first vector, and inputting the first encrypted vector to the similarity calculation device; The similarity calculation system according to any one of claims 1 to 5.

7. The method further includes the steps of: providing a decryption device that decrypts the encrypted similarity between the first vector and the second vector using a private key of the homomorphic encryption; The similarity calculation system according to any one of claims 1 to 6.

8. A similarity calculation device that calculates a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined with respect to at least one multiplication and a plurality of additions, a storage unit that stores a first encrypted vector obtained by extracting rows corresponding to values ​​of components of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted rows with a public key of the homomorphic encryption; a receiving unit that receives a second encrypted vector obtained by converting values ​​of components of the second vector into components that are 1 in a unit vector and encrypting the converted vector with a public key of the homomorphic encryption; a calculation unit that calculates an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted similarity between the first vector and the second vector; A similarity calculation device comprising:

9. A similarity calculation method in which a computer calculates a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined with respect to at least one multiplication and a plurality of additions, comprising the steps of: a first encrypted vector obtained by the computer extracting a row corresponding to a value of a component of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted row with a public key of the homomorphic encryption; receiving a second encrypted vector obtained by encrypting the second vector by using a public key of the homomorphic encryption, the second encrypted vector being converted by the computer into a component of the second vector that is 1 in a unit vector; A similarity calculation method in which the computer calculates an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted version of the similarity between the first vector and the second vector.

10. A similarity calculation program that causes a computer to calculate a similarity between a first vector and a second vector using homomorphic encryption in which a homomorphic operation is defined with respect to at least one multiplication and a plurality of additions, a first encrypted vector obtained by the computer extracting a row corresponding to a value of a component of the first vector from a weighted similarity table of similarities of each component between the first vector and the second vector and encrypting the extracted row with a public key of the homomorphic encryption; receiving a second encrypted vector obtained by encrypting the second vector by using a public key of the homomorphic encryption, the second encrypted vector being converted by the computer into a component of the second vector that is 1 in a unit vector; A similarity calculation program in which the computer calculates an inner product of the first encrypted vector and the second encrypted vector using the homomorphic operation to obtain an encrypted similarity between the first vector and the second vector.

Citation Information

Patent Citations

  • Device and method for encryption processing

    JP2014126866A

  • Encrypted text collation system, method and program

    JP2016111594A

  • Secret retrieval system, management device, secret retrieval method, and secret retrieval program

    WO2017061024A1