Cloud computing-oriented secure outsourcing data processing method and device

By encrypting and converting data in cloud computing and using the Paillier cryptographic system to perform secure square root calculations, the problem that cloud computing cannot support arithmetic square roots is solved, the secure processing and efficient calculation of data are realized, and the cloud computing is improved Functionality and scalability.

CN119299160AActive Publication Date: 2025-01-10ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411403021.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-10
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

The existing security outsourcing cloud computing method cannot support the calculation of arithmetic square roots, resulting in greater limitations in data outsourcing scenarios.

Method used

The target data is encrypted through the public key, converted to decimal and converted to one hundred. The Paillier cryptographic system is used to calculate the secure square root integer part and floating point part, and finally the square root result of the target data is obtained based on the integer and floating point part. .

Benefits of technology

It realizes the secure data processing and calculation in a cloud computing environment, protects data privacy, improves the functionality and scalability of cloud computing, and overcomes the security barriers of arithmetic square root computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299160A_ABST
    Figure CN119299160A_ABST
Patent Text Reader

Abstract

The invention discloses a secure outsourcing data processing method and device oriented to cloud computing. The method comprises the following steps: performing encryption processing on target data through a public key to obtain first ciphertext data, and sending the first ciphertext data to a first cloud server; converting the first ciphertext data from a decimal system to a hundred system to obtain second ciphertext data; performing security square root integer part calculation on the second ciphertext data to obtain an integer part I of a square root result of the second ciphertext data; performing security square root floating-point part calculation on the second ciphertext data to obtain a floating-point part of a square root result of the second ciphertext data; and obtaining a square root result of the target data according to the integer part I and the floating-point part. According to the method and the device, the technical problem that the existing safe outsourcing cloud computing mode cannot support calculation of arithmetic square roots, so that the cloud computing has relatively large limitation in a data outsourcing scene is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a cloud computing-oriented secure outsourcing data processing method and device. 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 that requires complex calculations, issues of security and computing power begin to emerge.

[0003] Although the Paillier-based solution can satisfy simple linear operations such as addition, subtraction, multiplication and division, it has great difficulties in nonlinear operations such as arithmetic square root calculation. In cloud computing scenarios, the need for square root operations is unavoidable when performing operations such as data normalization and distance calculation. However, the inability to perform square root operations will limit these calculations. Therefore, implementing secure square root calculations in data outsourcing scenarios has become a crucial task.

[0004] At present, although cloud computing technology has made progress in many aspects, the calculation method of arithmetic square root in data outsourcing scenarios is still an unresolved problem. This not only limits the application of cloud computing in certain fields, but also causes troubles in many scenarios that require complex calculations.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present invention provide a secure outsourcing data processing method and device for cloud computing, so as to at least solve the technical problem that the existing secure outsourcing cloud computing method cannot support the calculation of arithmetic square roots, which makes cloud computing have great limitations 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 by 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 according to 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 the square root result of the target data according to the integer part one and the floating-point part.

[0008] Optionally, before encrypting the target data through the first public key to obtain the first ciphertext data, the secure outsourced data processing method for cloud computing also includes: generating the pair of public-private keys through 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 hundred to obtain second ciphertext data includes: dividing the first ciphertext data by one hundred through a secure starting calculation protocol to obtain integer part two after the first ciphertext data is divided by one hundred and a 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: initializing the current remainder value and the sum of the integer part two; a calculation step: using the square root calculation protocol to read in each hundred-bit ciphertext in the predetermined array; an updating step: after each execution of the calculation step, updating the current remainder value and updating the sum of the integer part two; a restoring step: restoring the updated current remainder value and the updated sum of the integer part two according to the bit by bit 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 a 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 a 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 bits 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 by using a public key to obtain the first ciphertext data includes: encrypting the target data by 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.

[0014] According to another aspect of an embodiment of the present invention, a secure outsourcing 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 hundredths to obtain second ciphertext data; a first calculation module, used to calculate the secure square root integer part of 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 calculate the secure square root floating-point part of 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 according to the integer part one and the floating-point part.

