Proxy computing method and device, equipment, storage medium and product
By performing homomorphic calculations on the encrypted ciphertext on the proxy server and converting the results into ciphertexts that can be decrypted by the client, the problem of the inability to homomorphic calculations in the prior art has been solved, resulting in large amounts of user computing in users, and the effect of data privacy protection and reduction of calculations is achieved.
Patent Information
- Application Number
- CN202510026972.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-22
AI Technical Summary
The existing proxy re-encryption technology cannot perform homomorphic calculations on ciphertexts, resulting in a large amount of user calculations.
The proxy server receives the re-encryption key, public key and encrypted ciphertext from multiple clients, performs homomorphic calculation of the encrypted ciphertext based on the public key, obtains the homomorphic calculation ciphertext results, and converts it into the recipient ciphertext that the client can decrypt according to the re-encryption key.
It realizes the calculation of data in an encrypted state, reduces the amount of calculation for users and protects the privacy of data.
Smart Images

Figure CN119865299A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data security technology, and in particular to a proxy computing method, device, equipment, storage medium and product. Background Art
[0002] Proxy Re-encryption (PRE) is a cryptographic technique used to transfer encrypted data from one user to another without exposing the original plaintext and secret key. This technique is very useful in scenarios where data sharing and privacy protection are required, especially in the fields of distributed storage, cloud computing, and data security. The basic idea of proxy re-encryption is to change the encrypted data through a "proxy" without decrypting the original data so that it can be decrypted by another authorized user.
[0003] Existing proxy re-encryption technology only provides the function of transforming ciphertext, and cannot perform homomorphic calculations on ciphertext. Homomorphic calculation is a computing technology that allows specific mathematical operations to be performed on encrypted data. In homomorphic calculation, data is processed in an encrypted state, and the processing results are consistent with the results of directly processing the unencrypted data after decryption. Summary of the invention
[0004] The main purpose of this application is to provide a proxy computing method, device, equipment, storage medium and product, aiming to solve the technical problem that the existing proxy re-encryption technology cannot perform homomorphic computing on ciphertext, resulting in a large amount of calculation for users.
[0005] To achieve the above object, the present application proposes a proxy computing method, which is applied to a proxy server and includes:
[0006] receiving multiple re-encryption keys, multiple public keys, and multiple encrypted ciphertexts from multiple clients;
[0007] Performing homomorphic calculations on the multiple encrypted ciphertexts according to the multiple public keys to obtain multiple homomorphic calculation ciphertext results;
[0008] Converting the multiple homomorphic computation ciphertext results into multiple recipient ciphertexts corresponding to the multiple clients according to the multiple re-encryption keys;
[0009] The multiple recipient ciphertexts are sent to the multiple clients respectively, so that the clients decrypt the recipient ciphertexts.
[0010] In one embodiment, before the step of receiving multiple re-encryption keys, multiple public keys, and multiple encrypted ciphertexts from multiple clients, the step further includes:
[0011] Determine a modulus parameter corresponding to the cryptographic problem, wherein the modulus parameter includes a positive integer and a prime number;
[0012] Determining noise parameters based on discrete Gaussian error distribution;
[0013] Generate error sample threshold parameters according to the characteristics of discrete Gaussian error distribution;
[0014] Generate a random matrix as a public parameter according to the modulus parameter;
[0015] The noise parameter, the error sample threshold parameter and the public parameter are sent to a plurality of clients so that the plurality of clients generate key pairs.
[0016] In one embodiment, the step of performing homomorphic calculations on the multiple encrypted ciphertexts according to the multiple public keys to obtain multiple homomorphic calculation ciphertext results includes:
[0017] According to the multiple public keys, each ciphertext component in each of the encrypted ciphertexts is subjected to homomorphic addition and homomorphic multiplication operations to obtain a homomorphic addition component and a homomorphic multiplication component corresponding to each ciphertext component;
[0018] The homomorphic addition components and the homomorphic multiplication components corresponding to the multiple ciphertext components in the multiple encrypted ciphertexts are respectively combined to obtain multiple homomorphic calculation ciphertext results.
[0019] To achieve the above purpose, the present application also proposes a proxy computing method, which is applied to a client and includes:
[0020] Generate a re-encryption key based on its own private key and the public key from other clients;
[0021] Generate encrypted ciphertext based on its own public key and original data;
[0022] Sending the re-encryption key, the own public key and the encrypted ciphertext to a proxy server;
[0023] receiving a recipient ciphertext from a proxy server;
[0024] The receiver's ciphertext is decrypted according to its own private key to obtain the original data.
[0025] In one embodiment, before the step of generating a re-encryption key according to its own private key and the public key from other clients, it also includes:
[0026] Receive public keys from other clients;
[0027] Obtaining a noise parameter, an error sample threshold parameter and a public parameter from a proxy server, wherein a random matrix in the public parameter has n rows and includes positive integers and prime numbers;
[0028] Select n-1 elements from the noise parameters according to the error sample threshold parameter to generate the first n-1 bits of a random vector, set the last bit of the random vector to 1, and use the random vector as its own private key;
[0029] Select m elements from the noise parameters to generate an error vector;
[0030] Generate its own public key according to the random vector, the error vector and the random matrix, and send the own public key to the proxy server and other clients.
[0031] In one embodiment, the step of generating a re-encryption key based on its own private key and a public key from another client includes:
[0032] Randomly select a matrix as a re-encryption matrix, the number of rows of the re-encryption matrix is m, the number of columns is determined according to the number of rows n of the random matrix and the prime number, and the elements in the re-encryption matrix are 0 and 1 randomly and uniformly selected;
[0033] A re-encryption key is generated according to its own private key, the public key from other clients, the re-encryption matrix, the random matrix, the standard basis vector, the zero matrix, the identity matrix and a preset digital sequence.
[0034] In one embodiment, the step of generating encrypted ciphertext according to its own public key and original data includes:
[0035] Generate encryption auxiliary information according to the random matrix, the standard basis vector and its own public key;
[0036] Randomly select a matrix as a first matrix, and generate a ciphertext first component according to the first matrix, the unit matrix, the preset digital sequence, the original data and the encryption auxiliary information;
[0037] Randomly selecting a matrix as a second matrix, and generating a ciphertext second component according to the second matrix, the random matrix, the original data, the identity matrix and the preset digital sequence;
[0038] Randomly selecting a matrix as a third matrix, and generating a ciphertext third component according to the third matrix, the encryption auxiliary information, the second matrix, the preset digital sequence and the standard basis vector;
[0039] An encrypted ciphertext is generated according to the ciphertext first component, the ciphertext second component and the ciphertext third component.
[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes a proxy computing device, which is applied to a proxy server, and the proxy computing device includes:
[0041] An information receiving module, used for receiving multiple re-encryption keys, multiple public keys and multiple encrypted ciphertexts from multiple clients;
[0042] A homomorphic computing module, used to perform homomorphic computing on the multiple encrypted ciphertexts according to the multiple public keys to obtain multiple homomorphic computing ciphertext results;
[0043] A re-encryption conversion module, used to convert the multiple homomorphic calculation ciphertext results into multiple recipient ciphertexts corresponding to the multiple clients according to the multiple re-encryption keys;
[0044] The ciphertext sending module is used to send the multiple recipient ciphertexts to the multiple clients respectively, so that the clients can decrypt the recipient ciphertexts.
[0045] In addition, to achieve the above-mentioned purpose, the present application also proposes a proxy computing device, which is applied to a client, and the proxy computing device includes:
[0046] A re-encryption key generation module, used to generate a re-encryption key based on its own private key and the public key from other clients;
[0047] The encrypted ciphertext generation module is used to generate the encrypted ciphertext according to its own public key and original data;
[0048] An information sending module, used for sending the re-encryption key, the own public key and the encrypted ciphertext to a proxy server;
[0049] The ciphertext receiving module is used to receive the recipient ciphertext from the proxy server;
[0050] The ciphertext decryption module is used to decrypt the receiving party's ciphertext according to its own private key to obtain the original data.
[0051] In addition, to achieve the above objectives, the present application also proposes an agent computing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the agent computing method described above.
[0052] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the agent computing method described above are implemented.
[0053] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the proxy computing method described above are implemented.
[0054] The present application provides a proxy computing method, which receives re-encryption keys, public keys and encrypted ciphertexts from multiple clients through a proxy server; performs homomorphic computing on the encrypted ciphertext according to the public key; converts the homomorphic computing ciphertext result into the receiving ciphertext corresponding to the client according to the re-encryption key; and sends multiple receiving ciphertexts to multiple clients respectively. The present application performs homomorphic computing on the ciphertext through a proxy server, and can directly operate on the encrypted data without decryption, and the proxy server will not obtain any information about the plaintext data during the calculation process, thereby protecting the privacy of the data. Through the proxy computing of the proxy server, the complex computing tasks of the client can be handed over to the proxy server for computing, thereby reducing the user's computing workload. Finally, the ciphertext after homomorphic computing is converted into a ciphertext that can be decrypted by the client according to the re-encryption key. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0057] Figure 1 A flowchart of the first embodiment of the proxy calculation method of this application is provided;
[0058] Figure 2 A flow chart of the second embodiment of the proxy calculation method of this application;
[0059] Figure 3 A schematic diagram of the overall interactive process of the proxy calculation method for this application;
[0060] Figure 4 This is a structural block diagram of a first embodiment of an agent computing device according to an embodiment of the present application;
[0061] Figure 5 This is a structural block diagram of a second embodiment of the proxy computing device of the present application embodiment;
[0062] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the proxy computing method in the embodiment of the present application.
[0063] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0064] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0065] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0066] The main solution of the embodiment of the present application is: receiving multiple re-encryption keys, multiple public keys and multiple encrypted ciphertexts from multiple clients; performing homomorphic calculations on the multiple encrypted ciphertexts according to the multiple public keys to obtain multiple homomorphic calculation ciphertext results; converting the multiple homomorphic calculation ciphertext results into multiple recipient ciphertexts corresponding to the multiple clients according to the multiple re-encryption keys; and sending the multiple recipient ciphertexts to the multiple clients respectively, so that the clients decrypt the recipient ciphertexts.
[0067] Since existing proxy re-encryption technology only provides the function of transforming ciphertext, it cannot perform homomorphic calculations on ciphertext. Homomorphic calculation is a computing technology that allows specific mathematical operations to be performed on encrypted data. In homomorphic calculation, data is processed in an encrypted state, and the processing result is consistent with the result of directly processing the unencrypted data after decryption.
[0068] The present application provides a solution, which receives re-encryption keys, public keys and encrypted ciphertexts from multiple clients through a proxy server; performs homomorphic calculations on the encrypted ciphertexts according to the public keys; converts the homomorphic calculation ciphertext results into the recipient ciphertexts corresponding to the client according to the re-encryption key; and sends multiple recipient ciphertexts to multiple clients respectively. The present application performs homomorphic calculations on ciphertexts through a proxy server, and can directly operate on encrypted data without decryption, and the proxy server will not obtain any information about the plaintext data during the calculation process, thereby protecting the privacy of the data. Through the proxy calculation of the proxy server, the complex computing tasks of the client can be handed over to the proxy server for calculation, thereby reducing the user's computing workload. Finally, the ciphertext after homomorphic calculation is converted into ciphertext that can be decrypted by the client according to the re-encryption key.
[0069] It should be noted that the execution subject of the method of this embodiment can be a proxy server with proxy computing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc.; it can also be a proxy computing device with the same or similar functions. This embodiment and the following embodiments will be described by taking the proxy server as an example.
[0070] Based on this, the embodiment of the present application provides a proxy computing method, which is applied to a proxy server, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the proxy calculation method of this application.
[0071] In this embodiment, the proxy calculation method includes steps S10 to S40:
[0072] Step S10, receiving multiple re-encryption keys, multiple public keys, and multiple encrypted ciphertexts from multiple clients.
[0073] It should be noted that this application is applicable to the scenario where each party is an honest and curious adversary and there is no collusion between the parties. The following is an introduction to honest and curious adversaries and collusion.
[0074] Honest-but-Curious Adversary, also known as "Semi-Honest Adversary", is a specific type of threat model described in the field of cryptography and information security. This adversary will strictly follow the rules of the protocol when executing the protocol and will not try to change the execution process of the protocol. Although the adversary abides by the protocol, they are very interested in the private data of other participants and may try to obtain as much information as possible from the legitimate protocol execution process.
[0075] Collusion refers to multiple parties working together privately to share their private information to infer or destroy the privacy data of other parties. Collusion can significantly increase the threat to the privacy of other parties because through collusion, the parties can obtain more information than when acting alone.
[0076] It is understandable that the proxy server receives multiple re-encryption keys, multiple public keys and multiple encrypted ciphertexts from multiple clients, wherein the re-encryption key is used to convert the ciphertext into a ciphertext that can be encrypted by the client, and the encrypted ciphertext is the ciphertext after each client encrypts the original data.
[0077] In a feasible implementation manner, before step S10, steps S01 to S05 may also be included:
[0078] Step S01, determining a modulus parameter corresponding to a cryptographic problem, wherein the modulus parameter includes a positive integer and a prime number.
[0079] It should be noted that the proxy server performs parameter configuration, which is mainly used to generate keys. In the initialization phase of the encryption system, the main task of the proxy server is to configure and generate a series of parameters for subsequent encryption operations. The correct selection of these parameters has a crucial impact on the security and performance of the system. The proxy server first selects appropriate parameters n and q, where n is a positive integer and q is a large prime number used as a modulus parameter. The selection of parameters n and q directly affects the difficulty of the discrete logarithm learning error problem (Decisional Learning With Errors, DLWE) and the security of the system. Among them, DLWE is a cryptographic problem based on lattice theory.
[0080] Step S02: determining noise parameters according to discrete Gaussian error distribution.
[0081] It should be understood that in order to introduce sufficient randomness and ensure security, the proxy server selects the standard discrete Gaussian error distribution χ. This distribution is used to generate the noise value required in the encryption process, thereby ensuring the unpredictability of the key and the anti-attack capability of the system.
[0082] Step S03: generating an error sample threshold parameter according to the characteristics of discrete Gaussian error distribution.
[0083] It is understandable that the proxy server sets an error sample threshold parameter E = Θ(n) taking into account the sample size generated by the discrete Gaussian error distribution, which means that the size of the generated error sample is limited to Θ(n), unless the probability of occurrence is extremely low. This step ensures that the generated noise is within an acceptable range and does not cause a serious degradation of system performance, security risks, or decryption failures due to excessive noise.
[0084] Step S04, generating a random matrix as a public parameter according to the modulus parameter.
[0085] It is understandable that the proxy server calculates the auxiliary parameter m=2nlogq based on the selected q and n, and this value is usually used to determine the number of columns of the generated matrix A. Then, the proxy server generates a random matrix A as the public parameter pp, which has n rows and m columns, and the elements of the matrix are uniformly randomly selected from the set Zq={0, 1, ..., q-1}. The randomness and structure of A determine the public parameters of the system, and its security also partially depends on the randomness and size of A.
[0086] Step S05: sending the noise parameter, the error sample threshold parameter and the public parameter to multiple clients, so that the multiple clients generate key pairs.
[0087] It should be understood that after generating the random matrix A, the proxy server sends the noise parameters (standard discrete Gaussian error distribution χ), error sample threshold parameters and public parameters pp generated above to all client users in the system, so that multiple clients can generate key pairs. The security of public parameters is crucial, which is not only the basis for users to generate keys, but also the core of the encryption and decryption operations of the entire system.
[0088] In this embodiment, the proxy server performs parameter configuration, and these parameters are mainly sent to the client for generating keys. In the initialization phase of the encryption system, the main task of the proxy server is to configure and generate a series of parameters for subsequent encryption operations. The correct selection of these parameters has a crucial impact on the security and performance of the system.
[0089] Step S20, performing homomorphic calculations on the multiple encrypted ciphertexts according to the multiple public keys to obtain multiple homomorphic calculation ciphertext results.
[0090] It is understood that homomorphic computing is a computing technology that allows specific mathematical operations to be performed on encrypted data. In homomorphic computing, data is processed in an encrypted state, and the processing results are consistent with the results of direct processing of unencrypted data after decryption. If homomorphic computing is supported, the proxy server can perform some complex computing tasks on behalf of the user, reducing the user's computing workload.
[0091] It should be noted that in this implementation, proxy re-encryption technology is used to implement proxy computing, allowing the server to perform homomorphic computing on the ciphertext and supporting the conversion of the ciphertext after homomorphic computing into the ciphertext of a specified user. Specifically, data providers are allowed to use their own public keys to encrypt data, while allowing the proxy server to perform homomorphic operations on the ciphertext under different public keys.
[0092] In a feasible implementation, step S20 may include steps S201 to S202:
[0093] Step S201, performing homomorphic addition operation and homomorphic multiplication operation on each ciphertext component in each of the encrypted ciphertexts according to the multiple public keys, to obtain a homomorphic addition component and a homomorphic multiplication component corresponding to each ciphertext component.
[0094] Step S202: Combine the homomorphic addition components and the homomorphic multiplication components corresponding to the multiple ciphertext components in the multiple encrypted ciphertexts respectively to obtain multiple homomorphic calculation ciphertext results.
[0095] It is understandable that the proxy server can perform homomorphic calculations on the ciphertext. According to multiple public keys, each ciphertext component in each encrypted ciphertext is subjected to homomorphic addition and homomorphic multiplication operations to obtain homomorphic addition components and homomorphic multiplication components corresponding to each ciphertext component. For example, the public key pk_i of the i-th user and the ciphertext c_i = (C_i, F_i, D_i) and the public key pk_j of the j-th user and the ciphertext c_j = (C_j, F_j, D_j) are used as examples for explanation.
[0096] If a homomorphic addition operation is performed, the ciphertext result after homomorphic addition of ciphertext c_i and ciphertext c_j is recorded as c=(C, F, D), where C=C_i+C_j, F=F_i+F_j, and D=D_i+D_j.
[0097] If homomorphic multiplication is performed, the ciphertext result after homomorphic multiplication of ciphertext c_i and ciphertext c_j is recorded as c = (C_mul, F_mul, D_mul). First, calculate the auxiliary matrix of homomorphic multiplication:
[0098] S_c=(I_n'*g^-1)*C_j,
[0099] S_f=(I_n*g^-1)*F_j,
[0100] S_d=(I_n'ml*g^-1)*D_j,
[0101] Where I_n' is an identity matrix with n' rows and n' columns, n' = ns, I_n is an identity matrix with n rows and n columns, and I_n'ml is an identity matrix with n'ml rows and n'ml columns. The multiplication is calculated as follows:
[0102] C_mul=C_i*S_c, F_mul=F_i*S_f, D_mul=D_i*S_f+(I_ml*C_i)*S_d,
[0103] Where I_ml is a unit matrix with ml rows and ml columns. The proxy server can decompose the computing task into addition and multiplication operations according to the client's computing request, and execute the decomposed sub-computing steps one by one.
[0104] In this embodiment, the proxy server can decompose the computing task according to the computing request of the client into addition and multiplication operations, and can perform operations on the components separately, and then the calculated components form a homomorphic computing ciphertext result.
[0105] Step S30: convert the multiple homomorphic computing ciphertext results into multiple recipient ciphertexts corresponding to the multiple clients according to the multiple re-encryption keys.
[0106] It can be understood that the present embodiment also supports converting the ciphertext after homomorphic computation into the ciphertext of a specified user. By re-encrypting the calculated ciphertext, the recipient can only use his own private key to decrypt it. The re-encryption operation is completed by the re-encryption key generated by the data provider, which is sent to the server in advance. This ensures that the recipient cannot decrypt the original ciphertext of the data provider because there is no private key corresponding to these ciphertexts. In addition, since the data provider only needs to generate the re-encryption key and send it to the proxy server, there is no need for interactive communication such as threshold decryption between the provider and the recipient. The proxy server can convert the ciphertext of any other user into the ciphertext of the jth user in the following way: calculate C*=(rk_1j||...||rk_sj)*(I_n'*g)*C, and use the second to last column of C* as the re-encrypted ciphertext.
[0107] It should be noted that in order to prevent key leakage, the proxy re-encryption outputs the second-to-last column of the C* matrix as the re-encrypted ciphertext c*, rather than directly outputting the entire matrix C*. Obviously, the re-encrypted ciphertext c* can be decrypted because only the second-to-last column of the ciphertext matrix C* is used for decryption. By only outputting c* as the re-encrypted ciphertext, re-encryption cannot be continued. Therefore, this application can be regarded as a single-hop proxy re-encryption scheme. For the same reason, any number of homomorphic operations can be performed before re-encryption, but homomorphic operations can no longer be performed on the re-encrypted ciphertext.
[0108] Step S40: sending the multiple recipient ciphertexts to the multiple clients respectively, so that the clients decrypt the recipient ciphertexts.
[0109] This embodiment provides a proxy computing method, which receives re-encryption keys, public keys, and encrypted ciphertexts from multiple clients through a proxy server; performs homomorphic computing on the encrypted ciphertext according to the public key; converts the homomorphic computing ciphertext result into the receiving ciphertext corresponding to the client according to the re-encryption key; and sends multiple receiving ciphertexts to multiple clients respectively. This embodiment performs homomorphic computing on the ciphertext through the proxy server, and can directly operate on the encrypted data without decryption, and the proxy server will not obtain any information about the plaintext data during the calculation process, thereby protecting the privacy of the data. Through the proxy computing of the proxy server, the complex computing tasks of the client can be handed over to the proxy server for computing, thereby reducing the user's computing workload. Finally, the ciphertext after homomorphic computing is converted into a ciphertext that can be decrypted by the client according to the re-encryption key.
[0110] The second embodiment of the present application also provides a proxy computing method, which is applied to a client, referring to Figure 2 , Figure 2This is a flow chart of the second embodiment of the proxy calculation method of this application.
[0111] In this embodiment, the proxy calculation method includes steps A10 to A50:
[0112] Step A10: Generate a re-encryption key based on its own private key and the public key from other clients.
[0113] It can be understood that the i-th client user can generate a re-encryption key rk_ij according to his own private key sk_i=t_i and the j-th client user's public key pk_j=b_j.
[0114] In a feasible implementation manner, before step A10, steps A01 to A05 may also be included:
[0115] Step A01, receiving a public key from another client.
[0116] It is worth noting that before the client generates a re-encryption key, it first needs to generate and receive a key pair. First, receive the public key from other clients.
[0117] Step A02, obtaining noise parameters, error sample threshold parameters and public parameters from the proxy server, wherein the random matrix in the public parameters has n rows and includes positive integers and prime numbers.
[0118] It is understandable that the client can obtain parameters such as noise parameters, error sample threshold parameters and public parameters from the proxy server. The public parameters pp include the random matrix A. This matrix is used for the subsequent generation of public keys and private keys and is a key component shared by all users. Each user generates his or her own key pair based on the above parameters, namely the public key (pk) and private key (sk).
[0119] Step A03, selecting n-1 elements from the noise parameters according to the error sample threshold parameter to generate the first n-1 bits of the random vector, setting the last bit of the random vector to 1, and using the random vector as its own private key.
[0120] It should be understood that the user selects n-1 elements from the discrete Gaussian error distribution χ in the noise parameter to generate the first n-1 bits of the random vector t. In order to ensure the characteristics of the vector t and the correctness of the system, the user sets the last bit of the vector t to 1, thereby obtaining an n-dimensional random vector t and using t as its own private key sk.
[0121] Step A04: Select m elements from the noise parameters to generate an error vector.
[0122] At the same time, the user selects m elements from the discrete Gaussian error distribution χ to form an error vector e. The length of this vector is m, which matches the number of columns of the matrix A. The introduction of the error vector e makes the generated public key sufficiently random and resistant to attacks.
[0123] Step A05: Generate its own public key according to the random vector, the error vector and the random matrix, and send the own public key to the proxy server and other clients.
[0124] Next, the user obtains the public key b by calculating b=tA+e. The matrix multiplication tA here multiplies the random vector t by the public matrix A, and then adds the error vector e to form the final public key b. This step ensures the randomness and unpredictability of the public key. The user uses the calculated b as the public key pk and t as the private key sk. The user then sends the public key pk to the proxy server and all other users, while the private key sk is saved locally by the user and properly protected to prevent leakage. This key generation process not only ensures the independence and security of each user's key, but also provides a basis for subsequent encryption and decryption operations. The collaboration between the proxy server and the user, through rigorous mathematical design, constitutes a secure and reliable encryption system.
[0125] In this embodiment, by receiving the parameters configured by the proxy server and generating a key pair, i.e., a public key and a private key, according to the parameters, the public key is shared with other clients and proxy servers, while the private key is always stored locally. Therefore, each client cannot decrypt the ciphertext of other clients, and the proxy server cannot decrypt the ciphertext of all clients, thereby ensuring the privacy of the data.
[0126] In a feasible implementation, step A10 may include steps A101 to A102:
[0127] Step A101, randomly select a matrix as a re-encryption matrix, the number of rows of the re-encryption matrix is m, the number of columns is determined according to the number of rows n of the random matrix and the prime number, and the elements in the re-encryption matrix are 0 and 1 randomly and uniformly selected.
[0128] Here is an explanation of the process of generating a re-encryption key by the client. The i-th user generates a re-encryption key rk_ij based on his private key sk_i=t_i and the j-th user's public key pk_j=b_j. Using this re-encryption key, the proxy server can convert the ciphertext of the i-th user into the ciphertext of the j-th user. First, randomly select a re-encryption matrix X_i with m rows and n*l columns, where the letter l=log q, and the elements in the matrix X_i are randomly and uniformly selected from 0 and 1.
[0129] Step A102, generating a re-encryption key according to its own private key, the public key from other clients, the re-encryption matrix, the random matrix, the standard basis vectors, the zero matrix, the identity matrix and the preset digital sequence.
[0130] It can be understood that the re-encryption key rk_ij can be calculated by the following formula:
[0131] rk_ij=(A-e_n*b_j)*X_i+(O, t_i*(In*g)),
[0132] Where the letter O is a zero matrix with n-1 rows and nl columns, In is an identity matrix with n rows and n columns, g=(1, 2, 4, ..., 2^(l-1)), and e_n is the nth standard basis vector with dimension n.
[0133] In this embodiment, a re-encryption key is generated by combining the client's local private key with the public key of other clients, so that other clients can decrypt the ciphertext according to the corresponding private key. When generating the re-encryption key, randomly generated matrices, zero matrices, unit matrices and other elements are combined to increase randomness and eliminate the possibility of being cracked, thereby improving the complexity and security of the re-encryption key.
[0134] Step A20, generating encrypted ciphertext according to its own public key and original data.
[0135] It can be understood that the user uses his own public key pk=b to encrypt the original data u to generate encrypted ciphertext.
[0136] In a feasible implementation, step A20 may include steps A201 to A205:
[0137] Step A201, generating encryption auxiliary information according to the random matrix, the standard basis vector and its own public key.
[0138] Here is a specific process for generating encrypted ciphertext: First, calculate the encrypted auxiliary information B = A-e_n*b, where e_n is the nth standard basis vector with dimension n.
[0139] Step A202, randomly selecting a matrix as a first matrix, and generating a first ciphertext component according to the first matrix, the unit matrix, the preset digital sequence, the original data and the encryption auxiliary information.
[0140] It can be understood that the ciphertext c of the original data u has three parts, namely the first ciphertext component C, the second ciphertext component F, and the third ciphertext component D. First, the first ciphertext component C is calculated. A first matrix Xc with m rows and n*l columns is randomly selected, where the letter l=log q, and the elements in the matrix Xc are randomly uniformly selected from 0 and 1. Using the encrypted auxiliary information B, C=B*Xc+u(In*g) is calculated, where g=(1, 2, 4, ..., 2^(l-1)), In is an n-row and n-column unit matrix, and u represents the original data.
[0141] Step A203, randomly selecting a matrix as a second matrix, and generating a second component of the ciphertext according to the second matrix, the random matrix, the original data, the unit matrix and the preset digital sequence.
[0142] It should be understood that the second ciphertext component F is calculated by randomly selecting a second matrix R with m rows and n*l columns, where the letter l=log q, and the elements in the matrix R are randomly uniformly selected from 0 and 1. The second ciphertext component is calculated according to the following formula: F=AR+u(In*g).
[0143] Step A204, randomly select a matrix as a third matrix, and generate a ciphertext third component according to the third matrix, the encryption auxiliary information, the second matrix, the preset digital sequence and the standard basis vector.
[0144] It should be understood that the third ciphertext component D is calculated. A third matrix XD with nml rows and nl columns is randomly selected, where the letter l = log q, and the elements in the matrix XD are randomly uniformly selected from 0 and 1. The encrypted auxiliary information B is used to calculate D = B*XD+R*g*e_n, where g = (1, 2, 4, ..., 2^(l-1)), and e_n is the nth standard basis vector with dimension n.
[0145] Step A205: Generate an encrypted ciphertext according to the first ciphertext component, the second ciphertext component and the third ciphertext component.
[0146] It can be understood that the encrypted ciphertext c=(C, F, D) generated by the original data u includes a ciphertext first component C, a ciphertext second component F, and a ciphertext third component D.
[0147] In this embodiment, multiple ciphertext components are generated and finally combined to generate the final encrypted ciphertext, thereby improving the complexity and security of the ciphertext. In the process of generating the ciphertext components, random information such as randomly selected matrices, random matrices, preset digital sequences, etc. are combined with their own public keys, so that the generated ciphertext has high complexity and is difficult to be cracked.
[0148] Step A30, sending the re-encryption key, the own public key and the encrypted ciphertext to the proxy server.
[0149] It can be understood that the client sends the re-encryption key, its own public key and the encrypted ciphertext to the proxy server, so that the proxy server performs homomorphic calculation based on the above information.
[0150] Step A40, receiving the recipient ciphertext from the proxy server.
[0151] It should be understood that after the proxy server performs homomorphic calculations on multiple encrypted ciphertexts, multiple recipient ciphertexts are obtained, and the client can receive the recipient ciphertexts from the proxy server.
[0152] Step A50, decrypt the recipient's ciphertext according to its own private key to obtain the original data.
[0153] It can be understood that for the jth user, the decrypted ciphertext c=(C, D, F), the formula for extracting the plaintext is as follows: u=sk_j*cipher / 2^(l-2), where cipher is the second to last column of the ciphertext c.
[0154] In this embodiment, after the client sends the generated re-encryption key and encrypted ciphertext and its own public key to the proxy server, it receives the recipient ciphertext after homomorphic calculation by the proxy server and which can be decrypted by the client, and decrypts the ciphertext after homomorphic calculation according to the private key stored locally.
[0155] For example, to help understand the implementation process of the proxy calculation method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 The overall interactive process diagram of the proxy calculation method for this application is as follows:
[0156] The overall process of this application is as follows: The proxy server is responsible for the generation of public parameters and does not participate in the generation of public and private keys, thereby ensuring the security of encrypted data. Each client will generate a public key for encrypting data and a private key for decrypting the ciphertext of the data based on the public parameters generated by the proxy server. The public key will be sent to other clients, and the private key will be retained locally on the client. Based on the public keys of other clients, each client calculates the re-encryption key and encrypted ciphertext and sends them to the proxy server. The proxy server performs homomorphic calculations on the ciphertext to obtain the ciphertext calculation results, and converts the ciphertext into ciphertext that can be decrypted by each client based on the re-encryption key of each client. Each client decrypts the ciphertext based on the private key stored locally to obtain the result. Each client only knows its own private key, and the proxy server has never obtained the private key of any client. Therefore, each client cannot decrypt the ciphertext of other clients, and the proxy server cannot decrypt the ciphertext of all clients, thereby ensuring the privacy of the data.
[0157] Through the above steps, any client can encrypt the data and send it to the proxy server. The proxy server can perform homomorphic operations on the ciphertext to realize the proxy service of calculation. Finally, the result of the homomorphic operation can be sent to the corresponding client, and the client decrypts it to extract the plaintext result. Compared with the existing proxy re-encryption scheme, this scheme has the characteristics of supporting homomorphic encryption and has a wider range of applications. On the other hand, the existing proxy re-encryption technology only provides the conversion function of ciphertext and cannot perform homomorphic calculations on ciphertext. If homomorphic calculation is supported, the proxy server can perform some complex computing tasks on behalf of the user, reducing the user's computing workload.
[0158] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the proxy calculation method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0159] This application also provides a proxy computing device, please refer to Figure 4 , Figure 4 This is a structural block diagram of a first embodiment of a proxy computing device according to an embodiment of the present application. The device is applied to a proxy server. The proxy computing device includes:
[0160] The information receiving module 10 is used to receive multiple re-encryption keys, multiple public keys and multiple encrypted ciphertexts from multiple clients;
[0161] A homomorphic computing module 20, configured to perform homomorphic computing on the plurality of encrypted ciphertexts according to the plurality of public keys to obtain a plurality of homomorphic computing ciphertext results;
[0162] A re-encryption conversion module 30, configured to convert the multiple homomorphic calculation ciphertext results into multiple recipient ciphertexts corresponding to the multiple clients according to the multiple re-encryption keys;
[0163] The ciphertext sending module 40 is used to send the multiple recipient ciphertexts to the multiple clients respectively, so that the clients can decrypt the recipient ciphertexts.
[0164] This application also provides a proxy computing device, please refer to Figure 5 , Figure 5 This is a structural block diagram of a second embodiment of a proxy computing device according to an embodiment of the present application. The device is applied to a client, and the proxy computing device includes:
[0165] A re-encryption key generation module 50, for generating a re-encryption key based on its own private key and public keys from other clients;
[0166] The encrypted ciphertext generation module 60 is used to generate the encrypted ciphertext according to its own public key and original data;
[0167] An information sending module 70, used to send the re-encryption key, the own public key and the encrypted ciphertext to a proxy server;
[0168] The ciphertext receiving module 80 is used to receive the recipient ciphertext from the proxy server;
[0169] The ciphertext decryption module 90 is used to decrypt the receiving party's ciphertext according to its own private key to obtain the original data.
[0170] The proxy computing device provided by the present application adopts the proxy computing method in the above embodiment to solve the technical problem. Compared with the prior art, the beneficial effects of the proxy computing device provided by the present application are the same as the beneficial effects of the proxy computing method provided by the above embodiment, and other technical features in the proxy computing device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0171] The present application provides a proxy computing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the proxy computing method in the above-mentioned embodiment 1.
[0172] Reference below Figure 6, which shows a schematic diagram of the structure of a proxy computing device suitable for implementing the embodiments of the present application. The proxy computing device in the embodiments of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The proxy computing device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0173] like Figure 6 As shown, the proxy computing device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the proxy computing device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the proxy computing device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a proxy computing device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0174] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0175] The proxy computing device provided by the present application adopts the proxy computing method in the above embodiment to solve the technical problem of proxy computing. Compared with the prior art, the beneficial effects of the proxy computing device provided by the present application are the same as the beneficial effects of the proxy computing method provided by the above embodiment, and other technical features in the proxy computing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0176] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0177] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0178] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the proxy computing method in the above-mentioned embodiment.
[0179] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0180] The computer-readable storage medium may be included in the proxy computing device; or may exist independently without being installed in the proxy computing device.
[0181] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0182] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0183] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0184] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned proxy computing method, and can solve technical problems. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the proxy computing method provided in the above-mentioned embodiment, and will not be repeated here.
[0185] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned proxy computing method when executed by a processor.
[0186] The computer program product provided by the present application can solve the technical problem. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the proxy computing method provided by the above embodiment, which will not be described in detail here.
[0187] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A proxy computing method, characterized in that: The method is applied to a proxy server, and the method comprises: receiving multiple re-encryption keys, multiple public keys, and multiple encrypted ciphertexts from multiple clients; Performing homomorphic calculations on the multiple encrypted ciphertexts according to the multiple public keys to obtain multiple homomorphic calculation ciphertext results; Converting the multiple homomorphic computation ciphertext results into multiple recipient ciphertexts corresponding to the multiple clients according to the multiple re-encryption keys; The multiple recipient ciphertexts are sent to the multiple clients respectively, so that the clients decrypt the recipient ciphertexts.
2. The method according to claim 1, characterized in that Before the step of receiving multiple re-encryption keys, multiple public keys, and multiple encrypted ciphertexts from multiple clients, the method further includes: Determine a modulus parameter corresponding to the cryptographic problem, wherein the modulus parameter includes a positive integer and a prime number; Determining noise parameters based on discrete Gaussian error distribution; Generate error sample threshold parameters according to the characteristics of discrete Gaussian error distribution; Generate a random matrix as a public parameter according to the modulus parameter; The noise parameter, the error sample threshold parameter and the public parameter are sent to a plurality of clients so that the plurality of clients generate key pairs.
3. The method according to claim 1, characterized in that The step of performing homomorphic calculations on the multiple encrypted ciphertexts according to the multiple public keys to obtain multiple homomorphic calculation ciphertext results includes: According to the multiple public keys, each ciphertext component in each of the encrypted ciphertexts is subjected to homomorphic addition and homomorphic multiplication operations to obtain a homomorphic addition component and a homomorphic multiplication component corresponding to each ciphertext component; The homomorphic addition components and the homomorphic multiplication components corresponding to the multiple ciphertext components in the multiple encrypted ciphertexts are respectively combined to obtain multiple homomorphic calculation ciphertext results.
4. A proxy computing method, characterized in that: The method is applied to a client, and the method comprises: Generate a re-encryption key based on its own private key and the public key from other clients; Generate encrypted ciphertext based on its own public key and original data; Sending the re-encryption key, the own public key and the encrypted ciphertext to a proxy server; receiving a recipient ciphertext from a proxy server; The receiver's ciphertext is decrypted according to its own private key to obtain the original data.
5. The method according to claim 4, characterized in that Before the step of generating a re-encryption key according to its own private key and the public key from other clients, it also includes: Receive public keys from other clients; Obtaining a noise parameter, an error sample threshold parameter and a public parameter from a proxy server, wherein a random matrix in the public parameter has n rows and includes positive integers and prime numbers; Select n-1 elements from the noise parameters according to the error sample threshold parameter to generate the first n-1 bits of a random vector, set the last bit of the random vector to 1, and use the random vector as its own private key; Select m elements from the noise parameters to generate an error vector; Generate its own public key according to the random vector, the error vector and the random matrix, and send the own public key to the proxy server and other clients.
6. The method according to claim 5, characterized in that The step of generating a re-encryption key based on its own private key and the public key from other clients includes: Randomly select a matrix as a re-encryption matrix, the number of rows of the re-encryption matrix is m, the number of columns is determined according to the number of rows n of the random matrix and the prime number, and the elements in the re-encryption matrix are 0 and 1 randomly and uniformly selected; A re-encryption key is generated according to its own private key, the public key from other clients, the re-encryption matrix, the random matrix, the standard basis vector, the zero matrix, the identity matrix and a preset digital sequence.
7. The method according to claim 6, characterized in that The step of generating encrypted ciphertext according to its own public key and original data includes: Generate encryption auxiliary information according to the random matrix, the standard basis vector and its own public key; Randomly select a matrix as a first matrix, and generate a ciphertext first component according to the first matrix, the unit matrix, the preset digital sequence, the original data and the encryption auxiliary information; Randomly selecting a matrix as a second matrix, and generating a ciphertext second component according to the second matrix, the random matrix, the original data, the identity matrix and the preset digital sequence; Randomly selecting a matrix as a third matrix, and generating a ciphertext third component according to the third matrix, the encryption auxiliary information, the second matrix, the preset digital sequence and the standard basis vector; An encrypted ciphertext is generated according to the ciphertext first component, the ciphertext second component and the ciphertext third component.
8. A proxy computing device, characterized in that: The device is applied to a proxy server, and the proxy computing device comprises: An information receiving module, used for receiving multiple re-encryption keys, multiple public keys and multiple encrypted ciphertexts from multiple clients; A homomorphic computing module, used to perform homomorphic computing on the multiple encrypted ciphertexts according to the multiple public keys to obtain multiple homomorphic computing ciphertext results; A re-encryption conversion module, used to convert the multiple homomorphic calculation ciphertext results into multiple recipient ciphertexts corresponding to the multiple clients according to the multiple re-encryption keys; The ciphertext sending module is used to send the multiple recipient ciphertexts to the multiple clients respectively, so that the clients can decrypt the recipient ciphertexts.
9. A proxy computing device, characterized in that: The device is applied to a client, and the proxy computing device comprises: A re-encryption key generation module, used to generate a re-encryption key based on its own private key and the public key from other clients; The encrypted ciphertext generation module is used to generate the encrypted ciphertext according to its own public key and original data; An information sending module, used for sending the re-encryption key, the own public key and the encrypted ciphertext to a proxy server; The ciphertext receiving module is used to receive the recipient ciphertext from the proxy server; The ciphertext decryption module is used to decrypt the receiving party's ciphertext according to its own private key to obtain the original data.
10. A proxy computing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the agent computing method according to any one of claims 1 to 3 or any one of claims 4 to 7.
11. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the agent computing method according to any one of claims 1 to 3 or any one of claims 4 to 7 are implemented.
12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the agent computing method according to any one of claims 1 to 3 or any one of claims 4 to 7 are implemented.