A quantum-safe outsourced machine learning method and system

Through the proxy re-encryption scheme and differential privacy technology based on on-ring fault tolerance, the problems of quantum computing attacks and low data availability are solved, a safe and flexible outsourcing machine learning method is realized, and the security and availability of data are improved.

CN116248260BActive Publication Date: 2024-09-20NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211512054.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2024-09-20
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

Existing technologies are unable to resist quantum computing attacks and have low data availability, and cannot effectively protect private information in machine learning models.

Method used

Using a proxy re-encryption scheme based on the Ring Tolerance (RLWE) problem, combined with differential privacy technology and cloud computing technology, through key generation algorithm, encryption algorithm and noise calculation, Laplacian noise is generated and added to ensure that data is transmitted and security and availability in stored procedures.

Benefits of technology

It effectively resists quantum computing attacks, improves the security and availability of outsourced data, supports flexible access by multiple data users, reduces the computing and storage overhead of data owners, and ensures the security of private data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116248260B
    Figure CN116248260B
Patent Text Reader

Abstract

The present invention discloses a quantum-safe outsourced machine learning method and system, the method comprising: using a key generation algorithm to generate a key pair including a public key and a private key for a data owner and a data user respectively; the data owner encodes the data, and uses an encryption algorithm to encrypt the encoded data to obtain a ciphertext; the data owner determines the function sensitivity set ΔF and the privacy budget parameter ε of machine learning, and calculates a noise vector ξ; CSPs calculates the Laplace noise component #imgabs0# based on the noise vector ξ, and adds the Laplace noise component #imgabs1# to the ciphertext to obtain a noisy ciphertext; re-encrypts the noisy ciphertext based on a proxy key, generates a noisy re-encrypted ciphertext and sends it to the data user; the data user decrypts, analyzes the noise data based on the algorithm corresponding to the machine learning task, and completes the machine learning task. The method of the present invention improves the availability of published data and effectively resists quantum computing attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security, and in particular to a quantum-safe outsourced machine learning method and system. Background Art

[0002] With the rapid development of data collection and processing technology, people have entered the era of big data. Various organizations and institutions hope to collect large amounts of data from different platforms and systems and share them with researchers for related research tasks such as statistical analysis, classification and prediction. Since cloud service providers (CSPs) provide data owners with great flexibility in computing and storage, cloud computing outsourcing services that authorize data publishing and analysis tasks to CSPs have become a development trend in the information age.

[0003] At present, machine learning technology mainly uses data-driven as the mainstream learning paradigm, and uses efficient intelligent learning algorithms to achieve prediction, classification and other tasks for different fields, and gradually becomes the main driving force for the development of data sharing, analysis and mining technology. Driven by scientific research and industrial development, the application fields involved in machine learning are becoming more and more extensive, especially in cutting-edge application fields such as energy, biomedicine, finance, and information security. For example, in power demand analysis, a machine learning model is trained by collecting electricity consumption data of electricity users in each time period of the day to help analyze and predict the dynamic results of energy consumption, and provide a decision-making basis for power grid companies to make better demand response. However, the privacy and security issues of data analysis technology based on machine learning are also becoming increasingly prominent. Incidents of machine learning models leaking private information in user training sets occur frequently. For example, using member attribute attacks, private attribute information in the machine learning model training set can be obtained.

[0004] At present, cloud computing outsourcing services can provide users with corresponding services based on user needs by using its powerful storage and computing capabilities to solve problems such as user computing difficulties and resource waste. However, as an untrustworthy third party, outsourcing personal data directly to CSPs will face the risk of information leakage, because the data usually contains personal sensitive information such as medical health, financial status, contact information, etc. For example, a company leaked the user's registration information to a third-party partner company without the user's consent, resulting in user privacy leakage and triggering a large number of customer complaints.