[0015] Optionally, the secure outsourcing 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 in the pair of public-private keys, and divide 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; 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 an integer part two after the first ciphertext data is divided by one hundred and a remainder part after the first ciphertext data is divided by one hundred; a recording unit, used to repeatedly execute 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 by bit 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 in decimal 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, used 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, 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′, N represents the global modulus; a generating unit, 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 acquiring unit, used to obtain a generator according to the global modulus, wherein the generator is: g=N+1, g represents the generator; a third acquiring unit, 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 outsourcing data processing methods for cloud computing.

[0022] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor 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, including computer instructions, which, when executed by a processor, perform any one of the above-mentioned secure outsourcing data processing methods for cloud computing.

[0024] In an embodiment of the present invention, target data is encrypted by 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 according to 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 an 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 a floating-point part of the square root result of the second ciphertext data; and the square root result of the target data is obtained according to the integer part one and the floating-point part. Through the technical solution provided by the present invention, the purpose of outsourcing data to two servers is achieved 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 It is a hardware structure block diagram of a mobile terminal of a secure outsourcing data processing method for cloud computing according to an embodiment of the present invention;

[0027] Figure 2is a flow chart of a secure outsourcing data processing method for cloud computing according to an embodiment of the present invention;

[0028] Figure 3 is a framework diagram of a secure outsourcing data processing method for cloud computing according to an embodiment of the present invention;

[0029] Figure 4 is a flow chart of an optional cloud computing-oriented secure outsourcing data processing method according to an embodiment of the present invention;

[0030] Figure 5 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 scheme of the present invention, the technical scheme 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 described embodiments 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 creative work should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the specification 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 data 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 that are 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 introduced in the background technology, the existing cloud computing methods for secure outsourcing cannot support the calculation of arithmetic square roots, which makes cloud computing have great limitations in data outsourcing scenarios. In view of the above defects, in the embodiments of the present invention, a secure outsourcing data processing method and device for cloud computing, a computer-readable storage medium, a processor, and a computer program product are provided.

[0034] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with 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 FIG. 1 is a hardware structure block diagram of a mobile terminal of a secure outsourcing 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 in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the secure outsourcing data processing method for cloud computing in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific example of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate 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 comprises the following steps:

[0039] Step S202, 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 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.

[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 requesting direction 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 uses the public key pk to encrypt 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 is a flowchart of an optional cloud computing-oriented secure outsourcing data processing method 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 hundredth 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 an 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 one of the square root result. 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, thereby protecting data privacy while realizing computing operations on sensitive data.

[0049] Step S210, obtaining the square root result of the target data according to the integer part 1 and the floating point part.

[0050] In this embodiment, the integer part one obtained by calculating the secure square root integer part and the floating-point part obtained by calculating the secure square root floating-point part, the integer part and the decimal 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 has the corresponding key to decrypt and 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, the target data is encrypted by 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 cryptographic system, and the first cloud server is a cloud server determined according to 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 an 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 a floating point part of the square root result of the second ciphertext data; the square root result of the target data is obtained according to 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 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 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 great limitations in data outsourcing scenarios.

[0053] According to the above embodiment of the present invention, before the target data is encrypted by the first public key to obtain the first ciphertext data, the secure outsourced data processing method for cloud computing also includes: generating a pair of public-private keys by 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] Combine the following 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, recruits two unrelated cloud servers S1 (i.e., the first cloud server) and S2 (i.e., the second cloud server), distributes part of the key 1sk1 to the cloud server S1, and distributes part of the key 2sk2 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, and 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 cryptographic system 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, the first ciphertext data is converted from decimal to hundred to obtain the second ciphertext data, including: 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. In the secure square root calculation process, a base conversion operation is first performed to convert the decimal ciphertext data m into a base 100 ciphertext data and save it in a base 100 bit list bit in order from high to low. 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 current high-order sum q, and the safe division protocol is cycled 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 the square root calculation protocol to read in each hundred-bit ciphertext in the predetermined array; an update 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 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.

