Cloud computing-oriented security outsourcing data processing method and device
By using the public key cryptography system in cloud computing to encrypt and convert data, and processing the square root calculations of integer and floating-point parts separately on two cloud servers, the problem that cloud computing cannot perform arithmetic square roots is solved, and safe and efficient data processing and calculation are achieved.
Patent Information
- Application Number
- CN202411403021.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-10-09
AI Technical Summary
Existing cloud computing methods cannot support arithmetic square root calculations in data outsourcing scenarios, which limits the application of cloud computing in certain complex computing scenarios.
The public key and private key are generated through the public key cryptography system, the target data is encrypted, and after being converted into base 100, it is distributed to two independent cloud servers for secure square root calculation. The square root results of the integer part and the floating point part are processed separately, and finally merged to obtain the square root result of the target data.
It enables secure data processing and computing in a cloud computing environment, protects data privacy, and improves computing efficiency and the functionality and scalability of cloud computing.
Smart Images

Figure CN119299160B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a method and device for secure outsourcing data processing for cloud computing. Background Art
[0002] Cloud computing provides a convenient way to store and process massive amounts of data. However, as the complexity of data processing increases, especially in scenarios involving data outsourcing requiring complex calculations, security and computing power issues begin to emerge.
[0003] While Paillier-based solutions can handle simple linear operations like addition, subtraction, multiplication, and division, they present significant challenges with nonlinear operations like calculating square roots. In cloud computing scenarios, the need for square root operations is unavoidable, especially for operations like data normalization and distance calculations. However, the inability to perform square root operations limits these calculations, making secure square root calculations crucial in data outsourcing scenarios.
[0004] Despite advances in cloud computing technology, calculating square roots in data outsourcing scenarios remains an unresolved problem. This not only limits the application of cloud computing in certain areas but also creates challenges for scenarios requiring complex calculations.
[0005] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0006] Embodiments of the present invention provide a secure outsourcing data processing method and device for cloud computing, which at least solves the technical problem that existing secure outsourcing cloud computing methods cannot support the calculation of arithmetic square roots, resulting in significant limitations of cloud computing in data outsourcing scenarios.
[0007] According to one aspect of an embodiment of the present invention, a secure outsourced data processing method for cloud computing is provided, comprising: encrypting target data using a public key to obtain first ciphertext data, and sending the first ciphertext data to a first cloud server, wherein the public key is a public key in a pair of public-private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined based on the private key in the pair of public-private keys; converting the first ciphertext data from decimal to base 100 to obtain second ciphertext data; performing a secure square root integer calculation on the second ciphertext data to obtain an integer part one of the square root result of the second ciphertext data; performing a secure square root floating-point calculation on the second ciphertext data to obtain a floating-point part of the square root result of the second ciphertext data; and obtaining a square root result of the target data based on the integer part one and the floating-point part.
[0008] Optionally, before encrypting the target data using the first public key to obtain the first ciphertext data, the secure outsourced data processing method for cloud computing further includes: generating the pair of public-private keys using the public key cryptography system; extracting the private key from the pair of public-private keys, and dividing the private key into a first private key and a second private key; determining the first cloud server and the second cloud server based on the first private key and the second private key, wherein the first cloud server and the second cloud server are not associated with each other; sending the first private key to the first cloud server, and sending the second private key to the second cloud server.
[0009] Optionally, converting the first ciphertext data from decimal to hundredths to obtain second ciphertext data includes: dividing the first ciphertext data by one hundred through a secure starting calculation protocol to obtain the integer part two after the first ciphertext data is divided by one hundred and the remainder part after the first ciphertext data is divided by one hundred; repeating the above steps, and after each execution of the above steps, recording the remainder part into a predetermined array; replacing the first ciphertext data with the sum of the integer part two in the predetermined array to obtain the second ciphertext data.
[0010] Optionally, a secure square root integer part calculation is performed on the second ciphertext data to obtain the integer part one of the square root result of the second ciphertext data, including: an initialization step of initializing the current remainder value and the sum of the integer part two; a calculation step of using a square root calculation protocol to read in each hundred-bit ciphertext in the predetermined array; an updating step of updating the current remainder value and updating the sum of the integer part two after each execution of the calculation step; a restoration step of restoring the updated current remainder value and the updated sum of the integer part two according to the bit position using a linear multiplication protocol to obtain the integer part one.
[0011] Optionally, a secure square root floating-point part calculation is performed on the second ciphertext data to obtain the floating-point part of the square root result of the second ciphertext data, including: determining the number of bits of precision of the floating-point part; determining the number of predetermined ciphertexts to be supplemented in the bit list according to the number of bits of precision; calculating the floating point of the square root result in decimal to obtain a decimal result; and restoring all the decimal results according to the bit using a linear multiplication protocol to obtain the floating-point part.
[0012] Optionally, generating the pair of public-private keys through the public key cryptography system includes: obtaining a first prime number and a second prime number, wherein the first prime number satisfies a first formula, and the second prime number satisfies a second formula, wherein the first formula is: p′=2p+1, and the second formula is: q′=2q+1, p′ is a first hidden value, p is the first prime number, q′ represents a second hidden value, and q represents the second prime number; calculating a global modulus according to the first hidden value and the second hidden value through a third formula, wherein the third formula is: N=p′*q′, and N represents the global modulus; generating the private key through a fourth formula, wherein the fourth formula is: sk=lcm(p′-1, q′-1), and sk represents the private key; obtaining a generator according to the global modulus, wherein the generator is: g=N+1, and g represents the generator; obtaining the public key according to the global modulus and the generator through a fifth formula, wherein the fifth formula is: pk=(g,N), and pk represents the public key.
[0013] Optionally, encrypting the target data using the public key to obtain the first ciphertext data includes: encrypting the target data using the sixth formula and the public key, wherein the sixth formula is: m=g c *r N modN 2 , m represents the first ciphertext data, c represents the target data, and r is a random number.
[0014] According to another aspect of an embodiment of the present invention, a secure outsourced data processing device for cloud computing is also provided, including: a first processing module, used to encrypt target data through a public key to obtain first ciphertext data, and send the first ciphertext data to a first cloud server, wherein the public key is a public key in a pair of public-private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined according to the private key in the pair of public-private keys; a conversion module, used to convert the first ciphertext data from decimal to base 100 to obtain second ciphertext data; a first calculation module, used to perform a secure square root integer part calculation on the second ciphertext data to obtain the integer part one of the square root result of the second ciphertext data; a second calculation module, used to perform a secure square root floating-point part calculation on the second ciphertext data to obtain the floating-point part of the square root result of the second ciphertext data; an acquisition module, used to obtain the square root result of the target data based on the integer part one and the floating-point part.
[0015] Optionally, the secure outsourced data processing device for cloud computing further includes: a generation module, used to generate the pair of public-private keys through the public key cryptography system before encrypting the target data through the first public key to obtain the first ciphertext data; a second processing module, used to extract the private key from the pair of public-private keys, and split the private key into a first private key and a second private key; a determination module, used to determine the first cloud server and the second cloud server based on the first private key and the second private key, wherein the first cloud server and the second cloud server are not associated with each other; and a sending module, used to send the first private key to the first cloud server, and send the second private key to the second cloud server.
[0016] Optionally, the conversion module includes: a division unit, used to divide the first ciphertext data by one hundred through a secure starting calculation protocol to obtain the integer part two after the first ciphertext data is divided by one hundred and the remainder part after the first ciphertext data is divided by one hundred; a recording unit, used to repeatedly perform the above steps, and after each execution of the above steps, record the remainder part into a predetermined array; a replacement unit, used to replace the first ciphertext data in the predetermined array with the sum of the integer part two to obtain the second ciphertext data.
[0017] Optionally, the first calculation module includes: an initialization unit, used for the initialization step: initializing the current remainder value and the sum of the integer part two; a first calculation unit, used for the calculation step: using the square root calculation protocol to read in each hundred-bit ciphertext in the predetermined array; an update unit, used for the update step: after each execution of the calculation step, updating the current remainder value and updating the sum of the integer part two; a first restoration unit, used for the restoration step: restoring the updated current remainder value and the updated sum of the integer part two according to the bit position using the linear multiplication protocol to obtain the integer part one.
[0018] Optionally, the second calculation module includes: a first determination unit, used to determine the number of bits of precision of the floating-point number part; a second determination unit, used to determine the number of predetermined ciphertexts to be supplemented in the bit list according to the number of bits of precision; a second calculation unit, used to calculate the floating point of the square root result under the decimal system to obtain a decimal result; and a second restoration unit, used to restore all the decimal results according to the bit using a linear multiplication protocol to obtain the floating-point number part.
[0019] Optionally, the generation module includes: a first acquisition unit, configured to acquire a first prime number and a second prime number, wherein the first prime number satisfies a first formula and the second prime number satisfies a second formula, wherein the first formula is: p′=2p+1, and the second formula is: q′=2q+1, where p′ is a first hidden value, p is the first prime number, q′ represents a second hidden value, and q represents the second prime number; and a third calculation unit, configured to calculate a global modulus according to the first hidden value and the second hidden value using a third formula, wherein the third formula is: N= p′*q′, N represents the global modulus; a generation unit is used to generate the private key through a fourth formula, wherein the fourth formula is: sk=lcm(p′-1, q′-1), sk represents the private key; a second acquisition unit is used to obtain a generator according to the global modulus, wherein the generator is: g=N+1, g represents the generator; a third acquisition unit is used to obtain the public key according to the global modulus and the generator through a fifth formula, wherein the fifth formula is: pk=(g,N), pk represents the public key.
[0020] Optionally, the first processing module includes an encryption unit configured to encrypt the target data using a sixth formula and the public key, wherein the sixth formula is: m=g c *r N modN 2 , m represents the first ciphertext data, c represents the target data, and r is a random number.
[0021] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned secure outsourced data processing methods for cloud computing.
[0022] According to another aspect of an embodiment of the present invention, a processor is provided, which is used to run a program, wherein the program executes any one of the above-mentioned secure outsourced data processing methods for cloud computing when running.
[0023] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, which, when executed by a processor, execute any one of the above-mentioned secure outsourced data processing methods for cloud computing.
[0024] In an embodiment of the present invention, target data is encrypted using a public key to obtain first ciphertext data, and the first ciphertext data is sent to a first cloud server, wherein the public key is a public key in a pair of public-private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined based on the private key in the pair of public-private keys; the first ciphertext data is converted from decimal to base 100 to obtain second ciphertext data; a secure square root integer part is calculated on the second ciphertext data to obtain the integer part one of the square root result of the second ciphertext data; a secure square root floating-point part is calculated on the second ciphertext data to obtain the floating-point part of the square root result of the second ciphertext data; and the square root result of the target data is obtained based on the integer part one and the floating-point part. The technical solution provided by the present invention achieves the purpose of outsourcing data to two servers by using the secure arithmetic square root calculation SSQRT method based on the Paillier cryptographic system, so that the data requester can request data from the two servers and perform calculations, thereby achieving the technical effects of secure outsourcing calculations, protecting data privacy and efficient calculations, improving the functionality and scalability of cloud computing, and further solving the technical problem that the existing secure outsourcing cloud computing method cannot support the calculation of arithmetic square roots, resulting in significant limitations of cloud computing in data outsourcing scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 This is a hardware structure block diagram of a mobile terminal for a secure outsourced data processing method for cloud computing according to an embodiment of the present invention;
[0027] Figure 2is a flow chart of a secure outsourced data processing method for cloud computing according to an embodiment of the present invention;
[0028] Figure 3 is a framework diagram of a secure outsourced data processing method for cloud computing according to an embodiment of the present invention;
[0029] Figure 4 is a flowchart of an optional cloud computing-oriented secure outsourcing data processing method according to an embodiment of the present invention;
[0030] Figure 5 2 is a schematic diagram of a secure outsourced data processing device for cloud computing according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] As described in the background, existing cloud computing approaches for secure outsourcing cannot support the calculation of arithmetic square roots, significantly limiting their use in data outsourcing scenarios. To address these limitations, embodiments of the present invention provide a secure outsourcing data processing method and apparatus for cloud computing, a computer-readable storage medium, a processor, and a computer program product.
[0034] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0035] The method embodiments provided in the embodiments of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure diagram of a mobile terminal for a secure outsourced data processing method for cloud computing according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the above mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0036] Memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the secure outsourced data processing method for cloud computing in the embodiments of the present invention. Processor 102 executes the computer programs stored in memory 104 to execute various functional applications and data processing, thereby implementing the aforementioned method. Memory 104 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory remotely located relative to processor 102, which can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. Transmission device 106 is used to receive or transmit data via a network. Specific examples of such networks may include a wireless network provided by the mobile terminal's telecommunications provider. In one example, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0037] According to an embodiment of the present invention, a method embodiment of a secure outsourced data processing method for cloud computing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] Figure 2 FIG. 1 is a flow chart of a secure outsourcing data processing method for cloud computing according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:
[0039] In step S202, the target data is encrypted using a public key to obtain first ciphertext data, and the first ciphertext data is sent to the first cloud server, wherein the public key is a public key in a pair of public-private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined based on the private key in the pair of public-private keys.
[0040] Figure 3 is a framework diagram of a secure outsourcing data processing method for cloud computing according to an embodiment of the present invention. Figure 3 As shown, the data is outsourced to two servers, and the data requester requests data and performs operations on the two servers. The participants include the data provider and two cloud servers (cloud server 1 and cloud server 2) that provide powerful computing power and store encrypted data.
[0041] In this embodiment, the data provider encrypts its own data using the public key pk, converts the original decimal data c into ciphertext data m (i.e., the first ciphertext data), and sends the encrypted data m to the cloud server S1 (i.e., the first cloud server). The cloud server stores the data in the memory and waits for the calculation to be called. Sending the encrypted data to the cloud server can protect the privacy and security of the data. By encrypting the data, it can be ensured that only the data provider with the corresponding private key can decrypt the data, thereby ensuring the confidentiality of the data and preventing the data from being maliciously stolen or tampered with during transmission.
[0042] Figure 4 FIG. 1 is a flow chart of an optional secure outsourcing data processing method for cloud computing according to an embodiment of the present invention. Figure 4 As shown, the data outsourcing process of step 2 is carried out. The data owner uses the public key to encrypt the data c to obtain the ciphertext m and sends it to the cloud server S1. The cloud server S1 stores the encrypted data.
[0043] Step S204: convert the first ciphertext data from decimal to hundred-base to obtain second ciphertext data.
[0044] In this embodiment, a base conversion operation can be performed to convert the ciphertext data m from decimal data to base 100, which can make the original data more difficult to crack and decrypt, effectively increase the complexity of arithmetic operations, make it more difficult for cloud computing service providers to obtain users' original data, and improve data security.
[0045] Step S206 , performing a secure square root integer calculation on the second ciphertext data to obtain the integer part 1 of the square root result of the second ciphertext data.
[0046] In this embodiment, a secure square root integer part calculation can be performed on the second ciphertext data after base conversion to obtain the integer part of the square root result, which is one. By outsourcing the calculation process to a cloud service provider, secure calculation of the data can be achieved without leaking the plaintext data. The secure square root integer part calculation can also achieve encryption and decryption operations on the data while protecting data privacy.
[0047] Step S208 , performing a secure square root floating-point number calculation on the second ciphertext data to obtain a floating-point number part of the square root result of the second ciphertext data.
[0048] In this embodiment, a secure square root floating-point part calculation can be performed on the second ciphertext data after base conversion to obtain the floating-point part of its square root result, so that the outsourced computing service provider cannot directly access the original data and can only perform computing operations on the encrypted data. This can protect data privacy while realizing computing operations on sensitive data.
[0049] Step S210, obtaining a square root result of the target data according to the integer part and the floating point part.
[0050] In this embodiment, the integer part - obtained by calculating the secure square root integer part and the floating-point part obtained by calculating the secure square root floating-point part are integrated together to obtain the square root result of the target data. By calculating the integer part and the floating-point part separately, the calculation efficiency and accuracy can be improved. The final square root result is also encrypted, and only the user with the corresponding key can decrypt it to obtain the final result, so that data processing and calculation can be performed securely in a cloud computing environment.
[0051] As can be seen from the above, in an embodiment of the present invention, target data is encrypted using a public key to obtain first ciphertext data, and the first ciphertext data is sent to a first cloud server, wherein the public key is a public key in a pair of public-private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined based on the private key in the pair of public-private keys; the first ciphertext data is converted from decimal to base 100 to obtain second ciphertext data; a secure square root integer part calculation is performed on the second ciphertext data to obtain the integer part one of the square root result of the second ciphertext data; a secure square root floating-point part calculation is performed on the second ciphertext data to obtain the floating-point part of the square root result of the second ciphertext data; and the square root result of the target data is obtained based on the integer part one and the floating-point part, thereby achieving the purpose of outsourcing data to two servers by using the secure arithmetic square root calculation SSQRT method based on the Paillier cryptography system, so that the data requester can request data from the two servers and perform calculations, thereby achieving the technical effects of secure outsourcing calculation, protecting data privacy, and efficient calculation, and improving the functionality and scalability of cloud computing.
[0052] The technical solution provided by the embodiment of the present invention solves the technical problem that the existing secure outsourcing cloud computing method cannot support the calculation of arithmetic square roots, which makes cloud computing have significant limitations in data outsourcing scenarios.
[0053] According to the above embodiment of the present invention, before encrypting the target data through the first public key to obtain the first ciphertext data, the cloud computing-oriented secure outsourced data processing method also includes: generating a pair of public-private keys through a public key cryptography system; extracting the private key from the pair of public-private keys, and dividing the private key into a first private key and a second private key; determining the first cloud server and the second cloud server based on the first private key and the second private key, wherein the first cloud server and the second cloud server are not associated with each other; sending the first private key to the first cloud server, and sending the second private key to the second cloud server.
[0054] The following combination Figure 4 This embodiment is described as follows. Figure 4 As shown, the system initialization operation is performed. The data provider generates a pair of public and private keys (pk, sk) through the Paillier key system (i.e., public key cryptography system), and divides the private key sk into two parts (sk1, sk2) (i.e., the first private key and the second private key) through the security (2-2) threshold Paillier. Two unrelated cloud servers S1 (i.e., the first cloud server) and S2 (i.e., the second cloud server) are recruited, and the partial key 1sk1 is distributed to the cloud server S1, and the partial key 2sk2 is distributed to the cloud server S2.
[0055] Specifically, in the above key generation process, the private key sk will be divided into partial key 1 and partial key 2sk1,sk2. The divided partial keys need to simultaneously satisfy the constraint equations: sk1+sk2≡0(modsk) and sk1+sk2≡1(modN).
[0056] It should be noted that the above-mentioned Paillier cryptosystem has data-secure addition computing capability, which is implemented by the key generation algorithm KeyGen, secure linear multiplication CMUL, secure comparison method SCMP, secure division CDIV, and secure arithmetic square root calculation SSQRT method.
[0057] According to the above embodiment of the present invention, converting the first ciphertext data from decimal to hundredths to obtain the second ciphertext data includes: dividing the first ciphertext data by one hundred through a secure starting calculation protocol to obtain the integer part two after the first ciphertext data is divided by one hundred and the remainder part after the first ciphertext data is divided by one hundred; repeatedly performing the above steps, and after each execution of the above steps, recording the remainder part into a predetermined array; replacing the first ciphertext data with the sum of the integer part two in the predetermined array to obtain the second ciphertext data.
[0058] In this embodiment, a secure base conversion operation is performed. During the secure square root calculation process, a base conversion operation is first performed to convert the decimal ciphertext data m into base 100 and save it in the base 100 bit list bit in descending order. This process is implemented by the secure division calculation protocol CDIV. Each execution<q,e> ←CDIV(m,100), where q is the integer part of m divided by 100 (i.e., the integer part 2), and e is the remainder of m divided by 100, i.e., m = 100q + e. After each execution, the remainder e is recorded in the bit array, and the dividend m is replaced by the sum of the current high-order bits q. The safe division protocol is looped to complete the safe base conversion process.
[0059] It should be noted that the input parameters of the above secure division calculation protocol CDIV are the encrypted dividend and the unencrypted divisor, and the output is the encrypted integer part q and remainder part e of the division result. First, the quotient result q = 0 is initialized, and the bit position l is calculated from 32 to 0 respectively, and the bit position value ec = divisor × 2 l , calculate the effective value of the result bit eu=SCMP(dividend,ec), update the division result e=dividend and calculate the maximum result of the current bit eu′=CMUL(l,eu -1 modN 2 ), update the current divisor result dividend = (eu + eu ′) -1 +exmodN 2, the final result is e=dividend.
[0060] According to the above embodiment of the present invention, a secure square root integer part calculation is performed on the second ciphertext data to obtain the integer part one of the square root result of the second ciphertext data, including: an initialization step: initializing the current remainder value and the sum of the integer part two; a calculation step: using a square root calculation protocol to read in each hundred-bit ciphertext in a predetermined array; an updating step: after each execution of the calculation step, the current remainder value is updated, and the sum of the integer part two is updated; a restoration step: restoring the sum of the updated current remainder value and the updated integer part two according to the bit position using a linear multiplication protocol to obtain the integer part one.
[0061] In this embodiment, the secure square root integer part is calculated by first initializing a current residual value remain=0, the current high bit sum block=0, and using the square root calculation protocol to read the 100-bit bit array (i.e., the predetermined array) obtained by converting m into each 100-bit ciphertext v i Perform repeated operations, and each calculation first updates the current remaining value remain to remain = remain × 100 + v i Initialize the statistical variable count = 0, calculate the current high-order trial value t = CMUL (CMUL (block, 10) + i, i) one by one from 1 to 10, and update the statistical variable count = count + 1 - SCMP (remain, t) through the security comparison protocol, and record the final statistical variable as a bit of the square root result ans i , and update the current remaining value remain=remain-CMUL(CMUL(block,10)+count,count), update the current high bit sum block=CMUL(block,10)+2×count, and finally restore all the decimal results according to the bit position using the linear multiplication protocol CMUL to obtain the integer part of the square root result ans=∑ i CMUL(ans i ,10 i ) (i.e., the integer part is one), which can protect the privacy of the input data through a secure comparison protocol while ensuring the correctness of the square root calculation.
[0062] It should be noted that the input parameters of the above secure linear multiplication calculation protocol CMUL are the encrypted factor a and the unencrypted factor res mul =a b modN 2 , the output is the encrypted multiplication result res mul , calculation scheme such as res mul =ab modN 2 .
[0063] Specifically, the input parameters of the above-mentioned security comparison method SCMP are the encrypted comparison values x and y, and the output is the comparison result res cmp When x>y, the encrypted 1 is output, otherwise the encrypted 0 is output. The calculation process is as follows: 1) Cloud server S1 generates a random π from a coin toss, which takes a value of 0 or 1; 2) If π=0, cloud server S1 calculates D=r1-r2, otherwise it calculates D=r2-r1, and partially decrypts it to obtain D1. Cloud server S1 sends (D, D1) to cloud server S2; 3) The cloud server partially decrypts D to obtain D2, performs the final decryption through (D, D1), compares the positive and negative relationships, obtains the comparison result, and returns it to cloud server S1. Finally, cloud server S1 calculates π-d to obtain the comparison result.
[0064] According to the above embodiment of the present invention, a secure square root floating-point portion calculation is performed on the second ciphertext data to obtain a floating-point portion of the square root result of the second ciphertext data, including: determining the number of bits of precision of the floating-point portion; determining the number of predetermined ciphertexts to be supplemented in the bit list based on the number of bits of precision; calculating the floating point of the square root result in decimal to obtain a decimal result; and restoring all decimal results according to the bits using a linear multiplication protocol to obtain the floating-point portion.
[0065] In this embodiment, the secure square root floating point part is calculated. The square root fraction calculation first adds the number of digits of precision required for calculation. For each bit in base 10 required, a ciphertext 0 (i.e., the predetermined ciphertext) needs to be added to the bit list. The same calculation process is used to calculate the decimal square root result. i Finally, all decimal results are restored according to the bit position using the linear multiplication protocol CMUL to obtain the square root result floating point part ans = ∑ i CMUL(ans i ,10 -i ).
[0066] According to the above embodiment of the present invention, a pair of public and private keys is generated through a public key cryptography system, including: obtaining a first prime number and a second prime number, wherein the first prime number satisfies a first formula and the second prime number satisfies a second formula, the first formula being: p′=2p+1, the second formula being: q′=2q+1, p′ being a first hidden value, p being a first prime number, q′ being a second hidden value, and q being a second prime number; calculating a global modulus according to the first hidden value and the second hidden value through a third formula, wherein the third formula is: N=p′*q′, and N being a global modulus; generating a private key through a fourth formula, wherein the fourth formula is: sk=lcm(p′-1, q′-1), and sk being a private key; obtaining a generator according to the global modulus, wherein the generator is: g=N+1, and g being a generator; obtaining a public key according to the global modulus and the generator through a fifth formula, wherein the fifth formula is: pk=(g,N), and pk being a public key.
[0067] In this embodiment, to generate a pair of public and private keys, it is first necessary to find two prime numbers p (i.e., the first prime number) and q (i.e., the second prime number), let the hidden value p′=2p+1 (i.e., the first hidden value), q′=2q+1 (i.e., the second hidden value), then calculate the global modulus N=p′*q′, the private key sk=lcm(p′-1, q′-1), and obtain the generator g=N+1 and the public key pk=(g,N).
[0068] According to the above embodiment of the present invention, encrypting the target data by using the public key to obtain the first ciphertext data includes: encrypting the target data by using the sixth formula and the public key, wherein the sixth formula is: m=g c *r N modN 2 , m represents the first ciphertext data, c represents the target data, and r is a random number.
[0069] In this embodiment, when the plaintext c is encrypted using the public key pk=(g, N), the encryption method is as follows: c ·r N modN 2 , where r is a random number. In particular, the encryption process does not support negative c. The two encrypted results m1 and m2 can be calculated by m1·m2 to calculate the ciphertext of m1+m2. The partial decryption method is to perform partial decryption using partial key 1 or 2. The process of partially decrypting m using partial key i is defined as When one party has two partial keys of the same ciphertext m, the partial decryption results P1 and P2 can be obtained through the final decryption.
[0070] The following combination Figure 3 and Figure 4The embodiment is described using specific data. The steps are as follows: 1) System initialization: The data provider generates a pair of public and private keys pk=2287902365992789467006898150002229144226933470054409533567223277434931593035821339666443226915861565767436015857658513484087 818707924986482976922014230607, sk=48272847218803385966996348878505901258862284561775883524770249789315083465953 and split the private key sk into two parts (sk1, sk2) through the secure (2-2) threshold Paillier, recruit two unrelated cloud servers S1 and S2, and convert the partial key 1sk1=1860642 875482172119449567670011177064755179700278707361203626254283314358079072528656279579333343595168058959862433628415 is distributed to cloud server S1, partial key 2 key sk2 = 21447614669662562874731464644538360484678826747322211 15315812503052921368876462670117453335832231001783997519232800574344884176679504151097798265525075894634130321863438716354435855659195106534734423482831310905862737501206869659551 and distributed to cloud server S2.2) In the data outsourcing process pk, the data provider encrypts its own data using the public key, converting the original decimal data c=30 into ciphertext data m=31235922341226550830709474130906919690109320459876669931120968660479467381791898697292901046469773287572054088127789868068168821235670500814317970045 58088266190777040222017565375037578253564263792118166123773907233503471124847419032691100404652335512223377690920333456313741980754664314546908456020574894286, and sends the encrypted data m to the cloud server S1. The cloud server stores the data in memory and waits for the calculation to be called. 3) Secure Base Conversion: During the secure square root calculation process, a base conversion operation is first performed to convert the decimal data to base 100 and save it in a base 100 bit list in descending order.
[0071] bit=[2864884201363770182729599268581861098313953601604396743480726953726867263031845176077923496739111398593571262527272056861999834627044666662096714922824561985953190990510139240780688252826487556168572732264549172874421443951057393690320769900070816372410489493923582962258176409567061838237146493536543716250,446106027092829681782693455375231876969586272593470998458021132037207712868868072315925547194239094354331314228192452042869014288998723055464173176801081866025438606653639310661922164832132780775478127302138097990013153262934173189429388197279249097334947450239607992369279707868369100166577283463232820276,2468985401884944152325489260934806634770654604134894052502715171860486086918011072251355137996133102086595256078622758723485778557353244344591429860061626077912378435761341442927406926675934136108426468740887220723712655401899028378978611687762247713741392322186627573516883075566559460353289196859461501371,3554571029070456172888642281667351735566731697158544615169195298080484161227765493697407582498860737825537542118275602528733217078033094649118195908855530 451540521217732151051838795691183105772591120002291363419530015546633120296027663252494293898321018067817943146272795621018011291402884929289338100386494]. 4) Calculation of the integer part of the safe square root. First, initialize a current remain value to remain=0, the current high bit and block=0, and obtain the count obtained in each round of calculation=[2364388378321766282229050268715908064238478033000257986295938943911415371469664745183571508859431085113381 18747146513129943361998542400900645231077650716591389679134303541414960740582982242314380284692288102773939846456959624588176425515924370443101585609862046667985268289161 4939489235977380668100470098939,126964117841938416634353201943972611168872046943718541556101515843180135322212295481064909667229985274453896004159987166602365699193520290 2190411517214592381332238367711491105104818641240941221536185948534453720417613192004063289874326632147931223692299773977427628067777799997185545862213967760682206961657,2454467028506318645776953689040224732274749910315170646208175211292300371613065937955990150187771030992053950932483245511337254408300547321990480747122393857270035922334400857498549931757267280954690315517667873749527065264158214420953505786829883129725734554112932196476094785872006767268545083886810985097,2845319691399647134163539816636697609160637207926895259624151146049402274423745246861291391241618033682157250847644226368130263210550734901469808047310426078024119466284723671082734704755064905144996180110926056660864367685544497830314100429696605013888634149574561839956937221337363885972090112454114100518],Remain=[1563001560188223744025330272737843650079722110543116857551767017381952262090861088613784663554856844967987754222235049092535609827032746868825334368563347177094509160041183078633891298049425290300357553851773492256136345070505671046091585382647580995790213375967769339153807611038477194133264248758131715524,2296135302402005517954244273025276426315410376429936617957155394966017104411254583698840698659790416091270464301166131849702439681196098408937781367469017268568684444646824256811616772954332214514360195376761395374687174448944149563168504305208318916847169779045605866441133034156468684548298129289297317318,928848746205140131674805247387704837421159047956622491245695671570973063831744928918980487827993467389601745134068324517318147126867051480727419608031392404522050453319658204295289311873375747610251468970731060182596358408227443142246504474069358115852105877732193471314996855610455507256843049534101411069,5234016700614154701295595572863624090257577416548983632559395531111137910489823573403788247462314567334729392753676348546892434648323426273215316910158329780041817045006023934556037680914994646867892584429809622140888709479622724931502556366204698941732348798476824532828630557737559078172563829344415540947],Block=[2777662087201332126820235340304384462155860055196801552397984318169540188072271670856608812420330395017024853553434245269010070571391422996581127813075490128879049405004103988108849867505055730840422167388544997219982724267464151643731885372316858114634767980866386156894558248990643428947889631239046461206,1709059343847582350763413146565671058531774798087124237285701289343507016421278037704666916512273160482019055976119759029301906919379630352151144140837043270711896484311672398692365964974212314175702287510622777392406538202084826945184108323770831041532117123317416554540108564854748160811800910472484378084,4912095398845586689461134789840401662559245045094022762452250406294849134063838460794487078857243350575279344787398259770530872357695825091661596700649857269778904744022489599521964917710515915847830364797069002677633038734630809583011524354263629480265215076757372146476483794872323688373595704685294251163,2469729361315557459062333069377253396798149626608258785560992011064938006859119780684656515610719803938057931115186390727596152770900069294399134402516544 966846324060969174238594308141754013900369203863267419242272203967668876541160253850972234012529068564868952703979904138303053142925423855902903289900851]. 5) Safe square root floating point calculation: For square root fraction calculation, first add 5 digits of precision to be calculated and record 5 zeros. During the calculation, Count = [,145619331197062571085818703808197925505580155051660173875132489023118686522277803237223527680087697853434005170 559393616771492518357212070441543320569300726118469689413365628728240662914954927630085153862372151317708869568208338996005955536252120831551796328609702853210386034616 1935675094938872504091228154,2364222681087271055280957040943719302190864768610728975396837156602399251984920855685199043275386606212832881115922031626196428701488801280 326046148563242211456894367601322079265678903814679887298383847148392394622803386491936550863633599247587667967430291469880945039509067583513950890816446551827720720985,43682006655362250233784136475495721821203913711447921576289664510491585480385016106469054128435287741592670167119508627881423277694196744557720443450014771004766697140711914621984207116894206174748379575952942690331855135389049486457749179043936497993908908881080069846485808699278595803876015874002143436,3004420800234559099047295055552333175932083918683448637037805904524177926674683818902786260411532779723816685192841833091580134045333118000062243718020985011443848364661444778006446785344144527608697404549600903512450807328830787932926966485770365378352315659578322375037528565893421364077837931301754362558,4315625230646132332622169009776592908592401867140093932565660078064471356460756190645398976010952968551987970943355919578360699646142780718615465612146544085911303550821278798009481525405168020211890073853483185596553810193731408154058040330035704223507323791596383703546000417732515248999052250046034769303,2648981116306939571258146251650225396908211606655960294027570884492918864486868497146346428863354164542251687424582006074613172908981045256264779467500814668073258169860668838381187670232118539295534336752709474414293793210395840162992834773287740865137915896194924408056905321869187217343717178776839030039],remain=[1232490514723217837106943425054982598502344449147851511767028460486302088553182309515571653051832709951587954873168780745254220649232146080266686160320565973885986736158516867132322334910239035755165831440448880677105457339284411436345524336821348800107005371481425778706929106412924007852771386276508579299,253676503071469570405176000712904137915342617735911758987358097143060811998623655004320745260719880937453415259303250877695321451975832712064030614364149968116521033906781044011443950044300081213812565510369754132621382512149457754834220502717189287097587046211886438617188616684281147842850666766318569220,4969563778367456453284630980792017673929462660130994551536710135986680922689779867888772711618355528708603531097268406789843656399831711658327779508372245311876835074628613935248615426771630416326316150550186933627731037971396439950261201456384125985595895701098599189139640369623077895791813693372346077296,76792630108885782589206534239587979662397436424762167640238503911746584023878173390780246852693584094249728891828625105233520959549938253202117562622041826583849686717380161923861666951645068909431064290376749143319620906236255206386087773519519355745231636795145126434615210322490877685718539962743844165,3696571622353040787985050002394865396180954305741141546884418718550738687707290553392402044850695950100594485681953983191320647956530538637247511203902909519624406827638177139375710206889855119161186385559721292817501375434410559661497096510280497002118004362141785817712220035681380534500455992971751353642,715246296159213589217140035209524731076829503602198831410204692681001391355155599966552933022528382278151750023535824832115809445631441584814663935212465856548144798846079214947750448768363232663036686372464909671264593571794704807401402136892799575479378976171657429731625906562080898346800246870125300470],block=[218762418738202736371749620809420295629129416435732933613254887790842167216903826135312900705104407353877738470892295652767905336164628120971208586398666349550727953447941419692084012840449032798360768500508961656653710605341161395558487864287538079101891184838130852847641694170096574392878015644028552846,105195409312772230677358678156034242517110661026187315827719798634280467505730966733140729682232774699198621474516550590787142442231503384355355477704959158841598946826526819261826650554082230715194357732068598276656799625998335800424121057998741009477091618268490243672342288938976858353353046802125320542,968557965779567906820808699937091306647338220642031621210651056312421803771234951687101321442978317642447802505345553154349494130693580532777544084673834411076474507533941185055790100355472535063920672229577803839580683764856657130442654074887790804067872720806527202076715589492711881598636712031544558994,3097273396575293994065858570996206710314974256284955674254591319192814304717542355311295106156405248792936397540893445490289924307432117358367296112025881851912661826496119158808082057337039122562094108810096262568138602045123991166071288819132500253142311836634398197341193440092137811370986044594261977651,1939091769555342989607080605006236167841065877063370199785782671241117156268731476697565981368064058514265734274377471710255257226436678222681432245016952911667010651579630486945511269434035594271342665319124333425812420797882275842672614358612684715190693347140521874118840123750051418857042597579398501939,4702899252172039577934370676788471573610590896632227766536175453201437417794083326034533051542452124047554346291274251999293275418753860928721363429478028 051824909245871227693175250187353903610577303057234200871693078779063595308079751666606227251876820643978630288850783893765721442486062083440027457236459]. ,
[0072] Finally, combining the integer and decimal parts gives us the result 51557949485632493411707801380701847569634416125533415855536914905938368498637846051691558550363689048034517387793629051103754638388617034839902546883984 51403427155824712490532035967043839990994427454950933296698271999414807675901438094435264491866427083720272730825721087132748538762679619125874404383638358, and after partial decryption, we get the result 5.47722.
[0073] The technical solutions provided by the above-mentioned embodiments of the present invention propose a method for calculating the arithmetic square root of cloud computing data based on the Paillier cryptographic system. This method implements the secure arithmetic square root calculation (SSQRT) method based on the Paillier cryptographic system. By innovatively overcoming the security barriers of arithmetic square root calculation, data normalization and distance calculation are possible in cloud environments. This effectively implements arithmetic operations that were previously difficult to perform in secure outsourcing scenarios, significantly enriching data call solutions in secure outsourcing scenarios. This provides a more secure and reliable solution for data processing in various fields, and provides strong support for the development of cloud computing applications.
[0074] The technical solutions provided in the above embodiments of the present invention have the following beneficial effects: 1) overcoming the barriers to data security computation in secure outsourcing scenarios, resolving the drawback of being unable to perform arithmetic square root calculations in secure outsourcing scenarios; 2) optimizing the division process between encrypted and unencrypted data under the Paillier cryptosystem, resolving the difficulty of efficiently calculating numerical bits in ciphertext; and 3) further improving computational efficiency by fully leveraging the parallel computing and distributed storage features of cloud computing platforms. Furthermore, the technical solutions address the need for data security and privacy protection in cloud computing environments. By outsourcing data and computing tasks to the cloud service provider's platform, cost savings and flexibility are achieved, making them suitable for a variety of application scenarios, including but not limited to healthcare, social media analysis, and personalized recommendations. In these application scenarios, arithmetic square root calculations on data are often required. However, directly performing such calculations can pose security risks, especially when outsourcing the calculations. This solves the technical problem that existing secure outsourcing cloud computing methods cannot support arithmetic square root calculations. This allows users to better utilize cloud resources and accelerate data processing. This solution fills the gap in the application of arithmetic square root calculation methods in data outsourcing scenarios, providing new possibilities for the further development and application of cloud computing.
[0075] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0077] According to an embodiment of the present invention, there is also provided a cloud computing-oriented secure outsourced data processing device for implementing the above-mentioned cloud computing-oriented secure outsourced data processing method. Figure 5FIG. 1 is a schematic diagram of a secure outsourced data processing device for cloud computing according to an embodiment of the present invention. Figure 5 As shown, the device includes: a first processing module 501, a conversion module 503, a first calculation module 505, a second calculation module 507 and an acquisition module 509. The secure outsourced data processing device for cloud computing is described below.
[0078] The first processing module 501 is used to encrypt the target data through the public key to obtain the first ciphertext data, and send the first ciphertext data to the first cloud server, wherein the public key is the public key in a pair of public-private keys generated by the public key cryptography system, and the first cloud server is the cloud server determined according to the private key in the pair of public-private keys.
[0079] The conversion module 503 is configured to convert the first ciphertext data from decimal to hundred-base 100 to obtain second ciphertext data.
[0080] The first calculation module 505 is configured to perform a secure square root integer calculation on the second ciphertext data to obtain the integer part 1 of the square root result of the second ciphertext data.
[0081] The second calculation module 507 is configured to perform a secure square root floating-point number calculation on the second ciphertext data to obtain a floating-point number part of the square root result of the second ciphertext data.
[0082] The acquisition module 509 is configured to obtain the square root result of the target data according to the integer part and the floating point part.
[0083] It should be noted here that the above-mentioned first processing module 501, conversion module 503, first calculation module 505, second calculation module 507 and acquisition module 509 correspond to steps S202 to S210 in the above-mentioned embodiment. The five modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the contents disclosed in the above-mentioned embodiment.
[0084] As can be seen from the above, in the scheme recorded in the above embodiment of the present invention, the first processing module can first be used to encrypt the target data using the public key to obtain the first ciphertext data, and the first ciphertext data can be sent to the first cloud server, wherein the public key is the public key in a pair of public and private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined according to the private key in the pair of public and private keys; then the conversion module can be used to convert the first ciphertext data from decimal to base 100 to obtain the second ciphertext data; then the first calculation module can be used to perform a secure square root integer part calculation on the second ciphertext data to obtain the integer part of the square root result of the second ciphertext data. The invention discloses a method for obtaining a square root of a target data set by using an integer part 1 and a floating-point part 2; a method for obtaining a square root of a target data set by using an integer part 1 and a floating-point part 3; a method for calculating a secure arithmetic square root SSQRT method based on a Paillier cryptographic system is used to outsource data to two servers, so that a data requester can request data from the two servers and perform calculations, thereby achieving the technical effects of secure outsourcing calculation, protecting data privacy and efficient calculation, and improving the functionality and scalability of cloud computing.
[0085] The technical solution provided by the embodiment of the present invention solves the technical problem that the existing secure outsourcing cloud computing method cannot support the calculation of arithmetic square roots, which makes cloud computing have significant limitations in data outsourcing scenarios.
[0086] In an optional embodiment, the secure outsourced data processing device for cloud computing further includes: a generation module for generating a pair of public-private keys through a public key cryptography system before encrypting the target data through the first public key to obtain the first ciphertext data; a second processing module for extracting the private key from the pair of public-private keys, and dividing the private key into a first private key and a second private key; a determination module for determining the first cloud server and the second cloud server based on the first private key and the second private key, wherein the first cloud server and the second cloud server are not associated with each other; and a sending module for sending the first private key to the first cloud server and sending the second private key to the second cloud server.
[0087] In an optional embodiment, the conversion module includes: a division unit, used to divide the first ciphertext data by one hundred through a secure starting calculation protocol to obtain the integer part two after the first ciphertext data is divided by one hundred and the remainder part after the first ciphertext data is divided by one hundred; a recording unit, used to repeatedly perform the above steps, and after each execution of the above steps, record the remainder part into a predetermined array; a replacement unit, used to replace the first ciphertext data with the sum of the integer part two in the predetermined array to obtain the second ciphertext data.
[0088] In an optional embodiment, the first calculation module includes: an initialization unit, used for the initialization step: initializing the current remainder value and the sum of the integer part two; a first calculation unit, used for the calculation step: using the square root calculation protocol to read in each hundred-bit ciphertext in the predetermined array; an update unit, used for the update step: after each calculation step is executed, the current remainder value is updated, and the sum of the integer part two is updated; a first restoration unit, used for the restoration step: restoring the updated current remainder value and the updated sum of the integer part two according to the bit by bit using the linear multiplication protocol to obtain the integer part one.
[0089] In an optional embodiment, the second calculation module includes: a first determination unit, used to determine the number of bits of precision of the floating-point part; a second determination unit, used to determine the number of predetermined ciphertexts to be supplemented in the bit list based on the number of bits of precision; a second calculation unit, used to calculate the floating point of the square root result in decimal to obtain a decimal result; and a second restoration unit, used to restore all decimal results according to the bit using a linear multiplication protocol to obtain the floating-point part.
[0090] In an optional embodiment, the generation module includes: a first acquisition unit, used to obtain a first prime number and a second prime number, wherein the first prime number satisfies a first formula and the second prime number satisfies a second formula, the first formula being: p′=2p+1, the second formula being: q′=2q+1, p′ being the first hidden value, p being the first prime number, q′ being the second hidden value, and q being the second prime number; a third calculation unit, used to calculate a global modulus according to the first hidden value and the second hidden value by a third formula, wherein the third formula is: N=p′*q′, and N being the global modulus; a generation unit, used to generate a private key by a fourth formula, wherein the fourth formula is: sk=lcm(p′-1, q′-1), and sk being the private key; a second acquisition unit, used to obtain a generator according to the global modulus, wherein the generator is: g=N+1, and g being the generator; a third acquisition unit, used to obtain a public key according to the global modulus and the generator by a fifth formula, wherein the fifth formula is: pk=(g,N), and pk being the public key.
[0091] In an optional embodiment, the first processing module includes: an encryption unit, configured to encrypt the target data using a sixth formula and a public key, wherein the sixth formula is: m=g c *r N modN 2 , m represents the first ciphertext data, c represents the target data, and r is a random number.
[0092] According to another aspect of an embodiment of the present invention, a processor is further provided, which is used to run a program, wherein when the program is run, any one of the above-mentioned secure outsourced data processing methods for cloud computing is executed.
[0093] According to another aspect of an embodiment of the present invention, a computer program product is provided, including computer instructions. When the computer instructions are executed by a processor, any one of the above-mentioned secure outsourced data processing methods for cloud computing is executed.
[0094] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned secure outsourced data processing methods for cloud computing.
[0095] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the communication devices in a communication device group.
[0096] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: encrypting the target data by a public key to obtain first ciphertext data, and sending the first ciphertext data to a first cloud server, wherein the public key is a public key in a pair of public-private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined based on the private key in the pair of public-private keys; converting the first ciphertext data from decimal to base 100 to obtain second ciphertext data; performing a secure square root integer part calculation on the second ciphertext data to obtain the integer part one of the square root result of the second ciphertext data; performing a secure square root floating-point part calculation on the second ciphertext data to obtain the floating-point part of the square root result of the second ciphertext data; and obtaining the square root result of the target data based on the integer part one and the floating-point part.
[0097] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: generating a pair of public-private keys through a public key cryptography system; extracting a private key from the pair of public-private keys, and dividing the private key into a first private key and a second private key; determining a first cloud server and a second cloud server based on the first private key and the second private key, wherein the first cloud server and the second cloud server are not associated with each other; sending the first private key to the first cloud server, and sending the second private key to the second cloud server.
[0098] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: dividing the first ciphertext data by one hundred through a secure starting computing protocol to obtain the integer part two after the first ciphertext data is divided by one hundred and the remainder part after the first ciphertext data is divided by one hundred; repeating the above steps, and after each execution of the above steps, recording the remainder part into a predetermined array; replacing the first ciphertext data with the sum of the integer part two in the predetermined array to obtain the second ciphertext data.
[0099] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for performing the following steps: an initialization step: initializing the current remainder value and the sum of the integer part two; a calculation step: using a square root calculation protocol to read in each hundred-bit ciphertext in a predetermined array; an update step: updating the current remainder value and updating the sum of the integer part two after each calculation step is executed; a restoration step: restoring the updated current remainder value and the updated sum of the integer part two according to the bit position using a linear multiplication protocol to obtain the integer part one.
[0100] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining the number of bits of precision of the floating-point number part; determining the number of predetermined ciphertexts to be supplemented in the bit list based on the number of bits of precision; calculating the floating point of the square root result in decimal to obtain a decimal result; and restoring all decimal results according to the bit position using a linear multiplication protocol to obtain the floating-point number part.
[0101] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining a first prime number and a second prime number, wherein the first prime number satisfies a first formula and the second prime number satisfies a second formula, the first formula being: p′=2p+1, the second formula being: q′=2q+1, p′ being the first hidden value, p being the first prime number, q′ representing the second hidden value, and q representing the second prime number; calculating a global modulus according to the first hidden value and the second hidden value through a third formula, wherein the third formula is: N=p′*q′, and N represents the global modulus; generating a private key through a fourth formula, wherein the fourth formula is: sk=lcm(p′-1, q′-1), and sk represents the private key; obtaining a generator according to the global modulus, wherein the generator is: g=N+1, and g represents the generator; obtaining a public key according to the global modulus and the generator through a fifth formula, wherein the fifth formula is: pk=(g, N), and pk represents the public key.
[0102] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: encrypting the target data using the sixth formula and the public key, wherein the sixth formula is: m=g c *r N modN 2 , m represents the first ciphertext data, c represents the target data, and r is a random number.
[0103] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0104] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0105] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0106] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0107] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0109] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A secure outsourcing data processing method for cloud computing, characterized in that: include: encrypting the target data using a public key to obtain first ciphertext data, and sending the first ciphertext data to a first cloud server, wherein the public key is a public key in a pair of public and private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined based on the private key in the pair of public and private keys; Converting the first ciphertext data from decimal to base 100 to obtain second ciphertext data; Performing a secure square root integer calculation on the second ciphertext data to obtain an integer part of the square root result of the second ciphertext data, that is, one; Performing a secure square root floating-point calculation on the second ciphertext data to obtain a floating-point part of the square root result of the second ciphertext data; Obtain a square root result of the target data according to the integer part and the floating point part; The converting the first ciphertext data from decimal to base 100 to obtain the second ciphertext data includes: dividing the first ciphertext data by 100 using a secure starting computation protocol to obtain an integer part 2 after the first ciphertext data is divided by 100 and a remainder after the first ciphertext data is divided by 100; repeatedly performing the above steps, and after each execution of the above steps, recording the remainder into a predetermined array; and replacing the first ciphertext data in the predetermined array with the sum of the integer part 2 to obtain the second ciphertext data; The method of performing a secure square root integer part calculation on the second ciphertext data to obtain an integer part one of the square root result of the second ciphertext data includes: an initialization step of initializing the sum of the current remainder value and the second integer part; a calculation step of reading each hundred-bit ciphertext in the predetermined array using a square root calculation protocol; an updating step of updating the current remainder value and the sum of the second integer part after each execution of the calculation step; and a restoration step of restoring the sum of the updated current remainder value and the updated second integer part according to the bit position using a linear multiplication protocol to obtain the first integer part. The method of performing a secure square root floating-point calculation on the second ciphertext data to obtain a floating-point part of the square root result of the second ciphertext data includes: determining the number of bits of precision of the floating-point part; determining the number of predetermined ciphertexts to be supplemented in a bit list according to the number of bits of precision; calculating the floating point of the square root result to obtain a decimal result; and restoring all the decimal results according to the bits using a linear multiplication protocol to obtain the floating-point part.
2. The secure outsourcing data processing method for cloud computing according to claim 1, characterized in that: Before encrypting the target data using the first public key to obtain the first ciphertext data, the method further includes: generating the pair of public and private keys by the public key cryptography system; Extracting the private key from the pair of public and private keys, and dividing the private key into a first private key and a second private key; Determining the first cloud server and the second cloud server according to the first private key and the second private key, wherein the first cloud server and the second cloud server are not associated with each other; The first private key is sent to the first cloud server, and the second private key is sent to the second cloud server.
3. The secure outsourcing data processing method for cloud computing according to claim 1, characterized in that: Generating the pair of public and private keys through the public key cryptography system includes: Obtain a first prime number and a second prime number, wherein the first prime number satisfies a first formula and the second prime number satisfies a second formula, and the first formula is: , the second formula is: , is the first hidden value, is the first prime number, represents the second hidden value, represents the second prime number; The global modulus is calculated according to the first hidden value and the second hidden value using a third formula, wherein the third formula is: , represents the global modulus; The private key is generated by the fourth formula, wherein the fourth formula is: , represents the private key; A generator is obtained according to the global modulus, wherein the generator is: , represents the generator; The public key is obtained according to the global modulus and the generator through the fifth formula, wherein the fifth formula is: , Represents the public key.
4. The secure outsourcing data processing method for cloud computing according to claim 3, characterized in that: The target data is encrypted using the public key to obtain first ciphertext data, including: The target data is encrypted using a sixth formula and the public key, wherein the sixth formula is: , represents the first ciphertext data, represents the target data, is a random number.
5. A secure outsourced data processing device for cloud computing, characterized in that: include: a first processing module, configured to encrypt target data using a public key to obtain first ciphertext data, and send the first ciphertext data to a first cloud server, wherein the public key is a public key in a pair of public and private keys generated by a public key cryptography system, and the first cloud server is a cloud server determined based on the private key in the pair of public and private keys; a conversion module, configured to convert the first ciphertext data from decimal to hundred-base 100 to obtain second ciphertext data; a first calculation module, configured to perform a secure square root integer calculation on the second ciphertext data to obtain an integer part -1 of a square root result of the second ciphertext data; a second calculation module, configured to perform a secure square root floating-point number calculation on the second ciphertext data to obtain a floating-point number part of the square root result of the second ciphertext data; An acquisition module, configured to obtain a square root result of the target data according to the integer part and the floating-point part; The conversion module includes: a division unit configured to divide the first ciphertext data by 100 using a secure starting computation protocol to obtain an integer part 2 after the first ciphertext data is divided by 100 and a remainder after the first ciphertext data is divided by 100; a recording unit configured to repeatedly perform the above steps and, after each execution of the above steps, record the remainder into a predetermined array; and a replacement unit configured to replace the first ciphertext data in the predetermined array with the sum of the integer parts 2 to obtain the second ciphertext data. The first calculation module includes: an initialization unit for performing an initialization step: initializing the current remainder value and the sum of the integer part 2; a first calculation unit for performing a calculation step: reading each hundred-bit ciphertext in the predetermined array using a square root calculation protocol; an update unit for performing an update step: updating the current remainder value and the sum of the integer part 2 after each execution of the calculation step; and a first restoration unit for performing a restoration step: restoring the updated sum of the current remainder value and the updated integer part 2 using a linear multiplication protocol according to the bit position to obtain the integer part 1; The second calculation module includes: a first determination unit for determining the number of digits of precision of the floating-point number part; a second determination unit for determining the number of predetermined ciphertexts to be supplemented in the bit list according to the number of digits of precision; a second calculation unit for calculating the floating point of the square root result to obtain a decimal result; and a second restoration unit for restoring all the decimal results according to the bit position using a linear multiplication protocol to obtain the floating-point number part.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the secure outsourced data processing method for cloud computing according to any one of claims 1 to 4 is executed.
7. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the secure outsourcing data processing method for cloud computing according to any one of claims 1 to 4 is executed.
Citation Information
Patent Citations
Confidential computing system
CN115529120A
Fully homomorphic encryption method supporting floating-point number operation in cloud computing environment
CN115801224A