[0005] To address the above privacy challenges, existing solutions mainly use encryption technology to design interactive security protocols based on specific data analysis tasks to protect the privacy of outsourced data. However, these solutions usually cannot meet the requirements of high security and low computational overhead at the same time, and the availability of published data is low. In recent years, differential privacy has been widely used in the field of data publishing and analysis because it can provide individuals with advanced semantic security. Its main idea is to achieve the purpose of privacy protection by adding appropriate random noise to the original data, query results or model parameters, without making assumptions about the attacker's background knowledge, and providing a provable and quantifiable privacy protection framework. As an alternative, differential privacy not only protects the privacy of data, but also retains the availability of published results. Therefore, the data provider outsources the encrypted data to the cloud server, and then uses CSPs to perform differential privacy protection on the ciphertext, and interacts with the data user to complete the secure outsourced machine learning task.

[0006] To achieve secure outsourcing of machine learning tasks, existing technologies combine differential privacy models with encryption algorithms based on classical cryptographic problems. For example, based on public key encryption with double decryption, homomorphic encryption, attribute encryption, AES symmetric encryption, and order-preserving encryption, a secure outsourcing machine learning method based on differential privacy is designed to reduce the computing, communication, and storage costs of data owners, improve data processing efficiency, and support multiple data users to use private data for machine learning modeling. However, the above solutions have the disadvantage of being unable to resist quantum computing attacks and having low data availability.

[0007] 1) Unable to resist quantum computing attacks

[0008] The emergence of quantum computer technology has made the above encryption algorithms based on classical cryptographic problems no longer secure. The famous Shor quantum algorithm can solve discrete logarithm problems, integer factorization problems, elliptic curve discrete logarithm problems and other computational problems that are difficult on classical computers in polynomial time on large quantum computers. The Grover quantum algorithm uses the natural parallel characteristics and unique computing methods of quantum computers to perform rapid exhaustive searches, which reduces its security. Therefore, quantum algorithms pose a great security threat to the existing outsourced machine learning methods based on the above classical difficult problems.

[0009] 2) Low data availability

[0010] Most existing methods use homomorphic encryption algorithms to protect outsourced data, and then CSP adds Laplace noise to the encrypted data. However, the ciphertext generated by the homomorphic encryption algorithm is an irregular floating point number, and the Laplace mechanism has been proven to be only applicable to integer numerical data. Therefore, using the Laplace mechanism to achieve differential privacy protection for irregular floating point numbers has a low usability of the published results. Summary of the invention

[0011] In view of this, the present invention provides a quantum-safe outsourced machine learning method and system, which can solve the technical problems that the existing technology cannot resist quantum computing attacks and has low data availability.

[0012] In order to solve the above technical problems, the present invention is implemented as follows.

[0013] A quantum-safe outsourced machine learning method, the method comprising the following steps:

[0014] Step S1: Generate a key pair including a public key and a private key for the data owner and the data user respectively using the key generation algorithm KeyGen;

[0015] Step S2: The data owner encodes the data and uses the encryption algorithm Enc to encrypt the encoded data to obtain ciphertext; a proxy key is generated based on the private key of the data owner and the public key of the data user. Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget parameter ε of the machine learning, and calculates the noise vector ξ;

[0016] Step S3: The data owner sends the noise vector ξ, ciphertext and proxy key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ The Laplace noise component Adding to the ciphertext to obtain a noisy ciphertext; re-encrypting the noisy ciphertext based on the proxy key to generate a noisy re-encrypted ciphertext and sending it to the data user;

[0017] Step S4: The data user decrypts the re-encrypted ciphertext to obtain noise data, takes the noise data as input, analyzes the noise data based on the algorithm corresponding to the machine learning task, and completes the machine learning task.

[0018] Preferably, the step S1 comprises:

[0019] From U q and χ e Select ring elements a, s, e respectively, where U q , χ e Ring Uniform distribution and discrete Gaussian distribution on , Represents a finite field Z q The ring of integer polynomials obtained by modulo the irreducible polynomial f(x), f(x) = x n +1 is the polynomial x of degree m=2n m -1 cyclotomic polynomial, x is the polynomial variable, Z q[x] is the integer coefficient modulo q,<f(x)> For the polynomial x n +1 generated principal ideal; select safety parameters n = 1024, modulus q = 1073479681.