[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 in m and convert each 100-bit ciphertext v in the 100-bit bit array (i.e., the predetermined array) 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) 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 -1), 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 security comparison method SCMP are the encrypted comparison values ​​x and y, and the output is the comparison result res cmp , when x>y, output the encrypted 1, otherwise output the encrypted 0. The calculation process is as follows: 1) Cloud server S1 generates a random π from a coin toss, with a value of 0 or 1; 2) If π=0, cloud server S1 calculates D=r1-r2, otherwise calculates D=r2-r1, and partially decrypts 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 part is calculated for 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 digits 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 digits 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 part.

[0065] In this embodiment, the secure square root floating point part is calculated. The square root fraction calculation first supplements the number of digits of precision that need to be calculated. For each bit in the decimal system, a ciphertext 0 (i.e., a predetermined ciphertext) needs to be supplemented in 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 cryptographic 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 is: p′=2p+1, the second formula is: q′=2q+1, p′ is a first hidden value, p is a first prime number, q′ represents a second hidden value, and q represents 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 represents a global modulus; generating a private key through a fourth formula, wherein the fourth formula is: sk=lcm(p′-1, q′-1), and sk represents a private key; obtaining a generator according to the global modulus, wherein the generator is: g=N+1, and g represents 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 represents 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, in the process of encrypting the plaintext c 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 c being a negative number. 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 finally decrypted to obtain the plaintext

[0070] Combine the following Figure 3 and Figure 4The embodiment is described using specific data, and 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 distributed to cloud server S1, partial key 2 key sk2 = 21447614669662562874731464644538360484678826747322211 15315812503052921368876462670117453335832231001783997519232800574344884176679504151097798265525075894634130321863438716354435855659195106534734423482831310905862737501206869659551 is distributed to cloud server S2.2) Data outsourcing process pk, the data provider uses the public key to encrypt the original decimal data c=30 into ciphertext data m=31235922341226550830709474130906919690109320459876669931120968660479467381791898697292901046469773287572054088127789868068168821235670500814317970045 58088266190777040222017565375037578253564263792118166123773907233503471124847419032691100404652335512223377690920333456313741980754664314546908456020574894286, and send the encrypted data m to the cloud server S1, which saves the data in memory and waits for the calculation to be called. 3) Secure base conversion, in the secure square root calculation process, first perform base conversion operation, convert the decimal data into base 100, and save it in the base 100 bit list in order from high to low.

[0071] bit=[2864884201363770182729599268581861098313953601604396743480726953726867263031845176077923496739111398593571262527272056861999834627044666662096714922824561985953190990510139240780688252826487556168572732264549172874421443951057393690320769900070816372410489493923582962258176409567061838237146493536543716250,446106027092829681782693455375231876969586272593470998458021132037207712868868072315925547194239094354331314228192452042869014288998723055464173176801081866025438606653639310661922164832132780775478127302138097990013153262934173189429388197279249097334947450239607992369279707868369100166577283463232820276,2468985401884944152325489260934806634770654604134894052502715171860486086918011072251355137996133102086595256078622758723485778557353244344591429860061626077912378435761341442927406926675934136108426468740887220723712655401899028378978611687762247713741392322186627573516883075566559460353289196859461501371,3554571029070456172888642281667351735566731697158544615169195298080484161227765493697407582498860737825537542118275602528733217078033094649118195908855530 451540521217732151051838795691183105772591120002291363419530015546633120296027663252494293898321018067817943146272795621018011291402884929289338100386494]. 4) Calculation of the integer part of the safe square root. First, initialize a current residual value 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) Calculation of the floating-point part of the safe square root. For the square root fraction calculation, first add 5 digits of precision to be calculated and record 5 0s. During the calculation process, 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, combine the integer and decimal parts to get the result 51557949485632493411707801380701847569634416125533415855536914905938368498637846051691558550363689048034517387793629051103754638388617034839902546883984 51403427155824712490532035967043839990994427454950933296698271999414807675901438094435264491866427083720272730825721087132748538762679619125874404383638358, and the result is 5.47722 after partial decryption.

