WO2023197995A1 - 同态加密操作方法、装置和电子设备 - Google Patents
同态加密操作方法、装置和电子设备 Download PDFInfo
- Publication number
- WO2023197995A1 WO2023197995A1 PCT/CN2023/087309 CN2023087309W WO2023197995A1 WO 2023197995 A1 WO2023197995 A1 WO 2023197995A1 CN 2023087309 W CN2023087309 W CN 2023087309W WO 2023197995 A1 WO2023197995 A1 WO 2023197995A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- result
- exponentiation
- parameter
- homomorphic encryption
- query
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000004364 calculation method Methods 0.000 claims description 36
- 238000004422 calculation algorithm Methods 0.000 description 34
- 238000005516 engineering process Methods 0.000 description 13
- 230000008520 organization Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000000694 effects Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000000654 additive Substances 0.000 description 1
- 230000000996 additive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012946 outsourcing Methods 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012954 risk control Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/008—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L9/3006—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
- H04L9/3033—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters details relating to pseudo-prime or prime number generation, e.g. primality test
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/04—Masking or blinding
- H04L2209/043—Masking or blinding of tables, e.g. lookup, substitution or mapping
Definitions
- the embodiments of this specification relate to the field of Internet technology, and in particular, to a homomorphic encryption operation method, device and electronic equipment.
- homomorphic encryption is a widely used technology. Homomorphic encryption technology allows organizations to perform operations on ciphertext. It is a widely applicable technology. However, homomorphic encryption also has shortcomings. The calculation speed is very slow, making typical data modeling tasks take dozens of hours to complete.
- the embodiments of this specification provide a homomorphic encryption operation method, device and electronic equipment to reduce the time of exponentiation and improve the calculation speed of homomorphic encryption.
- embodiments of this specification provide a homomorphic encryption operation method, which is applied to electronic devices participating in homomorphic encryption operations.
- the method includes: determining a homomorphic encryption operation to be performed on specified business data.
- the homomorphic encryption operation is used to provide privacy protection for the business data; obtain the base parameter and exponent parameter of the power operation included in the homomorphic encryption operation; query the exponentiation result cache table corresponding to the base parameter according to the exponent parameter , obtain the result of the exponentiation operation; complete the homomorphic encryption operation according to the result of the exponentiation operation.
- the above homomorphic encryption operation method after determining the homomorphic encryption operation to be performed on the specified business data, obtain the base parameter and exponent parameter of the power operation included in the above homomorphic encryption operation, and then query the above base parameter based on the above exponent parameter.
- the corresponding exponentiation result cache table obtains the result of the above exponent operation, and finally completes the homomorphic encryption operation based on the result of the above exponent operation, so that the exponentiation result cache table can be used to greatly reduce the number of multiplication calculations in the exponent operation.
- the amplitude reduces the time required for exponentiation operations, which can improve the performance of homomorphic encryption.
- obtaining the base parameter of the power operation included in the homomorphic encryption operation includes: obtaining the public key used in the homomorphic encryption operation; obtaining the homomorphic encryption key from the public key.
- the base parameter of the exponentiation operation included in the state encryption operation includes: obtaining the public key used in the homomorphic encryption operation; obtaining the homomorphic encryption key from the public key.
- querying the exponentiation result cache table corresponding to the base parameter according to the exponent parameter, and obtaining the exponentiation result includes: obtaining the exponent parameter in the current operation cycle and the The number of query rows in the exponentiation result cache table in the current operation cycle, and the number of exponentiation results included in each row in the exponentiation result cache table; when the obtained exponent parameter is not equal to the first value, if the If the result of the AND operation between the obtained exponential parameter and the quantity is greater than the first value, then the exponentiation result cache table is queried according to the number of query rows and the result of the AND operation; the exponentiation obtained by the query is The operation result is multiplied with the exponentiation result of the previous operation cycle and is used as the exponentiation result of the current operation cycle.
- the method further includes: when the obtained index parameter is equal to the first value, exiting the current operation cycle; and the power operation result of the previous operation cycle is used as The final exponentiation result.
- the method further includes: multiplying the exponentiation result in the current operation cycle.
- the quotient of the exponent parameter and the width of the exponentiation result cache table is used as the exponent parameter in the next operation cycle; and the number of query rows is increased by a predetermined step size.
- querying the exponentiation result cache table according to the number of query rows and the AND operation result includes: obtaining the difference between the result of the AND operation minus the second value; In the exponentiation result cache table, query to obtain the exponentiation result based on the row corresponding to the query row number and the column corresponding to the difference.
- querying the exponentiation result cache table corresponding to the base parameter according to the exponent parameter, and before obtaining the exponentiation result further includes: according to the homomorphic encryption operation including The base parameter of the power operation and the predetermined width are used to generate a power operation result cache table corresponding to the base parameter.
- inventions of this specification provide a homomorphic encryption operation device.
- the homomorphic encryption operation device is provided in an electronic device participating in a homomorphic encryption operation.
- the device includes: a determination module, configured to determine whether a specified The homomorphic encryption operation to be performed on the business data, the homomorphic encryption operation is used to provide privacy protection for the business data; the acquisition module is used to acquire the base parameter and the exponent parameter of the power operation included in the homomorphic encryption operation; A query module, used to query the exponentiation result cache table corresponding to the base parameter according to the exponent parameter, and obtain the result of the exponentiation; an encryption module, used to complete the homomorphism according to the result of the exponent operation.
- Crypto operations used to complete the homomorphism according to the result of the exponent operation.
- the acquisition module is specifically used to obtain the public key used in the homomorphic encryption operation, and obtain the base parameter of the exponentiation operation included in the homomorphic encryption operation from the public key. .
- the query module includes: a parameter acquisition sub-module, used to obtain the exponential parameter in the current operation cycle and the number of query rows of the exponentiation result cache table in the current operation cycle, and Obtain the number of exponentiation results included in each row in the exponentiation result cache table; the result query submodule is used for current When the index parameter obtained by the parameter acquisition sub-module is not equal to the first value, if the result of the AND operation between the index parameter obtained by the parameter acquisition sub-module and the quantity is greater than the first value, then according to the query line Sum the result of the AND operation, and query the exponentiation result cache table; the calculation submodule is used to multiply the exponentiation result obtained by querying the result query submodule with the exponentiation result of the previous operation cycle, as The exponentiation result of the current operation cycle.
- a parameter acquisition sub-module used to obtain the exponential parameter in the current operation cycle and the number of query rows of the exponentiation result cache table in the current operation cycle, and Obtain
- the calculation sub-module is also configured to, after the parameter acquisition sub-module acquires the index parameter in the current operation cycle, when the index parameter acquired by the parameter acquisition sub-module is equal to the first value When , exit the current operation cycle; the exponentiation result of the previous operation cycle is used as the final exponentiation result.
- the query module also includes: a parameter setting sub-module, used in the calculation sub-module to multiply the exponentiation result obtained by the query with the exponentiation result of the previous operation cycle, as the current After the exponentiation result of the operation cycle, the quotient of the exponent parameter in the current operation cycle and the width of the exponentiation result cache table is used as the exponent parameter in the next operation cycle; and the number of query lines is increased by a predetermined amount step length.
- a parameter setting sub-module used in the calculation sub-module to multiply the exponentiation result obtained by the query with the exponentiation result of the previous operation cycle, as the current After the exponentiation result of the operation cycle, the quotient of the exponent parameter in the current operation cycle and the width of the exponentiation result cache table is used as the exponent parameter in the next operation cycle; and the number of query lines is increased by a predetermined amount step length.
- the result query sub-module is specifically used to obtain the difference between the result of the AND operation minus the second value, and in the exponentiation result cache table, according to the query row The row corresponding to the number and the column corresponding to the difference are queried to obtain the exponentiation result.
- the device further includes: a generation module, configured to query the exponentiation result cache table corresponding to the base parameter according to the exponent parameter in the query module, and obtain the exponentiation result cache table. Before the result, a power operation result cache table corresponding to the base parameter is generated according to the base parameter of the power operation included in the homomorphic encryption operation and the predetermined width.
- a generation module configured to query the exponentiation result cache table corresponding to the base parameter according to the exponent parameter in the query module, and obtain the exponentiation result cache table.
- a power operation result cache table corresponding to the base parameter is generated according to the base parameter of the power operation included in the homomorphic encryption operation and the predetermined width.
- embodiments of this specification provide an electronic device, including: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores a program that can be executed by the processor. Instructions, the processor calls the program instructions to be able to execute the method provided in the first aspect.
- embodiments of this specification provide a non-transitory computer-readable storage medium that stores computer instructions, and the computer instructions cause the computer to execute the method provided in the first aspect.
- Figure 1 is a schematic diagram of a power operation algorithm provided by related technologies
- Figure 2 is a flow chart of a homomorphic encryption operation method provided by an embodiment of this specification
- Figure 3 is a flow chart of a homomorphic encryption operation method provided by another embodiment of this specification.
- Figure 4 is a flow chart of a homomorphic encryption operation method provided by yet another embodiment of this specification.
- Figure 5 is a schematic structural diagram of a homomorphic encryption operating device provided by an embodiment of this specification.
- Figure 6 is a schematic structural diagram of a homomorphic encryption operating device provided by another embodiment of this specification.
- FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of this specification.
- Homomorphic encryption A form of encryption that allows people to perform specific forms of algebraic operations on ciphertext to obtain an encrypted result, and decrypt it to obtain the same result as performing the same operation on plaintext. In other words, this technology allows people to perform algebraic calculations on encrypted data and get the correct results without having to decrypt the data during the entire process.
- Homomorphic encryption includes fully homomorphic encryption and semi-homomorphic encryption: 1) Fully homomorphic encryption: It supports homomorphic encryption algorithms that perform addition and multiplication on ciphertext at the same time.
- Organization A uses its own private key to decrypt and obtain the final calculation result a+b. In this process, organization A and organization B cannot infer each other. Although the other party's data is not available, the calculation results are obtained, which has the effect of "available and invisible" data, which satisfies business needs very well. (Note: In the above addition example, institution A can infer b based on the summation result, but if institution B performs a more complex operation, then institution A cannot infer institution B's data.)
- homomorphic encryption has good cryptographic properties, its shortcomings are also obvious, that is, the calculation is very slow.
- the ciphertext calculation is about 5,000 times slower than the plaintext calculation. This makes homomorphic encryption lose a lot of practical value and can only be used in some very special applications. on simple calculation scenarios.
- the two perform a total of 17 multiplications.
- the calculation speed is relatively slow.
- the embodiments of this specification provide a homomorphic encryption operation method, which can greatly improve the performance of the homomorphic encryption algorithm.
- Tests of the paillier algorithm and the OU algorithm show that after using the homomorphic encryption operation method provided by the embodiments of this specification , the algorithm performance is greatly improved compared with the original algorithm performance without using the above method.
- the homomorphic encryption operation method provided in the embodiments of this specification is suitable for the OU algorithm and the paillier algorithm.
- the OU algorithm and the paillier algorithm are both relatively popular homomorphic encryption algorithms in the industry. Their core calculation processes are similar, so they can be used.
- the homomorphic encryption operation method is introduced in the embodiment of this specification by taking the OU algorithm as an example.
- the main operations of the OU algorithm include encryption, decryption, ciphertext + ciphertext, ciphertext + plaintext, ciphertext * plaintext.
- the method provided by the embodiment of this specification greatly accelerates the encryption operation and the "ciphertext + plaintext" operation. Function, the methods and principles are now introduced as follows.
- the keys of the OU algorithm are divided into public keys and private keys.
- the public key is (n, g, h) and the private key is (p, q).
- the decrypted c 3 is equal to m 1 + m 2 , which is equivalent to the operation of cipher text c 1 + plain text m 2 .
- the "encryption" and “ciphertext + plaintext” operations in the OU algorithm both involve the power operation g m . Since g is an element in the public key, once the public key is determined, the value of g It is fixed. According to this feature, the calculation of g m can be optimized to improve the calculation speed of homomorphic encryption.
- the public key is public, and each participant will send its public key to other participants. Assume that there are two participants in the homomorphic encryption operation, A and B. After A and B respectively generate their own public and private key pairs, they broadcast their public keys to each other. In other words, A sends his public key A to B, B sends his public key B to A.
- the embodiment of this specification introduces the concept of cache table.
- the embodiment of this specification calculates a cache table for g in the public key. Table, the cache table can be used to quickly calculate g m .
- the cache table calculated by the embodiment of this specification can be:
- a cache table must be calculated for each public key. Still taking the example of participants including A and B, since A has two public keys, public key A and public key B, A needs to calculate cache tables for public key A and public key B respectively.
- Public keys are used for encryption and ciphertext operations.
- A there are two scenarios: 1) A encrypts its own data and sends it to B, using public key A. In this process, the cache table corresponding to public key A can be searched , to obtain the result of the exponentiation operation; 2) A receives the encrypted data from B and needs to perform operations on the ciphertext, so it needs to use public key B. In this process, it can search the cache table corresponding to public key B and obtain The result of the exponentiation operation.
- the cache table only needs to be calculated once during initialization and will not change subsequently.
- the width 8 of the cache table is an adjustable configuration. The larger the width, the more elements there are in the cache table, and the better the calculation acceleration effect, but it will take up more storage space.
- the width value of the cache table meets the requirement of 2 raised to the Nth power. In actual use, the width can be set to 128 or 256.
- the calculation method using the cache table can be as follows:
- the result of g m can be quickly obtained, and then the "encryption" operation in the OU algorithm and the "ciphertext + plaintext” operation can be completed quickly, thereby improving homomorphic encryption. performance. Since the paillier algorithm is similar to the OU algorithm, the homomorphic encryption method provided in the embodiments of this specification is also applicable to the paillier algorithm.
- Figure 2 is a flow chart of a homomorphic encryption operation method provided by an embodiment of this specification.
- the above homomorphic encryption operation method can be applied to electronic devices participating in homomorphic encryption operations.
- the above homomorphic encryption operation method can It includes: step 202, determining the homomorphic encryption operation to be performed on the specified business data, and the above-mentioned homomorphic encryption operation is used to provide privacy protection for the above-mentioned business data.
- business data may be data provided by users in application scenarios such as cloud service computing, outsourcing computing, and/or federated learning. These data often involve the privacy of users or their customers. Therefore, it is necessary to Privacy protection through homomorphic encryption.
- Step 204 Obtain the base parameter and exponent parameter of the power operation included in the above homomorphic encryption operation.
- the base parameter is g and the exponent parameter The number is m.
- obtaining the base parameter of the power operation included in the above-mentioned homomorphic encryption operation may be: obtaining the public key used in the above-mentioned homomorphic encryption operation, and obtaining the base parameter of the power operation included in the above-mentioned homomorphic encryption operation from the above-mentioned public key.
- the public key is public.
- Each participant will send its public key to other participants, and the base parameter is an element of the public key. Therefore, after obtaining the public key, the homomorphic encryption operation Participants can obtain the above-mentioned base parameters from the above-mentioned public key.
- Step 206 Query the exponentiation result cache table corresponding to the base parameter according to the exponent parameter to obtain the exponentiation result.
- the result of g m can be obtained by querying the above exponentiation result cache table.
- Step 208 Complete the homomorphic encryption operation based on the result of the above exponentiation operation.
- the above homomorphic encryption operation method after determining the homomorphic encryption operation to be performed on the specified business data, obtain the base parameter and exponent parameter of the power operation included in the above homomorphic encryption operation, and then query the above base parameter based on the above exponent parameter.
- the corresponding exponentiation result cache table obtains the result of the above exponent operation, and finally completes the homomorphic encryption operation based on the result of the above exponent operation, so that the exponentiation result cache table can be used to greatly reduce the number of multiplication calculations in the exponent operation.
- the amplitude reduces the time required for exponentiation operations, which can improve the performance of homomorphic encryption.
- FIG 3 is a flow chart of a homomorphic encryption operation method provided by another embodiment of this specification. As shown in Figure 3, in the embodiment shown in Figure 2 of this specification, step 206 may include:
- Step 302 Obtain the exponent parameter in the current operation cycle and the number of query rows in the exponentiation result cache table in the current operation cycle, and obtain the number of exponentiation results included in each row in the exponentiation result cache table.
- the number of exponentiation results included in each row in the above-mentioned exponentiation result cache table can be determined according to the cache table width, which is generally the cache table width minus 1. For example, when the cache table width is 8, the above number can be 7.
- Step 304 When the obtained index parameter is not equal to the first value, if the result of the AND operation between the obtained index parameter and the above-mentioned quantity is greater than the first value, query the above-mentioned exponentiation result based on the above-mentioned query row number and the result of the AND operation. Cache table.
- the size of the above-mentioned first value can be determined according to system performance and/or implementation requirements during specific implementation. Setting, this embodiment does not limit the size of the above-mentioned first numerical value.
- the above-mentioned first numerical value may be 0.
- querying the above-mentioned exponentiation result cache table can be: obtaining the difference after the above-mentioned result of the AND operation minus the second value; in the above-mentioned exponentiation result cache table, according to the above-mentioned Query the row corresponding to the row number, the column corresponding to the above difference, and obtain the exponentiation result.
- the size of the above-mentioned second value can be set according to system performance and/or implementation requirements during specific implementation. This embodiment does not limit the size of the above-mentioned second value.
- the above-mentioned second value can be 1. .
- Step 306 Multiply the exponentiation result obtained from the query and the exponentiation result of the previous operation cycle as the exponentiation result of the current operation cycle.
- step 306 it may also include: step 308, using the quotient of the exponent parameter in the current operation cycle and the width of the exponentiation result cache table as the exponent parameter in the next operation cycle; and converting the query line The number is increased by a predetermined step size.
- the above-mentioned predetermined step size can be set according to system performance and/or implementation requirements during specific implementation. This embodiment does not limit the size of the above-mentioned predetermined step size.
- the above-mentioned predetermined step size can be 1.
- steps 302 to 308 can be executed in a loop. In this way, during the loop execution, if the exponential parameter in the current operation cycle obtained in step 302 is equal to the first value, the current operation cycle will be exited and the value of the previous operation cycle will be returned. The result of the exponentiation operation is used as the final exponentiation result.
- Figure 4 is a flow chart of a homomorphic encryption operation method provided by another embodiment of this specification. As shown in Figure 4, in the embodiment shown in Figure 2 of this specification, before step 206, it may also include: step 402. According to the above, The state encryption operation includes the base parameter of the power operation and the predetermined width, and generates the exponentiation result cache table corresponding to the above base parameter.
- a cache table must be calculated for each public key.
- Participants A and B Take the participants A and B as an example. After A and B generate their own public and private key pairs respectively, they broadcast their public keys to each other. That is to say, A sends his public key A to B, and B sends his own public key A to B. Public key B is sent to A. In this way, for A, since A has two public keys, public key A and public key B, A needs to calculate the exponentiation result cache table for public key A and public key B respectively.
- the cache table only needs to be calculated once during initialization and will not change subsequently.
- the above-mentioned predetermined width is the width of the cache table.
- This width is an adjustable configuration. The larger the width, the more elements there are in the cache table, and the better the calculation acceleration effect, but it will take up more storage space.
- the width value of the cache table needs to meet the requirement of 2 raised to the Nth power. In actual use, the width can be set to 128 or 256.
- the above homomorphic encryption operation method can greatly reduce the number of multiplication calculations in exponentiation operations, thus greatly reducing the time required for exponentiation operations, greatly improving the performance of homomorphic encryption, making homomorphic encryption more efficient.
- Encryption technology can be applied to actual scenarios, which is of great help to the promotion and implementation of privacy protection technology.
- FIG. 5 is a schematic structural diagram of a homomorphic encryption operation device provided by an embodiment of this specification.
- the above-mentioned homomorphic encryption operation device is provided in an electronic device participating in a homomorphic encryption operation.
- the above-mentioned homomorphic encryption operation device can It includes: determination module 51, acquisition module 52, query module 53 and encryption module 54; among which, the determination module 51 is used to determine the homomorphic encryption operation to be performed on the specified business data, and the above-mentioned homomorphic encryption operation is used to provide the above-mentioned business
- the data provides privacy protection;
- the acquisition module 52 is used to obtain the base parameter and the exponent parameter of the power operation included in the above-mentioned homomorphic encryption operation;
- the query module 53 is used to query the power operation result cache table corresponding to the above-mentioned base parameter according to the above-mentioned exponent parameter. , obtain the result of the above-mentioned exponentiation operation;
- the encryption module 54
- the homomorphic encryption operation device provided by the embodiment shown in Figure 5 can be used to execute the technical solution of the method embodiment shown in Figure 2 of this specification. For its implementation principles and technical effects, further reference can be made to the relevant descriptions in the method embodiments.
- Figure 6 is a schematic structural diagram of a homomorphic encryption operation device provided by another embodiment of this specification.
- the acquisition module 52 Specifically, it is used to obtain the public key used in the above-mentioned homomorphic encryption operation, and obtain the base parameter of the power operation included in the above-mentioned homomorphic encryption operation from the above-mentioned public key.
- the query module 53 may include: a parameter acquisition sub-module 531, a result query sub-module 532 and a calculation sub-module 533; wherein the parameter acquisition sub-module 531 is used to acquire the index parameters in the current operation cycle and the above-mentioned current operation.
- the result query sub-module 532 is used to obtain the exponential parameters obtained by the parameter acquisition sub-module 531
- the result query sub-module 532 is used to obtain the exponential parameters obtained by the parameter acquisition sub-module 531
- the result of the AND operation between the exponential parameter obtained by the parameter acquisition sub-module 531 and the above-mentioned quantity is greater than the first value, then the above-mentioned exponentiation result cache table is queried according to the above-mentioned query row number and the above-mentioned result of the AND operation.
- Calculation sub-module 533 used to multiply the exponentiation result obtained from the query of the result query sub-module 532 with the exponentiation result of the previous operation cycle, as the exponentiation result of the current operation cycle.
- calculation sub-module 533 is also used to exit the current operation cycle when the index parameter obtained by the parameter acquisition sub-module 531 is equal to the first value after the parameter acquisition sub-module 531 obtains the index parameter in the current operation cycle; the above one The exponentiation result of the operation cycle is used as the final exponentiation result.
- the query module 53 may also include: a parameter setting sub-module 534; a parameter setting sub-module 534 for multiplying the exponentiation result obtained by the query with the exponentiation result of the previous operation cycle in the calculation sub-module 533, as the current After the exponentiation result in the operation cycle, the quotient of the exponent parameter in the current operation cycle and the width of the exponentiation result cache table is used as the exponent parameter in the next operation cycle; and the number of query lines is increased by a predetermined step.
- the result query sub-module 532 is specifically used to obtain the difference after subtracting the second value from the result of the AND operation.
- the above difference corresponds to Column, the query obtains the exponentiation result.
- the above-mentioned homomorphic encryption operation device may also include: a generation module 55; a generation module 55, used in the query module 53 to query the exponentiation result cache table corresponding to the above-mentioned base parameter according to the above-mentioned exponent parameter, and obtain the above-mentioned exponentiation result cache table.
- a power operation result cache table corresponding to the above base parameter is generated based on the base parameter of the power operation included in the above homomorphic encryption operation and the predetermined width.
- the homomorphic encryption operation device provided by the embodiment shown in Figure 6 can be used to execute the technical solutions of the method embodiments shown in Figures 2 to 4 of this specification. For its implementation principles and technical effects, further reference can be made to the relevant descriptions in the method embodiments.
- Figure 7 is a schematic structural diagram of an electronic device according to an embodiment of this specification.
- the electronic device may include at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores data that can be
- the program instructions executed by the processor can execute the homomorphic encryption operation method provided by the embodiment shown in Figures 2 to 4 of this specification by calling the program instructions.
- the above-mentioned electronic device may be a device participating in a homomorphic encryption operation. This embodiment does not limit the form of the above-mentioned electronic device.
- FIG. 7 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure.
- the electronic device shown in FIG. 7 is only an example and should not impose any restrictions on the functions and scope of use of the embodiments of this specification.
- the electronic device takes the form of a general computing device.
- the components of the electronic device may include, but are not limited to: one or more processors 410, a communication interface 420, a memory 430, and a communication bus 440 connecting different components (including the memory 430, the communication interface 420, and the processor 410).
- Communications bus 440 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, or a local bus using any of a variety of bus structures.
- the communication bus 440 may include, but is not limited to, an industry standard architecture (ISA) bus, a micro channel architecture (MCA) bus, an enhanced ISA bus, a video electronics standards association (video electronics standards association) bus. standards association, VESA) local bus and peripheral component interconnection (PCI) bus.
- ISA industry standard architecture
- MCA micro channel architecture
- VESA video electronics standards association
- PCI peripheral component interconnection
- Electronic devices typically include a variety of computer system readable media. These media can be any electronic device capable of Available media that can be accessed, including volatile and non-volatile media, removable and non-removable media.
- Memory 430 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and/or cache memory.
- the memory 430 may include at least one program product having a set of (for example, at least one) program modules configured to perform the functions of the embodiments shown in FIGS. 2 to 4 of this specification.
- a program/utility having a set of (at least one) program modules including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored in memory 430 , each of these examples or some combination may include the implementation of a network environment.
- Program modules generally perform functions and/or methods in the embodiments described in Figures 2 to 4 of this specification.
- the processor 410 executes various functional applications and data processing by running programs stored in the memory 430, for example, implementing the homomorphic encryption operation method provided by the embodiments shown in FIGS. 2 to 4 of this specification.
- Embodiments of this specification provide a non-transitory computer-readable storage medium.
- the non-transitory computer-readable storage medium stores computer instructions.
- the computer instructions cause the computer to execute the embodiments shown in Figures 2 to 4 of this specification.
- the above-mentioned non-transitory computer-readable storage medium may adopt any combination of one or more computer-readable media.
- the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
- the computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof.
- a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
- a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including - but not limited to - electromagnetic signals, optical signals, or any suitable combination of the above.
- a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
- Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the foregoing. combine.
- suitable medium including but not limited to wireless, wireline, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the foregoing. combine.
- RF radio frequency
- Computer program code for performing the operations described herein may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional Procedural programming language—such as "C" or a similar programming language.
- the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
- the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g. Use an Internet service provider to connect via the Internet).
- LAN local area network
- WAN wide area network
- references to the terms “one embodiment,” “some embodiments,” “an example,” “specific examples,” or “some examples” or the like means that specific features are described in connection with the embodiment or example.
- structures, materials or features are included in at least one embodiment or example of this specification.
- the schematic expressions of the above terms are not necessarily directed to the same embodiment or example.
- the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
- those skilled in the art may combine and combine different embodiments or examples and features of different embodiments or examples described in this specification unless they are inconsistent with each other.
- first and second are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as “first” and “second” may explicitly or implicitly include at least one of these features.
- plurality means at least two, such as two, three, etc., unless otherwise clearly and specifically limited.
- the word “if” as used here may be interpreted as “when” or “when” “when” or “in response to determination” or “in response to detection.”
- the phrase “if determination” or “if detection (stated condition or event)” may be interpreted as “when determination” or “In response to determining” or “When (stated condition or event) is detected” or “In response to detecting (stated condition or event)”.
- terminals involved in the embodiments of this specification may include, but are not limited to, personal computers (PCs), personal digital assistants (Personal Digital Assistants, PDAs), wireless handheld devices, tablet computers, Mobile phones, MP3 players, MP4 players, etc.
- the disclosed systems, devices and methods can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined. Either it can be integrated into another system, or some features can be ignored, or not implemented.
- the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
- each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
- the above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium.
- the above-mentioned software functional unit is stored in a storage medium and includes a number of instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute the methods described in various embodiments of this specification. Some steps.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other various media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Storage Device Security (AREA)
Abstract
本说明书实施例提出了一种同态加密操作方法、装置和电子设备。所述同态加密操作方法包括:确定对指定的业务数据所要执行的同态加密操作,获取所述同态加密操作包含的幂运算的底数参数和指数参数;根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果;根据所述幂运算的结果,完成所述同态加密操作。
Description
本说明书实施例涉及互联网技术领域,尤其涉及一种同态加密操作方法、装置和电子设备。
机构之间经常会有联合营销和/或联合风控之类的业务需求,传统的解决方法是把所有机构的数据集中到一起,再执行集中式建模任务。但是,随着各类隐私保护法案的出台,数据跨机构交易、流动已经被禁止,如何在保护用户隐私数据的前提下完成联合计算和/或联合建模任务,已成为学术界、工业界的研究热点。
在众多隐私保护技术中,同态加密是一种应用比较广泛的技术,同态加密技术允许机构在密文上做运算,是一种适用度很广的技术,但是,同态加密也有缺点,就是计算的速度非常慢,使得典型的数据建模任务需要几十个小时才能完成。
因此需要提供一种方案,提高同态加密的计算速度。
发明内容
本说明书实施例提供了一种同态加密操作方法、装置和电子设备,以减少幂运算的时间,提高同态加密的计算速度。
第一方面,本说明书实施例提供一种同态加密操作方法,应用于参与同态加密操作的电子设备,所述方法包括:确定对指定的业务数据所要执行的同态加密操作,所述同态加密操作用于为所述业务数据提供隐私保护;获取所述同态加密操作包含的幂运算的底数参数和指数参数;根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果;根据所述幂运算的结果,完成所述同态加密操作。
上述同态加密操作方法中,确定对指定的业务数据所要执行的同态加密操作之后,获取上述同态加密操作包含的幂运算的底数参数和指数参数,然后根据上述指数参数,查询上述底数参数对应的幂运算结果缓存表,获取上述幂运算的结果,最后根据上述幂运算的结果,完成同态加密操作,从而可以实现通过幂运算结果缓存表,大大减少幂运算中乘法的计算次数,大幅度减少了幂运算需要的时间,进而可以提升同态加密的性能。
其中一种可能的实现方式中,所述获取所述同态加密操作包含的幂运算的底数参数包括:获取所述同态加密操作中使用的公钥;从所述公钥中获取所述同态加密操作包含的幂运算的底数参数。
其中一种可能的实现方式中,所述根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果包括:获取当前运算周期中的指数参数和所述当前运算周期中所述幂运算结果缓存表的查询行数,以及获取所述幂运算结果缓存表中每行包括的幂运算结果的数量;当获取的指数参数不等于第一数值时,如果所述获取的指数参数与所述数量进行与运算的结果大于所述第一数值,则根据所述查询行数和所述与运算的结果,查询所述幂运算结果缓存表;将查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果。
其中一种可能的实现方式中,所述获取当前运算周期中的指数参数之后,还包括:当获取的指数参数等于第一数值时,退出当前运算周期;以上一运算周期的幂运算结果,作为最终的幂运算结果。
其中一种可能的实现方式中,所述将查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果之后,还包括:将所述当前运算周期中的指数参数与所述幂运算结果缓存表的宽度之商,作为下一运算周期中的指数参数;以及将所述查询行数增加预定步长。
其中一种可能的实现方式中,所述根据所述查询行数和所述与运算结果,查询所述幂运算结果缓存表包括:获取所述与运算的结果减去第二数值之后的差;在所述幂运算结果缓存表中,根据所述查询行数对应的行,所述差对应的列,查询获得幂运算结果。
其中一种可能的实现方式中,所述根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果之前,还包括:根据所述同态加密操作包含的幂运算的底数参数和预定的宽度,生成所述底数参数对应的幂运算结果缓存表。
第二方面,本说明书实施例提供一种同态加密操作装置,所述同态加密操作装置设置在参与同态加密操作的电子设备中,所述装置包括:确定模块,用于确定对指定的业务数据所要执行的同态加密操作,所述同态加密操作用于为所述业务数据提供隐私保护;获取模块,用于获取所述同态加密操作包含的幂运算的底数参数和指数参数;查询模块,用于根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果;加密模块,用于根据所述幂运算的结果,完成所述同态加密操作。
其中一种可能的实现方式中,所述获取模块,具体用于获取所述同态加密操作中使用的公钥,从所述公钥中获取所述同态加密操作包含的幂运算的底数参数。
其中一种可能的实现方式中,所述查询模块包括:参数获取子模块,用于获取当前运算周期中的指数参数和所述当前运算周期中所述幂运算结果缓存表的查询行数,以及获取所述幂运算结果缓存表中每行包括的幂运算结果的数量;结果查询子模块,用于当
所述参数获取子模块获取的指数参数不等于第一数值时,如果所述参数获取子模块获取的指数参数与所述数量进行与运算的结果大于所述第一数值,则根据所述查询行数和所述与运算的结果,查询所述幂运算结果缓存表;计算子模块,用于将所述结果查询子模块查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果。
其中一种可能的实现方式中,所述计算子模块,还用于在所述参数获取子模块获取当前运算周期中的指数参数之后,当所述参数获取子模块获取的指数参数等于第一数值时,退出当前运算周期;以上一运算周期的幂运算结果,作为最终的幂运算结果。
其中一种可能的实现方式中,所述查询模块还包括:参数设置子模块,用于在所述计算子模块将查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果之后,将所述当前运算周期中的指数参数与所述幂运算结果缓存表的宽度之商,作为下一运算周期中的指数参数;以及将所述查询行数增加预定步长。
其中一种可能的实现方式中,所述结果查询子模块,具体用于获取所述与运算的结果减去第二数值之后的差,在所述幂运算结果缓存表中,根据所述查询行数对应的行,所述差对应的列,查询获得幂运算结果。
其中一种可能的实现方式中,所述装置还包括:生成模块,用于在所述查询模块根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果之前,根据所述同态加密操作包含的幂运算的底数参数和预定的宽度,生成所述底数参数对应的幂运算结果缓存表。
第三方面,本说明书实施例提供一种电子设备,包括:至少一个处理器;以及与所述处理器通信连接的至少一个存储器,其中:所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行第一方面提供的方法。
第四方面,本说明书实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行第一方面提供的方法。
应当理解的是,本说明书实施例的第二~四方面与本说明书实施例的第一方面的技术方案一致,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
为了更清楚地说明本说明书实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书的一些实施例,对于
本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为相关技术提供的一种幂运算算法的示意图;
图2为本说明书一个实施例提供的同态加密操作方法的流程图;
图3为本说明书另一个实施例提供的同态加密操作方法的流程图;
图4为本说明书再一个实施例提供的同态加密操作方法的流程图;
图5为本说明书一个实施例提供的同态加密操作装置的结构示意图;
图6为本说明书另一个实施例提供的同态加密操作装置的结构示意图;
图7为本说明书一个实施例提供的电子设备的结构示意图。
为了更好的理解本说明书的技术方案,下面结合附图对本说明书实施例进行详细描述。
应当明确,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本说明书保护的范围。
在本说明书实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书。在本说明书实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
同态加密(homomorphic encryption):一种加密形式,它允许人们对密文进行特定形式的代数运算得到仍然是加密的结果,将其解密所得到的结果与对明文进行同样的运算结果一样。换言之,这项技术令人们可以在加密的数据中进行代数计算并得出正确的结果,而在整个处理过程中无需对数据进行解密。同态加密包括全同态加密和半同态加密:1)全同态加密:同时支持在密文上做加法和乘法的同态加密算法,此类算法同时满足:Enc(a)+Enc(b)=Enc(a+b)和Enc(a)*Enc(b)=Enc(a*b);2)半同态加密:只支持在密文上做一种运算的同态加密算法,例如:paillier算法和Okamoto-Uchiyama(以下简称:OU)算法属于加法同态算法,满足Enc(a)+Enc(b)=Enc(a+b);RSA是乘法同态加密算法,满足Enc(a)*Enc(b)=Enc(a*b),这类算法只支持一种同态计算,统称半同态加密算法。
同态加密是一种比较新颖的密码学技术,同态加密允许人们对密文进行特定形式的代数运算得到仍然是加密的结果,将其解密所得到的结果与对明文进行同样的运算结果
一样。举例来说,机构A有数据a,机构B有数据b,机构A可以把数据a全都用同态加密起来得到Enc(a),之后机构A把密文Enc(a)发给机构B,机构B直接在密文上做计算Enc(a)+b=Enc(a+b),机构B得到的计算结果仍旧是密文,因此机构B无法感知到机构A的原始数据a。最后,机构B把计算结果Enc(a+b)发回给机构A,机构A用自己的私钥解密得到最终的计算结果a+b,在这个过程中,机构A和机构B相互不能推断出对方数据,但是却获得了计算结果,起到了数据“可用不可见”的效果,很好的满足了业务需求。(注:在上述加法例子中,机构A可以根据求和结果反推b,但如果机构B执行的是更加复杂的运算,那么机构A是无法反推出机构B的数据的。)
同态加密虽然有良好的密码学特性,但是缺点也很明显,那就是计算非常慢,密文计算大概比明文计算慢5000倍,使得同态加密失去了很多实用价值,只能应用在一些非常简单的计算场景上。
同态加密慢的原因是要频繁计算gm,相关技术中的幂运算是把m二分,然后计算gm,一种常见的幂运算算法可以如图1所示,图1为相关技术提供的一种幂运算算法的示意图。
以计算g283为例,2.1行的A*=S总共执行了9次乘法,2.3行的S*=S总共执行了8次乘法,两者合计执行了17次乘法,计算速度是比较慢的。
为了解决上述问题,本说明书实施例提供一种同态加密操作方法,可以大幅提升同态加密算法的性能,从paillier算法与OU算法测试显示,使用本说明书实施例提供的同态加密操作方法之后,算法性能与未使用上述方法的原始算法性能相比,性能得到很大提升。
本说明书实施例提供的同态加密操作方法适用于OU算法和paillier算法,OU算法和paillier算法都是业界比较流行的同态加密算法,其核心计算过程类似,因此都可以使用本说明书实施例提供的同态加密操作方法,本说明书实施例以OU算法为例进行介绍。OU算法的主要操作包括加密、解密、密文+密文,密文+明文,密文*明文,本说明书实施例提供的方法对加密操作,以及“密文+明文”操作有很大的加速作用,现将方法与原理介绍如下。
(一)原始算法
1)OU算法的密钥分为公钥和私钥,其密钥生成算法如下:步骤1,生成两个大素数p和q;步骤2,计算n=p2q;步骤3,随机选择g满足g<n且gp-1≠1 mod p2;步骤4,计算h=gn mod n。
这样,公钥为(n,g,h),私钥为(p,q)。
2)OU算法中的加密操作可以为:输入明文m<p,然后执行以下步骤:步骤1,随机选择正整数r,满足r<n;步骤2,计算c=gmhr mod n。这样,c即为对明文m进行加密获得的密文。
3)OU算法中的密文+明文操作可以为:给定密文c1=Enc(m1)、明文m2,然后执行以下步骤:步骤1,计算
其中,解密后的c3等于m1+m2,相当于进行了密文c1+明文m2的操作。
通过以上描述可以看出,OU算法中的“加密”和“密文+明文”操作都涉及到幂运算操作gm,由于g是公钥中的元素,因此一旦公钥确定之后,g的值就是固定的,根据这个特点,可以对gm的计算进行优化,从而提高同态加密的计算速度。
(二)本说明书实施例提供的同态加密方法
同态加密操作中,公钥是公开的,每个参与方都会把自身的公钥发给其他参与方。假设同态加密操作有A和B这2个参与方,那么A和B分别生成自己的公私钥对之后,将自身的公钥广播给对方,也就是说,A将自己的公钥A发送给B,B将自己的公钥B发送给A。
针对上述“底数固定,指数变化”的场景,本说明书实施例引入缓存表的概念,当同态加密操作的参与方接收到公钥时,本说明书实施例针对公钥中的g计算一张缓存表,利用缓存表可以达到快速计算gm的目的。
举例来说,假设底数为g,缓存表宽度为8,那么本说明书实施例计算得到的缓存表可以为:
g1,g2,g3,g4,g5,g6,g7
g8,g16,g24,g32,g40,g48,g56
g64,g128,g192,g256,…
g512,…
…
具体实现时,对于每个参与方来说,每个公钥都要计算一张缓存表。仍以参与方包括A和B为例,由于A有公钥A和公钥B这2个公钥,因此A需要分别针对公钥A和公钥B计算缓存表。
加密和密文运算会用到公钥,对于A来说,存在两种场景:1)A加密自己的数据发送给B,使用公钥A,此过程中,可以查找公钥A对应的缓存表,获得幂运算的结果;2)A收到B发来的加密数据,需要在密文上进行运算,那么需要用到公钥B,此过程中,可以查找公钥B对应的缓存表,获得幂运算的结果。
缓存表只需要在初始化时计算一次,后续不会有变化。缓存表的宽度8是一个可调节的配置,宽度越大,缓存表中元素越多,对计算的加速效果越好,但会占用更多的存储空间。缓存表的宽度取值满足2的N次方要求,实际使用中,可以将宽度配成128或256。
那么,缓存表是怎样加速计算的呢,以计算g283为例,g283=1·g3·g24·g256,而后者g3,g24,g256都已经在缓存表里了,直接查表就可以得到,这样,总共只需要3次乘法,就可以计算得到g283的值,非常快速。与相关技术相比,乘法次数从17次减少到3次,极大地减少了幂运算所需的时间。
一般地,对于任意gm,利用缓存表计算的方法可以如下:
Input:g,m
Fixed Input:Table(缓存表),w(缓存表宽度)
Output:gm
A=1;row=0;mask=w–1
while m!=0:
if m&mask>0then
A*=Table[row][(m&mask)-1]
m/=w
row++
return A
利用本说明书实施例提供的同态加密方法,可以快速获得gm的结果,进而OU算法中的“加密”操作,以及“密文+明文”操作都可以很快完成,从而可以提升同态加密的性能。由于paillier算法与OU算法类似,因此,本说明书实施例提供的同态加密方法也适用于paillier算法。
图2为本说明书一个实施例提供的同态加密操作方法的流程图,上述同态加密操作方法可以应用于参与同态加密操作的电子设备,如图2所示,上述同态加密操作方法可以包括:步骤202,确定对指定的业务数据所要执行的同态加密操作,上述同态加密操作用于为上述业务数据提供隐私保护。
在本说明书一个或多个实施例中,业务数据可以是云服务计算、外包计算和/或联邦学习等应用场景下的用户提供的数据,这些数据往往涉及用户或者其客户的隐私,因此,需要通过同态加密来进行隐私保护。
步骤204,获取上述同态加密操作包含的幂运算的底数参数和指数参数。
举例来说,假设上述同态加密操作包含的幂运算为gm,那么底数参数为g,指数参
数为m。
具体地,获取上述同态加密操作包含的幂运算的底数参数可以为:获取上述同态加密操作中使用的公钥,从上述公钥中获取上述同态加密操作包含的幂运算的底数参数。
同态加密操作中,公钥是公开的,每个参与方都会把自身的公钥发给其他参与方,而底数参数是公钥中的元素,因此在获取公钥之后,同态加密操作的参与方就可以从上述公钥中获取上述底数参数。
步骤206,根据上述指数参数,查询上述底数参数对应的幂运算结果缓存表,获取上述幂运算的结果。
具体地,假设幂运算结果缓存表为:
g1,g2,g3,g4,g5,g6,g7
g8,g16,g24,g32,g40,g48,g56
g64,g128,g192,g256,…
g512,…
…
那么根据m的具体数值,通过查询上述幂运算结果缓存表,就可以获取gm的结果。
步骤208,根据上述幂运算的结果,完成同态加密操作。
上述同态加密操作方法中,确定对指定的业务数据所要执行的同态加密操作之后,获取上述同态加密操作包含的幂运算的底数参数和指数参数,然后根据上述指数参数,查询上述底数参数对应的幂运算结果缓存表,获取上述幂运算的结果,最后根据上述幂运算的结果,完成同态加密操作,从而可以实现通过幂运算结果缓存表,大大减少幂运算中乘法的计算次数,大幅度减少了幂运算需要的时间,进而可以提升同态加密的性能。
图3为本说明书另一个实施例提供的同态加密操作方法的流程图,如图3所示,本说明书图2所示实施例中,步骤206可以包括:
步骤302,获取当前运算周期中的指数参数和当前运算周期中上述幂运算结果缓存表的查询行数,以及获取上述幂运算结果缓存表中每行包括的幂运算结果的数量。
其中,上述幂运算结果缓存表中每行包括的幂运算结果的数量可以根据缓存表宽度确定,一般为缓存表宽度减1,举例来说,当缓存表的宽度为8时,上述数量可以为7。
步骤304,当获取的指数参数不等于第一数值时,如果获取的指数参数与上述数量进行与运算的结果大于第一数值,则根据上述查询行数和与运算的结果,查询上述幂运算结果缓存表。
其中,上述第一数值的大小可以在具体实现时,根据系统性能和/或实现需求等进行
设置,本实施例对上述第一数值的大小不作限定,举例来说,上述第一数值可以为0。
具体地,根据上述查询行数和与运算的结果,查询上述幂运算结果缓存表可以为:获取上述与运算的结果减去第二数值之后的差;在上述幂运算结果缓存表中,根据上述查询行数对应的行,上述差对应的列,查询获得幂运算结果。
其中,上述第二数值的大小可以在具体实现时,根据系统性能和/或实现需求等进行设置,本实施例对上述第二数值的大小不作限定,举例来说,上述第二数值可以为1。
步骤306,将查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果。
进一步地,步骤306之后,还可以包括:步骤308,将上述当前运算周期中的指数参数与上述幂运算结果缓存表的宽度之商,作为下一运算周期中的指数参数;以及将上述查询行数增加预定步长。
其中,上述预定步长可以在具体实现时,根据系统性能和/或实现需求等自行设置,本实施例对上述预定步长的大小不作限定,举例来说,上述预定步长可以为1。
上述步骤302~步骤308,是可以循环执行的,这样,在循环执行过程中,如果步骤302中获取的当前运算周期中的指数参数等于第一数值,则退出当前运算周期,以上一运算周期的幂运算结果,作为最终的幂运算结果。
图4为本说明书再一个实施例提供的同态加密操作方法的流程图,如图4所示,本说明书图2所示实施例中,步骤206之前,还可以包括:步骤402,根据上述同态加密操作包含的幂运算的底数参数和预定的宽度,生成上述底数参数对应的幂运算结果缓存表。
具体实现时,对于每个参与方来说,每个公钥都要计算一张缓存表。以参与方包括A和B为例,A和B分别生成自己的公私钥对之后,将自身的公钥广播给对方,也就是说,A将自己的公钥A发送给B,B将自己的公钥B发送给A。这样,对于A来说,由于A有公钥A和公钥B这2个公钥,因此A需要分别针对公钥A和公钥B计算幂运算结果缓存表。
缓存表只需要在初始化时计算一次,后续不会有变化。上述预定的宽度即为缓存表的宽度,该宽度是一个可调节的配置,宽度越大,缓存表中元素越多,对计算的加速效果越好,但会占用更多的存储空间。缓存表的宽度取值需要满足2的N次方要求,实际使用中,可以将宽度配成128或256。
上述同态加密操作方法通过引入缓存表的概念,可以大大减少幂运算中乘法的计算次数,从而大幅度减少幂运算需要的时间,极大地提升了同态加密的性能,使得同态加
密技术可以应用到实际场景,对隐私保护技术的推广和落地帮助很大。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
图5为本说明书一个实施例提供的同态加密操作装置的结构示意图,上述同态加密操作装置设置在参与同态加密操作的电子设备中,如图5所示,上述同态加密操作装置可以包括:确定模块51、获取模块52、查询模块53和加密模块54;其中,确定模块51,用于确定对指定的业务数据所要执行的同态加密操作,上述同态加密操作用于为上述业务数据提供隐私保护;获取模块52,用于获取上述同态加密操作包含的幂运算的底数参数和指数参数;查询模块53,用于根据上述指数参数,查询上述底数参数对应的幂运算结果缓存表,获取上述幂运算的结果;加密模块54,用于根据上述幂运算的结果,完成上述同态加密操作。
图5所示实施例提供的同态加密操作装置可用于执行本说明书图2所示方法实施例的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。
图6为本说明书另一个实施例提供的同态加密操作装置的结构示意图,与图5所示的同态加密操作装置相比,图6所示的同态加密操作装置中,获取模块52,具体用于获取上述同态加密操作中使用的公钥,从上述公钥中获取上述同态加密操作包含的幂运算的底数参数。
本实施例中,查询模块53可以包括:参数获取子模块531、结果查询子模块532和计算子模块533;其中,参数获取子模块531,用于获取当前运算周期中的指数参数和上述当前运算周期中上述幂运算结果缓存表的查询行数,以及获取上述幂运算结果缓存表中每行包括的幂运算结果的数量;结果查询子模块532,用于当参数获取子模块531获取的指数参数不等于第一数值时,如果参数获取子模块531获取的指数参数与上述数量进行与运算的结果大于第一数值,则根据上述查询行数和上述与运算的结果,查询上述幂运算结果缓存表;计算子模块533,用于将结果查询子模块532查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果。
进一步地,计算子模块533,还用于在参数获取子模块531获取当前运算周期中的指数参数之后,当参数获取子模块531获取的指数参数等于第一数值时,退出当前运算周期;以上一运算周期的幂运算结果,作为最终的幂运算结果。
进一步地,查询模块53还可以包括:参数设置子模块534;参数设置子模块534,用于在计算子模块533将查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果之后,将当前运算周期中的指数参数与上述幂运算结果缓存表的宽度之商,作为下一运算周期中的指数参数;以及将上述查询行数增加预定步长。
本实施例中,结果查询子模块532,具体用于获取上述与运算的结果减去第二数值之后的差,在上述幂运算结果缓存表中,根据上述查询行数对应的行,上述差对应的列,查询获得幂运算结果。
进一步地,上述同态加密操作装置中还可以包括:生成模块55;生成模块55,用于在查询模块53根据上述指数参数,查询上述底数参数对应的幂运算结果缓存表,获取上述幂运算的结果之前,根据上述同态加密操作包含的幂运算的底数参数和预定的宽度,生成上述底数参数对应的幂运算结果缓存表。
图6所示实施例提供的同态加密操作装置可用于执行本说明书图2~图4所示方法实施例的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。
图7为本说明书一个实施例提供的电子设备的结构示意图,如图7所示,上述电子设备可以包括至少一个处理器;以及与上述处理器通信连接的至少一个存储器,其中:存储器存储有可被处理器执行的程序指令,上述处理器调用上述程序指令能够执行本说明书图2~图4所示实施例提供的同态加密操作方法。
其中,上述电子设备可以为参与同态加密操作的设备,本实施例对上述电子设备的形式不作限定。
图7示出了适于用来实现本说明书实施方式的示例性电子设备的框图。图7显示的电子设备仅仅是一个示例,不应对本说明书实施例的功能和使用范围带来任何限制。
如图7所示,电子设备以通用计算设备的形式表现。电子设备的组件可以包括但不限于:一个或者多个处理器410,通信接口420,存储器430,以及连接不同组件(包括存储器430、通信接口420和处理器410)的通信总线440。
通信总线440表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,或者使用多种总线结构中的任意总线结构的局域总线。举例来说,通信总线440可以包括但不限于工业标准体系结构(industry standard architecture,ISA)总线,微通道体系结构(micro channel architecture,MCA)总线,增强型ISA总线、视频电子标准协会(video electronics standards association,VESA)局域总线以及外围组件互连(peripheral component interconnection,PCI)总线。
电子设备典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设
备访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
存储器430可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(random access memory,RAM)和/或高速缓存存储器。存储器430可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本说明书图2~图4所示实施例的功能。
具有一组(至少一个)程序模块的程序/实用工具,可以存储在存储器430中,这样的程序模块包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块通常执行本说明书图2~图4所描述的实施例中的功能和/或方法。
处理器410通过运行存储在存储器430中的程序,从而执行各种功能应用以及数据处理,例如实现本说明书图2~图4所示实施例提供的同态加密操作方法。
本说明书实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行本说明书图2~图4所示实施例提供的同态加密操作方法。
上述非暂态计算机可读存储介质可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(read only memory,ROM)、可擦式可编程只读存储器(erasable programmable read only memory,EPROM)或闪存、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、射频(radio frequency,RF)等等,或者上述的任意合适的组
合。
可以以一种或多种程序设计语言或其组合来编写用于执行本说明书操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(local area network,LAN)或广域网(wide area network,WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本说明书的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本说明书的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本说明书的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本说明书的实施例所属技术领域的技术人员所理解。
取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……
时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
需要说明的是,本说明书实施例中所涉及的终端可以包括但不限于个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、无线手持设备、平板电脑(tablet computer)、手机、MP3播放器、MP4播放器等。
在本说明书所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
另外,在本说明书各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(processor)执行本说明书各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM)、随机存取存储器(RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。
Claims (16)
- 一种同态加密操作方法,应用于参与同态加密操作的电子设备,所述方法包括:确定对指定的业务数据所要执行的同态加密操作,所述同态加密操作用于为所述业务数据提供隐私保护;获取所述同态加密操作包含的幂运算的底数参数和指数参数;根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果;根据所述幂运算的结果,完成所述同态加密操作。
- 根据权利要求1所述的方法,其中,所述获取所述同态加密操作包含的幂运算的底数参数包括:获取所述同态加密操作中使用的公钥;从所述公钥中获取所述同态加密操作包含的幂运算的底数参数。
- 根据权利要求1所述的方法,其中,所述根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果包括:获取当前运算周期中的指数参数和所述当前运算周期中所述幂运算结果缓存表的查询行数,以及获取所述幂运算结果缓存表中每行包括的幂运算结果的数量;当获取的指数参数不等于第一数值时,如果所述获取的指数参数与所述数量进行与运算的结果大于所述第一数值,则根据所述查询行数和所述与运算的结果,查询所述幂运算结果缓存表;将查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果。
- 根据权利要求3所述的方法,其中,所述获取当前运算周期中的指数参数之后,还包括:当获取的指数参数等于第一数值时,退出当前运算周期;以上一运算周期的幂运算结果,作为最终的幂运算结果。
- 根据权利要求3所述的方法,其中,所述将查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果之后,还包括:将所述当前运算周期中的指数参数与所述幂运算结果缓存表的宽度之商,作为下一运算周期中的指数参数;以及将所述查询行数增加预定步长。
- 根据权利要求3所述的方法,其中,所述根据所述查询行数和所述与运算结果,查询所述幂运算结果缓存表包括:获取所述与运算的结果减去第二数值之后的差;在所述幂运算结果缓存表中,根据所述查询行数对应的行,所述差对应的列,查询获得幂运算结果。
- 根据权利要求1-6中任意一项所述的方法,其中,所述根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果之前,还包括:根据所述同态加密操作包含的幂运算的底数参数和预定的宽度,生成所述底数参数对应的幂运算结果缓存表。
- 一种同态加密操作装置,所述同态加密操作装置设置在参与同态加密操作的电子设备中,所述装置包括:确定模块,用于确定对指定的业务数据所要执行的同态加密操作,所述同态加密操作用于为所述业务数据提供隐私保护;获取模块,用于获取所述同态加密操作包含的幂运算的底数参数和指数参数;查询模块,用于根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果;加密模块,用于根据所述幂运算的结果,完成所述同态加密操作。
- 根据权利要求8所述的装置,其中,所述获取模块,具体用于获取所述同态加密操作中使用的公钥,从所述公钥中获取所述同态加密操作包含的幂运算的底数参数。
- 根据权利要求8所述的装置,其中,所述查询模块包括:参数获取子模块,用于获取当前运算周期中的指数参数和所述当前运算周期中所述幂运算结果缓存表的查询行数,以及获取所述幂运算结果缓存表中每行包括的幂运算结果的数量;结果查询子模块,用于当所述参数获取子模块获取的指数参数不等于第一数值时,如果所述参数获取子模块获取的指数参数与所述数量进行与运算的结果大于所述第一数值,则根据所述查询行数和所述与运算的结果,查询所述幂运算结果缓存表;计算子模块,用于将所述结果查询子模块查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果。
- 根据权利要求10所述的装置,其中,所述计算子模块,还用于在所述参数获取子模块获取当前运算周期中的指数参数之后,当所述参数获取子模块获取的指数参数等于第一数值时,退出当前运算周期;以上一运算周期的幂运算结果,作为最终的幂运算结果。
- 根据权利要求10所述的装置,其中,所述查询模块还包括:参数设置子模块,用于在所述计算子模块将查询获得的幂运算结果与上一运算周期的幂运算结果相乘,作为当前运算周期的幂运算结果之后,将所述当前运算周期中的指数参数与所述幂运算结果缓存表的宽度之商,作为下一运算周期中的指数参数;以及将所述查询行数增加预定步长。
- 根据权利要求10所述的装置,其中,所述结果查询子模块,具体用于获取所述与运算的结果减去第二数值之后的差,在所述幂运算结果缓存表中,根据所述查询行数对应的行,所述差对应的列,查询获得幂运算结果。
- 根据权利要求8-13中任意一项所述的装置,还包括:生成模块,用于在所述查询模块根据所述指数参数,查询所述底数参数对应的幂运算结果缓存表,获取所述幂运算的结果之前,根据所述同态加密操作包含的幂运算的底数参数和预定的宽度,生成所述底数参数对应的幂运算结果缓存表。
- 一种电子设备,包括:至少一个处理器;以及与所述处理器通信连接的至少一个存储器,其中:所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行如权利要求1至7中任一所述的方法。
- 一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如权利要求1至7中任一所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210397418.5A CN114584284B (zh) | 2022-04-15 | 2022-04-15 | 同态加密操作方法、装置和电子设备 |
CN202210397418.5 | 2022-04-15 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023197995A1 true WO2023197995A1 (zh) | 2023-10-19 |
Family
ID=81784622
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/087309 WO2023197995A1 (zh) | 2022-04-15 | 2023-04-10 | 同态加密操作方法、装置和电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114584284B (zh) |
WO (1) | WO2023197995A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114584284B (zh) * | 2022-04-15 | 2024-10-15 | 支付宝(杭州)信息技术有限公司 | 同态加密操作方法、装置和电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107852324A (zh) * | 2015-06-02 | 2018-03-27 | 瑞典爱立信有限公司 | 用于加密消息的方法和加密节点 |
US20200374103A1 (en) * | 2019-05-22 | 2020-11-26 | Crypto Lab Inc. | Apparatus for processing modular multiply operation and methods thereof |
CN114124349A (zh) * | 2021-11-19 | 2022-03-01 | 北京数牍科技有限公司 | 一种用于同态加密方案的快速解密方法 |
CN114172651A (zh) * | 2021-11-15 | 2022-03-11 | 武汉大学 | 一种sm9公钥加密算法、解密算法的gpu加速实现方法 |
CN114584284A (zh) * | 2022-04-15 | 2022-06-03 | 支付宝(杭州)信息技术有限公司 | 同态加密操作方法、装置和电子设备 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111384971B (zh) * | 2018-12-29 | 2023-09-01 | 泰斗微电子科技有限公司 | 有限域中的数据处理方法、装置和解码器 |
KR102203238B1 (ko) * | 2019-05-22 | 2021-01-14 | 주식회사 크립토랩 | 모듈러 곱셈 연산을 수행하는 연산 장치 및 방법 |
CN112181360B (zh) * | 2019-07-04 | 2023-06-16 | 福建天泉教育科技有限公司 | 浮点数的乘法运算方法及计算机可读存储介质 |
CN113296732B (zh) * | 2020-06-16 | 2024-03-01 | 阿里巴巴集团控股有限公司 | 数据处理方法和装置,处理器及数据搜索方法和装置 |
CN113746620B (zh) * | 2021-09-13 | 2024-04-23 | 深圳前海微众银行股份有限公司 | 同态加密方法、设备、介质及计算机程序产品 |
CN114117547B (zh) * | 2021-11-15 | 2024-07-23 | 武汉大学 | 一种基于预计算表的sm9数字签名加速生成方法以及数字签名加速验证方法 |
-
2022
- 2022-04-15 CN CN202210397418.5A patent/CN114584284B/zh active Active
-
2023
- 2023-04-10 WO PCT/CN2023/087309 patent/WO2023197995A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107852324A (zh) * | 2015-06-02 | 2018-03-27 | 瑞典爱立信有限公司 | 用于加密消息的方法和加密节点 |
US20200374103A1 (en) * | 2019-05-22 | 2020-11-26 | Crypto Lab Inc. | Apparatus for processing modular multiply operation and methods thereof |
CN114172651A (zh) * | 2021-11-15 | 2022-03-11 | 武汉大学 | 一种sm9公钥加密算法、解密算法的gpu加速实现方法 |
CN114124349A (zh) * | 2021-11-19 | 2022-03-01 | 北京数牍科技有限公司 | 一种用于同态加密方案的快速解密方法 |
CN114584284A (zh) * | 2022-04-15 | 2022-06-03 | 支付宝(杭州)信息技术有限公司 | 同态加密操作方法、装置和电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN114584284B (zh) | 2024-10-15 |
CN114584284A (zh) | 2022-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020211485A1 (zh) | 数据处理方法、装置和电子设备 | |
WO2022237450A1 (zh) | 多方安全计算方法、装置、设备及存储介质 | |
CN109214201B (zh) | 一种数据共享方法、终端设备及计算机可读存储介质 | |
WO2023197995A1 (zh) | 同态加密操作方法、装置和电子设备 | |
WO2023169081A1 (zh) | 数据处理 | |
CN112667674B (zh) | 一种数据处理方法、装置和用于数据处理的装置 | |
CN114301594B (zh) | 一种不经意传输方法、多方安全计算平台和用于不经意传输的装置 | |
CN113708930A (zh) | 隐私数据的数据比较方法、装置、设备及介质 | |
CN115664747A (zh) | 加密方法和装置 | |
CN112953700B (zh) | 一种提升安全多方计算效率的方法、系统及存储介质 | |
CN113434906B (zh) | 数据查询方法、装置、计算机设备及存储介质 | |
WO2023020216A1 (zh) | 多方安全确定最值的方法、装置、设备及存储介质 | |
CN114884645B (zh) | 一种隐私计算方法、装置和可读存储介质 | |
CN114726611A (zh) | 多方隐私集合求交方法、系统和装置 | |
CN113806795A (zh) | 一种两方隐私集合并集计算方法和装置 | |
CN114039785A (zh) | 数据加密、解密、处理方法、装置、设备和存储介质 | |
Vijayakumar et al. | Comparative study of hyperelliptic curve cryptosystem over prime field and its survey | |
CN112464257A (zh) | 一种数据检测方法、装置和用于数据检测的装置 | |
CN114885038B (zh) | 一种加密协议转换方法、结果获取节点和隐私计算节点 | |
CN114726580B (zh) | 数据处理方法和装置 | |
CN116361344A (zh) | 数据查询方法、装置、设备及介质 | |
CN113505386A (zh) | 基于区块链和同态算法的数据处理方法、装置及存储介质 | |
TW202042053A (zh) | 在私人群組中之委外取冪服務 | |
CN116089991B (zh) | 数据对齐方法、装置、设备及存储介质 | |
CN117009723B (zh) | 一种多方计算方法、装置、设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23787639 Country of ref document: EP Kind code of ref document: A1 |