[0020] Preferably, the step S2 comprises:

[0021] Step S21: The data owner performs binary encoding Encode(data) on the data set data∈{0,1,…,n-1} to obtain data m1 =(data0,data1,…,data n-1 ), n=1024;

[0022] Step S22: The encoded data data′ and the data owner's public key As input to the encryption algorithm Enc, select the ring element obey Discrete Gaussian distribution on , calculate the ciphertext in in, is a random ring element, To obey Ring elements of discrete Gaussian distribution on ;

[0023] Step S23: Constructing a proxy key generation algorithm The proxy key generation algorithm is based on the data owner's private key and the data user's public key Get the proxy key to convert the data owner's ciphertext into the data user's ciphertext; select the ring element e 0,i ,e 1,i ,e 2,i ←χ e , χ e For the ring The error distribution on 0,i ,e 1,i ,e 2,i ←χ e According to the error distribution χ e Perform random sampling; calculate proxy key in, is the proxy key;

[0024] Step S24: Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget ε of the machine learning, and calculates the noise vector ξ; wherein the function sensitivity and the privacy budget are differential privacy parameters, and differential privacy protects the user's privacy information by adding noise to the query results; the function sensitivity Δf is used to control the size of the generated noise, data num 、data num+1 The set of adjacent data sets that differ by one data record is called the function sensitivity set ΔF, 0≤num≤R, where R is the number of data records in the data set.

[0025] Preferably, the step S3 comprises:

[0026] Step S31: The data owner sends the noise vector ξ, ciphertext and re-encryption key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ Lap(·) represents the Laplace distribution and the noise component of the Laplace noise Perform binary expansion and we get Define the ring element r = (g0, g1, ... g n-1 ), dimension n = 1024;

[0027] Step S32: Constructing a noise adding algorithm The Laplace noise component after encoding Add to the generated ciphertext In the above example, we get the noisy ciphertext And Perform binary expansion and we get in, represents a residue class ring with modulus 2, where q is the modulus;

[0028] Step S33: Establish a re-encryption algorithm The noisy ciphertext is encrypted by the re-encryption algorithm Re-encrypt to get the re-encrypted ciphertext in, is the proxy key, is a random ring element.

[0029] Preferably, the step S4 comprises:

[0030] Building a decryption algorithm Data User jUse the decryption algorithm to re-encrypt the ciphertext Decrypt and get the noise data And decode m′ according to the vector component modulo 2 operation to obtain decoded noise data m″, take the decoded noise data m″ as input, analyze the noise data based on the algorithm corresponding to the machine learning task, and complete the machine learning task.

[0031] The present invention provides a quantum-safe outsourced machine learning system, the system comprising:

[0032] Key pair generation module: configured to generate a key pair including a public key and a private key for the data owner and the data user respectively using the key generation algorithm KeyGen;

[0033] Noise calculation module: It is configured to encode the data for the data owner, and encrypt the encoded data using the encryption algorithm Enc to obtain the ciphertext; it generates the proxy key based on the private key of the data owner and the public key of the data user. Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget parameter ε of the machine learning, and calculates the noise vector ξ;

[0034] Data sending module: configured for the data owner to send the noise vector ξ, ciphertext and proxy key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ The Laplace noise component Adding to the ciphertext to obtain a noisy ciphertext; re-encrypting the noisy ciphertext based on the proxy key to generate a noisy re-encrypted ciphertext and sending it to the data user;

[0035] Decryption module: configured for a data user to decrypt the re-encrypted ciphertext to obtain noise data, use the noise data as input, analyze the noise data based on the algorithm corresponding to the machine learning task, and complete the machine learning task.

[0036] The present invention provides a computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the method as described above.

[0037] An electronic device provided by the present invention is characterized in that the electronic device comprises:

[0038] A processor, which is used to execute multiple instructions;

[0039] A memory for storing a plurality of instructions;

[0040] The plurality of instructions are used to be stored by the memory and loaded and executed by the processor to implement the method as described above.

[0041] Beneficial effects:

[0042] By constructing a proxy re-encryption scheme based on the Ring Learning with Error (RLWE) problem and combining differential privacy technology with cloud computing technology, a quantum-safe outsourced machine learning method and system are designed and implemented.

[0043] It has the following technical effects:

[0044] (1) The present invention is aimed at multiple data users and outsources the process of publishing privacy-preserving data to a cloud server, reducing the computing, communication, and storage overhead of the data owner. At the same time, it supports flexible noise addition according to the needs of each data user, improves the availability of published data, and effectively resists quantum computing attacks.

[0045] (2) Compared with existing outsourced machine learning methods, the present invention does not require data providers to consume a large amount of storage space and computing time. At the same time, it utilizes the properties of quantum-safe proxy re-encryption to support multiple data users to securely and flexibly access noisy ciphertexts stored in CSPs, thereby improving the security of outsourced data.

[0046] (3) The present invention designs a proxy re-encryption technology based on the RLWE problem. Compared with the encryption algorithm constructed based on the difficult problem of classical cryptography, it can effectively resist quantum computing attacks and improve the security of outsourced data during calculation and storage. At the same time, it supports multiple data users to flexibly access the noisy ciphertext in CSPs, reducing the computational overhead and communication complexity of the data owner.

[0047] (4) The present invention directly adds noise that satisfies ε-differential privacy protection to the ciphertext without decryption, thereby improving the privacy of outsourced data while ensuring the security of outsourced machine learning. Machine learning is achieved without revealing private data to an untrusted third party. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of the process flow of the quantum-safe outsourced machine learning method provided by the present invention;

[0049] Figure 2 Schematic diagram of the quantum-safe outsourced machine learning system provided by the present invention;

[0050] FIG3(A) is a schematic diagram showing the performance of naive Bayes classification of data provided by the method of the present invention and original data without noise;

[0051] FIG3(B) is a schematic diagram showing the performance of nearest neighbor classification of the data provided by the method of the present invention and the original data without noise;

[0052] Figure 4 A schematic diagram of the structure of the quantum-safe outsourced machine learning system provided by the present invention. DETAILED DESCRIPTION

[0053] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments.

[0054] like Figure 1 As shown, the present invention proposes a quantum-safe outsourced machine learning method, which includes the following steps:

[0055] Step S1: Generate a key pair including a public key and a private key for the data owner and the data user respectively using the key generation algorithm KeyGen;

[0056] Step S2: The data owner encodes the data and uses the encryption algorithm Enc to encrypt the encoded data to obtain ciphertext; a proxy key is generated based on the private key of the data owner and the public key of the data user. Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget parameter ε of the machine learning, and calculates the noise vector ξ;

[0057] Step S3: The data owner sends the noise vector ξ, ciphertext and proxy key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ The Laplace noise component Adding to the ciphertext to obtain a noisy ciphertext; re-encrypting the noisy ciphertext based on the proxy key to generate a noisy re-encrypted ciphertext and sending it to the data user;

[0058] Step S4: The data user decrypts the re-encrypted ciphertext to obtain noise data, takes the noise data as input, analyzes the noise data based on the algorithm corresponding to the machine learning task, and completes the machine learning task.

[0059] Step S1: Generate a key pair including a public key and a private key for the data owner and the data user respectively using the key generation algorithm KeyGen, including:

[0060] From U q and χ e Select ring elements a, s, e respectively, where U q , χ e Ring Uniform distribution and discrete Gaussian distribution on , Represents a finite field Zq The integer polynomial ring obtained from the monic irreducible polynomial f(x), where f(x) = x n + 1 is the cyclotomic polynomial of x m - 1, where x is the polynomial variable, and Z q [x] is the integer coefficients modulo q, and <f(x)> is the principal ideal generated by the polynomial x n + 1; select the security parameter n = 1024 and the modulus q = 1073479681.