[0073] Through the technical solution provided by the above embodiment of the present invention, a method for calculating the arithmetic square root of cloud computing data based on the Paillier cryptographic system is proposed, and the method is based on the Paillier cryptographic system to implement the secure arithmetic square root calculation SSQRT method. By innovatively overcoming the security barriers of arithmetic square root calculation, it is possible to perform data normalization and distance calculation in a cloud environment, and arithmetic operations that were originally difficult to achieve in a security outsourcing scenario can be effectively achieved, thereby greatly enriching the data call scheme in the security outsourcing scenario, providing a more secure and reliable solution for data processing in various fields, and providing strong support for the development of cloud computing applications.

[0074] In the technical solution provided in the above embodiment of the present invention, the following beneficial effects are achieved: 1) the barrier of data security calculation in the security outsourcing scenario is overcome, and the defect that the arithmetic square root calculation cannot be realized in the security outsourcing scenario is solved; 2) the division process of encrypted data and unencrypted data under the Paillier cryptographic system is optimized, and the difficulty of efficiently calculating the numerical bit under the ciphertext is solved; 3) by making full use of the parallel computing and distributed storage characteristics of the cloud computing platform, the computing efficiency is further improved. At the same time, the demand for data security and privacy protection in the cloud computing environment is solved, and cost savings and flexibility are achieved by outsourcing data and computing tasks to the platform of the cloud service provider. It is suitable for a variety of application scenarios, including but not limited to medical care, social media analysis and personalized recommendation. In these application scenarios, it is often necessary to calculate the arithmetic square root of the data. However, there may be security risks in directly performing such calculations, especially in the case of outsourcing calculations, that is, the technical problem that the existing secure outsourcing cloud computing method cannot support the calculation of the arithmetic square root is solved. It allows users to better utilize cloud resources and accelerate the data processing process. It fills the gap in the application of the arithmetic square root calculation method of cloud computing technology in the data outsourcing scenario, and provides 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 the present application is not limited by the described order of actions, because according to the present 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 the present 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 a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an 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 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 cloud computing-oriented secure outsourced data processing method. Figure 5is a schematic diagram of a secure outsourcing 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 outsourcing 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 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.

[0079] The conversion module 503 is used to convert the first ciphertext data from decimal to hundredth base to obtain second ciphertext data.

[0080] The first calculation module 505 is used to perform a secure square root integer calculation on the second ciphertext data to obtain an integer part 1 of the square root result of the second ciphertext data.

[0081] The second calculation module 507 is used 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 used to obtain the square root result of the target data according to the integer part one 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 embodiments, and the five modules are the same as the instances and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiments.

