CN112287375A - Method for calculating dense state Euclidean distance - Google Patents
Method for calculating dense state Euclidean distance Download PDFInfo
- Publication number
- CN112287375A CN112287375A CN202011313548.3A CN202011313548A CN112287375A CN 112287375 A CN112287375 A CN 112287375A CN 202011313548 A CN202011313548 A CN 202011313548A CN 112287375 A CN112287375 A CN 112287375A
- Authority
- CN
- China
- Prior art keywords
- data
- euclidean distance
- key
- encryption
- calculation
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 238000004364 calculation method Methods 0.000 claims abstract description 17
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Abstract
The invention relates to the field of European distances, in particular to a method for calculating a dense European distance, which aims at solving the problems that the existing companies often have insufficient protection force on data, information leakage can be caused in the process of using the data, and a large amount of user privacy falls into hands of the users, and provides the following scheme, which comprises the following steps: s1: initializing a secret key; s2: data encryption; s3: and (4) secret state calculation and decryption. The invention enables plaintext data to be processed in a ciphertext state in the calculation process, so that no sensitive information can be leaked.
Description
Technical Field
The invention relates to the field of Euclidean distances, in particular to a method for calculating a dense Euclidean distance.
Background
Euclidean metric (also known as euclidean distance) is a commonly used definition of distance, referring to the true distance between two points in an m-dimensional space, or the natural length of a vector (i.e., the distance of the point from the origin); the euclidean distance in two and three dimensions is the actual distance between two points.
The existing Euclidean distance can be applied to the fields of machine learning and artificial intelligence. Similarity and hobbies among a plurality of users are calculated similarly, and a plurality of companies analyze according to the hobbies of the users so as to classify the users, recommend the users in a concentrated manner and carry out targeted popularization advertisement. However, the data protection strength of the companies is often insufficient, information leakage can be caused in the data using process, and a large amount of user privacy is brought to the hands of the users.
Therefore, we propose a method for calculating the dense euclidean distance to solve the above problem.
Disclosure of Invention
Based on the technical problems in the background art, the invention provides a method for calculating a dense Euclidean distance.
The invention provides a method for calculating a dense Euclidean distance, which comprises the following steps:
s1: initializing a secret key;
s2: data encryption;
s3: and (4) secret state calculation and decryption.
Preferably, in S1, the key is initialized to: a pair of public and private keys is generated using a key generator function.
Preferably, in S2, the data encryption includes the following steps: 1. transmitting the public key and any n-dimensional plaintext data generated in the step S1 as parameters to a homomorphic encryption function to complete encryption of the plaintext data and delete the plaintext data; 2. and sending the ciphertext data to the server.
Preferably, in S3, the secret calculation and decryption includes the following steps: 1. sending any two ciphertext data with the same dimensionality to a server; 2. the server carries out homomorphic encryption calculation and calculates out a secret state Euclidean distance; 3. and transmitting the calculated Euclidean distance in the secret state and the private key generated in S1 to a decryption function together as parameters to obtain a plaintext result.
The invention has the beneficial effects that: the key point of the invention is to use homomorphic encryption to carry out encryption calculation on Euclidean distance data participating in calculation. The plaintext data is processed in a ciphertext state in the calculation process, so that any sensitive information cannot be leaked.
The main value of adopting the dense Euclidean distance for calculation protection is to ensure that data can be calculated by ciphertext in the operation process.
Drawings
Fig. 1 is a flowchart of key initialization of a method for calculating a dense euclidean distance according to the present invention;
FIG. 2 is a flow chart of data encryption for a method for calculating a secret Euclidean distance according to the present invention;
fig. 3 is a flowchart of secret state calculation and decryption of a secret state euclidean distance calculation method according to the present invention.
Detailed Description
The present invention will be further illustrated with reference to the following specific examples.
Examples
Referring to FIGS. 1-3; the invention provides a method for calculating a dense Euclidean distance, which comprises the following steps:
s1: initializing a secret key;
s2: data encryption;
s3: and (4) secret state calculation and decryption.
In this embodiment, in S1, the key is initialized to: a pair of public and private keys is generated using a key generator function.
In this embodiment, in S2, the data encryption includes the following steps: 1. transmitting the public key and any n-dimensional plaintext data generated in the step S1 as parameters to a homomorphic encryption function to complete encryption of the plaintext data and delete the plaintext data; 2. and sending the ciphertext data to the server.
In this embodiment, in S3, the secret calculation and decryption includes the following steps: 1. sending any two ciphertext data with the same dimensionality to a server; 2. the server carries out homomorphic encryption calculation and calculates out a secret state Euclidean distance; 3. and transmitting the calculated Euclidean distance in the secret state and the private key generated in S1 to a decryption function together as parameters to obtain a plaintext result.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.
Claims (4)
1. A method for calculating a dense Euclidean distance is characterized by comprising the following steps:
s1: initializing a secret key;
s2: data encryption;
s3: and (4) secret state calculation and decryption.
2. The method according to claim 1, wherein in S1, the key is initialized to: a pair of public and private keys is generated using a key generator function.
3. The method according to claim 1, wherein in S2, the data encryption comprises the following steps: 1. transmitting the public key and any n-dimensional plaintext data generated in the step S1 as parameters to a homomorphic encryption function to complete encryption of the plaintext data and delete the plaintext data; 2. and sending the ciphertext data to the server.
4. The method according to claim 1, wherein in S3, the secret state calculation and decryption comprises the following steps: 1. sending any two ciphertext data with the same dimensionality to a server; 2. the server carries out homomorphic encryption calculation and calculates out a secret state Euclidean distance; 3. and transmitting the calculated Euclidean distance in the secret state and the private key generated in S1 to a decryption function together as parameters to obtain a plaintext result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011313548.3A CN112287375A (en) | 2020-11-21 | 2020-11-21 | Method for calculating dense state Euclidean distance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011313548.3A CN112287375A (en) | 2020-11-21 | 2020-11-21 | Method for calculating dense state Euclidean distance |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112287375A true CN112287375A (en) | 2021-01-29 |
Family
ID=74399574
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011313548.3A Pending CN112287375A (en) | 2020-11-21 | 2020-11-21 | Method for calculating dense state Euclidean distance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112287375A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104598835A (en) * | 2014-12-29 | 2015-05-06 | 无锡清华信息科学与技术国家实验室物联网技术中心 | Cloud-based real number vector distance calculation method for protecting privacy |
CN105046234A (en) * | 2015-08-04 | 2015-11-11 | 北京电子科技学院 | Invisible recognition method used for human face image in cloud environment and based on sparse representation |
CN109067517A (en) * | 2018-06-22 | 2018-12-21 | 成都卫士通信息产业股份有限公司 | Encryption, the communication means for decrypting device, encryption and decryption method and secrete key |
CN110233730A (en) * | 2019-05-22 | 2019-09-13 | 暨南大学 | A kind of method for protecting privacy based on K mean cluster |
CN111241514A (en) * | 2020-01-14 | 2020-06-05 | 浙江理工大学 | Safety face verification method based on face verification system |
-
2020
- 2020-11-21 CN CN202011313548.3A patent/CN112287375A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104598835A (en) * | 2014-12-29 | 2015-05-06 | 无锡清华信息科学与技术国家实验室物联网技术中心 | Cloud-based real number vector distance calculation method for protecting privacy |
CN105046234A (en) * | 2015-08-04 | 2015-11-11 | 北京电子科技学院 | Invisible recognition method used for human face image in cloud environment and based on sparse representation |
CN109067517A (en) * | 2018-06-22 | 2018-12-21 | 成都卫士通信息产业股份有限公司 | Encryption, the communication means for decrypting device, encryption and decryption method and secrete key |
CN110233730A (en) * | 2019-05-22 | 2019-09-13 | 暨南大学 | A kind of method for protecting privacy based on K mean cluster |
CN111241514A (en) * | 2020-01-14 | 2020-06-05 | 浙江理工大学 | Safety face verification method based on face verification system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Mishra et al. | Delphi: A cryptographic inference system for neural networks | |
Gao et al. | EFR-CSTP: Encryption for face recognition based on the chaos and semi-tensor product theory | |
Hu et al. | Securing SIFT: Privacy-preserving outsourcing computation of feature extractions over encrypted image data | |
Bringer et al. | Privacy-preserving biometric identification using secure multiparty computation: An overview and recent trends | |
US11588616B2 (en) | Secret key estimation methods and devices | |
Qu et al. | Cryptanalysis of reversible data hiding in encrypted images by block permutation and co-modulation | |
Peng | Danger of using fully homomorphic encryption: A look at Microsoft SEAL | |
US20180302220A1 (en) | User attribute matching method and terminal | |
Li et al. | SPFM: Scalable and privacy-preserving friend matching in mobile cloud | |
CN104821942A (en) | Face recognition method and system | |
Prasetyo et al. | Improved multiple secret sharing using generalized chaotic image scrambling | |
CN109688143A (en) | A kind of cluster data mining method towards secret protection in cloud environment | |
CN111741020A (en) | Public data set determination method, device and system based on data privacy protection | |
CN115242369A (en) | Multi-key homomorphic encryption-based federal learning privacy protection method and device | |
Vuppala et al. | Moving target defense mechanism for side-channel attacks | |
Wang et al. | Privacy-preserving outsourced feature extractions in the cloud: A survey | |
CN112287375A (en) | Method for calculating dense state Euclidean distance | |
CN115510502B (en) | PCA method and system for privacy protection | |
Lin et al. | A genetic algorithm for ciphertext-only attack in cryptanalysis | |
CN111046431A (en) | Data processing method, query method, device, electronic equipment and system | |
CN111046408A (en) | Judgment result processing method, query method, device, electronic equipment and system | |
CN113722739B (en) | Gradient lifting tree model generation method and device, electronic equipment and storage medium | |
Jagdale et al. | Securing MMS with high performance elliptic curve cryptography | |
CN113407928B (en) | Multi-owner RFID authentication method based on block chain | |
CN111698078B (en) | Cloud outsourcing data privacy protection frequent item mining method based on double cloud models |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210129 |
|
RJ01 | Rejection of invention patent application after publication |