[0061] Data owner P o and data user U j Use the key generation algorithm KeyGen(1 n ) to obtain their respective public keys and private keys. The key pairs of the data owner P o and data user U j are different from each other.

[0062] The data owner calculates The public key of the data owner Private key is a part of the public key , is a random ring element, and s, obeys the discrete Gaussian distribution on.

[0063] The data user calculates The public key of the data user Private key is a part of the public key , is a random ring element, obeys the discrete Gaussian distribution on.

[0064] In step S2, the proxy key is the key generated in the proxy re-encryption algorithm.

[0065] In step S2, the data owner encodes the data and encrypts the encoded data using the encryption algorithm Enc to obtain the ciphertext; generates a proxy key based on the private key of the data owner and the public key of the data user Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget parameter ε of the machine learning, and calculates the noise vector ξ, including:

[0066] Step S21: The data owner performs binary encoding Encode(data) on the data set data∈{0,1,…,n-1} to obtain data m1 =(data0,data1,…,data n-1 ), n=1024.

[0067] Step S22: The encoded data data′ and the data owner's public key As input to the encryption algorithm Enc, select the ring element obey Discrete Gaussian distribution on , calculate the ciphertext in in, is a random ring element, To obey Ring elements of discrete Gaussian distribution on ;

[0068] Step S23: Constructing a proxy key generation algorithm The proxy key generation algorithm is based on the data owner's private key and the data user's public key Get the proxy key to convert the data owner's ciphertext into the data user's ciphertext; select the ring element e 0,i ,e 1,i ,e 2,i ←χ e , χ e For the ring The error distribution on 0,i ,e 1,i ,e 2,i ←χ e According to the error distribution χ e Perform random sampling; calculate proxy key in, The proxy key.

[0069] Step S24: Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget ε of the machine learning, and calculates the noise vector ξ; wherein the function sensitivity and the privacy budget are differential privacy parameters, and differential privacy protects the user's privacy information by adding noise to the query results; the function sensitivity Δf is used to control the size of the generated noise, data num 、data num+1The set of adjacent data sets that differ by one data record is called the function sensitivity set ΔF, 0≤num≤R, where R is the number of data records in the data set.

[0070] The present invention adopts the Laplace mechanism to achieve differential privacy protection by adding a noise vector ξ based on ΔF and ε.

[0071] Step S3: The data owner sends the noise vector ξ, ciphertext and proxy key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ The Laplace noise component Adding to the ciphertext to obtain a noisy ciphertext; re-encrypting the noisy ciphertext based on the proxy key to generate a noisy re-encrypted ciphertext and sending it to the data user, including:

[0072] Step S31: The data owner sends the noise vector ξ, ciphertext and re-encryption key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ Lap(·) represents the Laplace distribution and the noise component of the Laplace noise Perform binary expansion and we get Define the ring element r = (g0, g1, ... g n-1 ), dimension n=1024.

[0073] Step S32: Constructing a noise adding algorithm The Laplace noise component after encoding Add to the generated ciphertext In the above example, we get the noisy ciphertext And Perform binary expansion and we get in, represents the residue class ring with modulus 2, where q is the modulus.

[0074] Step S33: Establish a re-encryption algorithm The noisy ciphertext is encrypted by the re-encryption algorithm Re-encrypt to get the re-encrypted ciphertext in, is the proxy key, is a random ring element.

[0075] The step S4: the data user decrypts the re-encrypted ciphertext to obtain noise data, uses the noise data as input, analyzes the noise data based on the algorithm corresponding to the machine learning task, and completes the machine learning task, including:

[0076] Building a decryption algorithm Data User j Use the decryption algorithm to re-encrypt the ciphertext Decrypt and get the noise data And decode m′ by taking the vector component modulo 2 operation to obtain the decoded noise data m″, take the decoded noise data m″ as input, analyze the noise data based on the algorithm corresponding to the machine learning task, and complete the machine learning task. and To re-encrypt the ciphertext.