[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 through 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 a public key in a pair of public-private keys generated by a public key cryptographic system, and the first cloud server is a cloud server determined according to the private key in the pair of public-private keys; then the conversion module can be used to convert the first ciphertext data from decimal to hundredths 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 element by using a secure arithmetic square root calculation method based on the Paillier cryptographic system, and a method for outsourcing data to two servers so that a data requester can request data from the two servers and perform calculations. The method realizes 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 great limitations in data outsourcing scenarios.

[0086] In an optional embodiment, the secure outsourcing data processing device for cloud computing further includes: a generation module, used to generate 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, used to extract the private key in the pair of public-private keys, and divide 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.

[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 execute 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, which is used for the initialization step: initializing the current remainder value and the sum of the integer part two; a first calculation unit, which is used for the calculation step: using the square root calculation protocol to read in each hundred-bit ciphertext in a predetermined array; an update unit, which is 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, which is 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 according to 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 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, the first formula is: p′=2p+1, the second formula is: q′=2q+1, p′ is a first hidden value, p is a first prime number, q′ represents a second hidden value, and q represents a second prime number; a third calculation unit, used to calculate 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 a global modulus; a generation unit, used to generate a private key through a fourth formula, wherein the fourth formula is: sk=lcm(p′-1, q′-1), and sk represents a 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 represents a generator; a third acquisition unit, used to obtain 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 a public key.

[0091] In an optional embodiment, the first processing module includes: an encryption unit, which is used to encrypt 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.

[0092] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor 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, which, when executed by a processor, execute any one of the above-mentioned secure outsourcing data processing methods for cloud computing.

[0094] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes any one of the above-mentioned secure outsourcing 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, a computer-readable storage medium is configured to store a 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 according to 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 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 an integer part two after the first ciphertext data is divided by one hundred and a 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: after each calculation step is executed, the current remainder value is updated, and the sum of the integer part two is updated; 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 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 decimal results according to the bit 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 a global modulus; generating a private key through a fourth formula, wherein the fourth formula is: sk=lcm(p′-1, q′-1), and sk represents a private key; obtaining a generator according to the global modulus, wherein the generator is: g=N+1, and g represents 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 represents a public key.

[0102] Optionally, in this embodiment, the computer-readable storage medium is configured to store a program code 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 only for description 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 emphasis. 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 schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, 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 separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on 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, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of 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, in essence, 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a 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 and other 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 principle of the present invention. These improvements and modifications should also be regarded as 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 by 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 according to the private key in the pair of public and private keys; Convert the first ciphertext data from decimal to hundredths 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; 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; The square root result of the target data is obtained according to the integer part one and the floating point part.

2. The secure outsourcing data processing method for cloud computing according to claim 1 is characterized in that: Before encrypting the target data by using the first public key to obtain the first ciphertext data, the method further includes: Generate the pair of public and private keys through 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; Determine 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 is characterized in that: Converting the first ciphertext data from decimal to base 100 to obtain second ciphertext data includes: Dividing the first ciphertext data by 100 through a secure starting calculation 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; Repeat the above steps, and after each step, record the remainder into a predetermined array; The first ciphertext data is replaced with the sum of the second integer parts in the predetermined array to obtain the second ciphertext data.

4. The secure outsourcing data processing method for cloud computing according to claim 3 is characterized in that: 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 includes: Initialization step: initializing the sum of the current remainder value and the second integer part; Calculation step: using a square root calculation protocol by reading in each hundred-bit ciphertext in the predetermined array; Updating step: after each execution of the calculation step, updating the current remaining value and updating the sum of the second integer part; Restoration step: restore the sum of the updated current residual value and the updated integer part two according to the bit position using a linear multiplication protocol to obtain the integer part one.

5. The secure outsourcing data processing method for cloud computing according to claim 3 is characterized in that: 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 includes: Determining the number of digits of precision of the floating point number portion; Determining the number of predetermined ciphertexts to be supplemented in the bit list according to the number of digits of precision; Calculate the floating point of the square root result in decimal to obtain a decimal result; All the decimal results are restored bit by bit using a linear multiplication protocol to obtain the floating point number part.

6. The secure outsourcing data processing method for cloud computing according to claim 2 is 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: ′ =2p+1, the second formula is: q ′ =2q+1,p ′ is the first hidden value, p is the first prime number, q ′ represents the second hidden value, and q represents the second prime number; The global modulus is calculated according to the first hidden value and the second hidden value by a third formula, wherein the third formula is: N=p ′ *q ′ , N represents the global modulus; The private key is generated by the fourth formula, wherein the fourth formula is: sk = lcm (p ′ -1,q ′ - 1), sk represents the private key; Obtaining a generator according to the global modulus, wherein the generator is: g=N+1, g 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: pk=(g,N), and pk represents the public key.

7. The secure outsourcing data processing method for cloud computing according to claim 6 is characterized in that: The target data is encrypted by using a public key to obtain first ciphertext data, including: The target data is encrypted 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.

8. A secure outsourcing data processing device for cloud computing, characterized in that: include: A first processing module is used to encrypt the target data by 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 according to the private key in the pair of public and private keys; A conversion module, used for converting the first ciphertext data from decimal to hundredths 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 is used to obtain the square root result of the target data according to the integer part one and the floating point part.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the secure outsourcing data processing method for cloud computing according to any one of claims 1 to 7.

10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the secure outsourcing data processing method for cloud computing according to any one of claims 1 to 7 is performed.

Citation Information

Patent Citations

  • Confidential computing system

    CN115529120A

  • Fully homomorphic encryption method supporting floating-point number operation in cloud computing environment

    CN115801224A

  • Privacy protection big data principal component analysis method and system based on homomorphic encryption

    CN117439731A

  • Computing circuit, chip and computing device

    CN118259873A

  • SECURE EXECUTION FOR MULTI-PROCESSOR UNITS THROUGH TRUSTED EXECUTION ENVIRONMENTS

    DE102022124368A1