[0077] like Figure 2 As shown, the present invention provides a quantum-safe outsourced machine learning system. Taking the outsourced power data publishing and analysis scenario as an example, the power grid company is the data owner P o , hoping to share users’ electricity consumption data with cloud service providers CSPs so that data users U j Perform machine learning modeling to achieve user behavior profiling. In this scenario, cloud service providers CSPs and data users U j All of them are not completely trustworthy. The present invention aims to realize behavior analysis based on machine learning on the basis of protecting user privacy, specifically including:

[0078] Step 1: Upload data. First, the system generates a data provider P o 、Data UserU j Key pair Then, the data provider P o The noise vector ξ is calculated based on the privacy budget ε and the query function sensitivity set ΔF used to train the machine learning model; finally, the data m outsourced to the cloud service provider CSPs is encoded and encrypted using the public key Encryption processing to generate ciphertext Private Key and the public key of the data user Generate re-encryption key The power grid company then uploads the encrypted ciphertext data, noise vector, and re-encryption key to the cloud service provider CSPs.

[0079] Step 2: Proxy re-encryption and noise addition. First, CSPs receive the data from the data owner P. o Uploaded relevant data and obtain the data from the data user U jThe query function F is obtained from the query function; then, the Laplace mechanism is used to calculate the noise component that meets the definition of ε-differential privacy And encode it to get The coded noise component Add to the generated ciphertext In the above example, we get the noisy ciphertext Finally, use the public key of the data user Re-encryption key With noisy ciphertext Calculate and re-encrypt the ciphertext Sent to data user U j ;

[0080] Step 3: Obtain and use the noisy data. First, the data user U j Use private key After decryption, the encoded noisy data m′ is obtained; then, m′ is decoded to obtain the noisy data m′; finally, machine learning tasks are performed according to the needs of the power grid company. For example, through the machine learning-based power user behavior (electricity purchase payment, business expansion report, illegal electricity use, etc.) portrait, the user's consumption characteristics and behavioral preferences are analyzed.

[0081] In order to better illustrate the technical effect of the present invention, a specific example is used to experimentally verify the present invention. Figure 3(A)-Figure 3(B) It is the performance of using the original data and the noisy data generated by this method when using different machine learning algorithms for classification tasks. Figure 3(A)-Figure 3(B) As shown in the figure, the use of this method has little impact on the original data after adding noise to the naive Bayes and nearest neighbor classification tasks. Therefore, this method does not greatly affect the accuracy of machine learning while ensuring security and privacy. Experiments have proved that this method is completely effective.

[0082] The present invention also provides a quantum-safe outsourced machine learning system, such as Figure 4 As shown, the system comprises:

[0083] Key pair generation module: configured to generate a key pair including a public key and a private key for the data owner and the data user respectively using the key generation algorithm KeyGen;

[0084] Noise calculation module: It is configured to encode the data for the data owner, and encrypt the encoded data using the encryption algorithm Enc to obtain the ciphertext; it generates the proxy key based on the private key of the data owner and the public key of the data user. Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget parameter ε of the machine learning, and calculates the noise vector ξ;

[0085] Data sending module: configured for the data owner to send the noise vector ξ, ciphertext and proxy key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ The Laplace noise component Adding to the ciphertext to obtain a noisy ciphertext; re-encrypting the noisy ciphertext based on the proxy key to generate a noisy re-encrypted ciphertext and sending it to the data user;

[0086] Decryption module: configured for a data user to decrypt the re-encrypted ciphertext to obtain noise data, use the noise data as input, analyze the noise data based on the algorithm corresponding to the machine learning task, and complete the machine learning task.

[0087] The above specific embodiments only describe the design principle of the present invention. The shapes and names of the components in the description may be different and are not limited. Therefore, those skilled in the art in the field of the present invention may modify or replace the technical solutions recorded in the above embodiments; and these modifications and replacements do not deviate from the creative purpose and technical solutions of the present invention and should all fall within the protection scope of the present invention.

Claims

1. A quantum-safe outsourced machine learning method, characterized in that The method comprises the following steps: Step S1: Generate a key pair including a public key and a private key for the data owner and the data user respectively using the key generation algorithm KeyGen; Step S2: The data owner encodes the data and uses the encryption algorithm Enc to encrypt the encoded data to obtain ciphertext; a proxy key is generated based on the private key of the data owner and the public key of the data user. Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget parameter ε of the machine learning, and calculates the noise vector ξ; Step S3: The data owner sends the noise vector ξ, ciphertext and proxy key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ The Laplace noise component Adding to the ciphertext to obtain a noisy ciphertext; re-encrypting the noisy ciphertext based on the proxy key to generate a noisy re-encrypted ciphertext and sending it to the data user; Step S4: The data user decrypts the re-encrypted ciphertext to obtain noise data, takes the noise data as input, analyzes the noise data based on the algorithm corresponding to the machine learning task, and completes the machine learning task; The step S2 comprises: Step S21: The data owner performs binary encoding Encode(data) on the data set data∈{0,1,…,n-1} to obtain data m1 =(data0,data1,…,datan -1 ), n=1024; Step S22: The encoded data data′ and the data owner's public key As input to the encryption algorithm Enc, select the ring element obey Discrete Gaussian distribution on , calculate the ciphertext in in, is a random ring element, s, e for obedience Ring elements of discrete Gaussian distribution on ; Step S23: Constructing a proxy key generation algorithm The proxy key generation algorithm is based on the data owner's private key and the data user's public key Get the proxy key to convert the data owner's ciphertext into the data user's ciphertext; select the ring element e 0,i ,e 1,i ,e 2,i ←χ e , χ e For the ring The error distribution on 0,i ,e 1,i ,e 2,i ←χ e According to the error distribution χ e Perform random sampling; calculate proxy key in, is the proxy key; Step S24: Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget ε of the machine learning, and calculates the noise vector ξ; wherein the function sensitivity and the privacy budget are differential privacy parameters, and differential privacy protects the user's privacy information by adding noise to the query results; the function sensitivity Δf is used to control the size of the generated noise, data num 、data num+1 The set of adjacent data sets that differ by one data record is called the function sensitivity set ΔF, 0≤num≤R, where R is the number of data records in the data set; The step S3 comprises: Step S31: The data owner sends the noise vector ξ, ciphertext and re-encryption key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ Lap(·) represents the Laplace distribution, and the Laplace noise component N is binary expanded to obtain Define the ring element r = (g0, g1, ... g n-1 ), dimension n = 1024; Step S32: Constructing a noise adding algorithm The encoded Laplace noise component N is added to the generated ciphertext In the above example, we get the noisy ciphertext And Perform binary expansion and we get in, represents a residue class ring with modulus 2, where q is the modulus; Step S33: Establish a re-encryption algorithm The noisy ciphertext is encrypted by the re-encryption algorithm Re-encrypt to get the re-encrypted ciphertext in, is the proxy key, is a random ring element.

2. The method according to claim 1, characterized in that The step S1 comprises: From U q and χ e Select ring elements a, s, e respectively, where U q , χ e Ring Uniform distribution and discrete Gaussian distribution on , Represents a finite field Z q The ring of integer polynomials obtained modulo the irreducible polynomial f(x), f(x) = x n +1 is the polynomial x of degree m=2n m -1 cyclotomic polynomial, x is the polynomial variable, Z q [x] is the integer coefficient modulo q,<f(x)> For the polynomial x n +1 generated principal ideal; select safety parameters n = 1024, modulus q = 1073479681.

3. The method according to any one of claims 1 to 2, characterized in that: The step S4 comprises: Building a decryption algorithm Data User j Use the decryption algorithm to re-encrypt the ciphertext Decrypt and get the noise data And decode m′ according to the vector component modulo 2 operation to obtain decoded noise data m″, take the decoded noise data m″ as input, analyze the noise data based on the algorithm corresponding to the machine learning task, and complete the machine learning task.

4. A quantum-safe outsourced machine learning system, characterized in that The system comprises: Key pair generation module: configured to generate a key pair including a public key and a private key for the data owner and the data user respectively using the key generation algorithm KeyGen; Noise calculation module: It is configured to encode the data for the data owner, and encrypt the encoded data using the encryption algorithm Enc to obtain the ciphertext; it generates the proxy key based on the private key of the data owner and the public key of the data user. Based on the machine learning task of the data user, the data owner determines the function sensitivity set ΔF and the privacy budget parameter ε of the machine learning, and calculates the noise vector ξ; Data sending module: configured for the data owner to send the noise vector ξ, ciphertext and proxy key to the cloud service provider CSPs, and CSPs calculates the Laplace noise component based on the noise vector ξ The Laplace noise component Adding to the ciphertext to obtain a noisy ciphertext; re-encrypting the noisy ciphertext based on the proxy key to generate a noisy re-encrypted ciphertext and sending it to the data user; Decryption module: configured for a data user to decrypt the re-encrypted ciphertext to obtain noise data, and to use the noise data as input to analyze the noise data based on the algorithm corresponding to the machine learning task to complete the machine learning task; The noise calculation module comprises: The first submodule: The data owner is configured to perform binary encoding Encode(data) on the data set data∈{0,1,…,n-1}, and obtain datam1(data0,data1,…,data n-1 ), n=1024; The second submodule is configured to convert the encoded data data' and the data owner's public key As the input of the encryption algorithm Enc, select the cyclic prime obey Discrete Gaussian distribution on , calculate the ciphertext in in, is a random ring element, s, e for obedience Ring elements of discrete Gaussian distribution on ; The third submodule: configuration to build a proxy key generation algorithm The proxy key generation algorithm is based on the data owner's private key and the data user's public key Get the proxy key to convert the data owner's ciphertext into the data user's ciphertext; select the ring element e 0,i ,e 1,i ,e 2,i ←χ e , χ e For the ring The error distribution on 0,i ,e 1,i ,e 2,i ←χ e According to the error distribution χ e Perform random sampling; calculate proxy key in, is the proxy key; The fourth submodule is configured as a machine learning task based on the data user. The data owner determines the function sensitivity set ΔF and the privacy budget ε of the machine learning and calculates the noise vector ξ. The function sensitivity and the privacy budget are differential privacy parameters. Differential privacy protects the user's privacy information by adding noise to the query results. The function sensitivity Δf is used to control the size of the generated noise. data num 、data num+1 The set of adjacent data sets that differ by one data record is called the function sensitivity set ΔF, 0≤num≤R, where R is the number of data records in the data set; The data sending module comprises: The fifth submodule is configured for the data owner to send the noise vector ξ, the ciphertext and the re-encryption key to the cloud service provider CSPs, and the CSPs calculates the Laplace noise component based on the noise vector ξ Lap(·) represents the Laplace distribution and the noise component of the Laplace noise Perform binary expansion and we get Define the ring element r = (g0, g1, ... g n-1 ), dimension n = 1024; The sixth submodule: configuration to build a noise adding algorithm The Laplace noise component after encoding Add to the generated ciphertext In the above example, we get the noisy ciphertext And Perform binary expansion and we get in, represents a residue class ring with modulus 2, where q is the modulus; The seventh submodule: configuration to establish a heavy encryption algorithm The noisy ciphertext is encrypted by the re-encryption algorithm Re-encrypt to get the re-encrypted ciphertext in, is the proxy key, is a random ring element.

5. A computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the method as claimed in any one of claims 1 to 3.

6. An electronic device, characterized in that: The electronic device comprises: A processor, which is used to execute multiple instructions; A memory for storing a plurality of instructions; The plurality of instructions are used to be stored in the memory and loaded and executed by the processor according to any one of claims 1 to 3.