Resource synchronization coordination method and system based on fully homomorphic encryption
By applying all-homomorphic encryption technology in resource synchronization coordination, homomorphic encryption of user resources is determined to determine the minimum common multiple to achieve resource coordination and synchronization, the problem of data privacy exposure in traditional methods is solved, and efficient and secure resource synchronization is achieved.
Patent Information
- Application Number
- CN202411678055.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The traditional resource synchronization and coordination method requires each participant to disclose its own data, resulting in the exposure of commercial secrets and user privacy information, making it difficult to achieve synchronous coordination of resources and production capacity while protecting data privacy.
The resource information of any two users is homomorphicly encrypted using a method based on full homomorphic encryption. By determining the maximum common factor and minimum common multiple of the encrypted ciphertext, efficient, real-time and secure synchronization and coordination of resources are achieved.
It realizes efficient and real-time synchronization of resources, ensures data security and privacy protection, improves resource utilization and system response speed, and reduces costs and improves flexibility.
Smart Images

Figure CN119182510B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data encryption technology, and more specifically to a resource synchronization coordination method and system based on fully homomorphic encryption. Background Art
[0002] With the rapid development of information technology, data security and privacy protection have become the focus of today's society. In many fields, such as supply chain management, intelligent manufacturing, medical services, traffic scheduling, energy management, etc., the synchronization and coordination of resources plays a vital role in improving efficiency and reducing costs. However, traditional resource synchronization and coordination methods often require all participants to disclose their own data, which largely exposes the company's business secrets and users' privacy information.
[0003] Therefore, how to achieve synchronous coordination of resources and production capacity while protecting data privacy has become an urgent problem to be solved. Summary of the invention
[0004] In response to the above problems, the present invention provides a production capacity synchronization and coordination method and system based on fully homomorphic encryption, aiming to make full use of the advantages of fully homomorphic encryption technology to achieve real-time, efficient and secure synchronization and coordination of resources, and provide an effective solution for various fields.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] In a first aspect, the present application discloses a resource synchronization coordination method based on fully homomorphic encryption, comprising: performing homomorphic encryption on resource information of any two users to obtain encrypted ciphertext;
[0007] The larger of the ciphertexts is assigned a value of m, and the smaller of the ciphertexts is assigned a value of n; and the greatest common factor of the encrypted ciphertexts is determined, and the least common multiple is determined based on the ciphertext n and the greatest common factor;
[0008] Use the least common multiple to coordinate and synchronize resources;
[0009] The step of determining the least common multiple according to the ciphertext n and the greatest common factor includes:
[0010] S1. Assign the larger of the ciphertext n and the greatest common factor a, and the smaller one b;
[0011] S2, convert the ciphertext b to b*2 i The ciphertext a and the size of each element in the array D are judged respectively, and the output result of either 0 or 1 is stored in the array C;
[0012] S3, subtract the next element in array C from the adjacent previous element, and form array S based on the calculation results;
[0013] S4, multiply array S by 2 i as the current secret quotient; at the same time, array S is multiplied with array D correspondingly to obtain the largest divisor that is smaller than the ciphertext a, the remainder is determined by subtracting the ciphertext a from the largest divisor, and the remainder is assigned to a;
[0014] S5. Re-compare a and b, assign the larger ciphertext value to a, and the smaller ciphertext value to b;
[0015] S6. Repeat S2-S5 until the maximum number of iterations is met, accumulate the quotients, multiply the result by the ciphertext m, and obtain the least common multiple.
[0016] Further, determining the greatest common factor of the encrypted ciphertext comprises:
[0017] S01, convert the ciphertext n to n*2 i The method is stored in array d;
[0018] S02, respectively determine the size of the ciphertext m and each element in the array d, obtain an output result of either 0 or 1 and store it in the array c;
[0019] S03, subtract the next element in array c from the adjacent previous element, and form array s based on the calculation results;
[0020] S04, multiply the corresponding elements in array s and array d and sum them to obtain the largest divisor that is less than the ciphertext m;
[0021] S05. Subtract the maximum common divisor from the ciphertext m and repeat steps S02-S04 with the ciphertext n until the maximum number of iterations is met, and output the larger value in the last iteration as the greatest common divisor.
[0022] Furthermore, the assignment process includes:
[0023] Determine the ciphertext value c: when the ciphertext a is less than the ciphertext b or the ciphertext m is less than the ciphertext n, the ciphertext value c is determined to be 1, otherwise the ciphertext value c is determined to be 0;
[0024] According to the ciphertext value c, the ciphertext a and ciphertext b are assigned values by the following formula;
[0025] a=(1-c)*a+c*b
[0026] b = c*a+(1-c)*b or
[0027] m=(1-c)*m+c*n
[0028] n=c*m+(1-c)*n.
[0029] Furthermore, the assignment process includes:
[0030] Determine the ciphertext value c: when the ciphertext a is less than the ciphertext b or the ciphertext m is less than the ciphertext n, the ciphertext value c is determined to be 0, otherwise the ciphertext value c is determined to be 1;
[0031] According to the ciphertext value c, the ciphertext a and ciphertext b are assigned values by the following formula;
[0032] a=c*a+(1-c)*b
[0033] b = (1-c)*a+c*b or
[0034] m=c*m+(1-c)*n
[0035] n=(1-c)*m+c*n.
[0036] Furthermore, the ciphertext value c is determined as follows:
[0037] A sign function shsign(x) is preset, where x is the input of the sign function, and is used to output 1 when x is less than 0, otherwise output 0; or to output 0 when x is less than 0, otherwise output 1;
[0038] Call the sign function shsign(x) with the difference between ciphertext a and ciphertext b as input to get the ciphertext value c.
[0039] Furthermore, in S2, the sign function shsign(x) is used to determine the size of each element in the ciphertext a and the array d.
[0040] Furthermore, in element D[i] of array D or element d[i] of array d,
[0041]
[0042] In the formula, is the Gaussian floor function.
[0043] Furthermore, the maximum number of iterations is:
[0044]
[0045] In the formula, is the ceiling function.
[0046] In a second aspect, the present application discloses a resource synchronization coordination system based on fully homomorphic encryption, including a user terminal A, a user terminal B, and a server terminal;
[0047] Client A and client B perform homomorphic encryption on their respective resource information and send the encrypted ciphertext to the server.
[0048] The server is used to execute the resource synchronization and coordination method based on fully homomorphic encryption as described in any of the above items to synchronize and coordinate user resources.
[0049] It can be seen from the above technical solution that the present invention discloses a production capacity synchronization and coordination method and system based on fully homomorphic encryption, which ensures the privacy security of user resource information through fully homomorphic encryption, and at the same time uses encrypted data to directly calculate the least common multiple, so as to achieve efficient and real-time synchronization of resources. Compared with the existing technology, it not only solves the problem of resource synchronization and coordination, but also ensures the security and privacy protection of data.
[0050] Specifically, the present invention realizes resource coordination and synchronization through the least common multiple, which can effectively ensure the shortest cycle of resource synchronization, reasonably allocate resources, reduce resource idleness, or avoid unnecessary waiting time, thereby improving resource utilization and system response speed; at the same time, it can also reduce costs, improve flexibility, simplify scheduling, and ensure the security and timeliness of data.
[0051] In addition, based on homomorphic encryption, the method of determining the least common multiple through a series of operations such as ciphertext comparison, difference calculation, quotient and remainder determination, and iterative process can complete resource coordination and synchronization without decryption, which can effectively ensure the security of data during the entire processing process.
[0052] The present invention has good compatibility and can adapt to data processing needs of different scales. It provides real-time, efficient and secure resource synchronization solutions for many fields such as supply chain management, intelligent manufacturing, medical services, etc., optimizes resource allocation and scheduling, and enhances the overall performance and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0054] Figure 1 A flow chart of a resource synchronization coordination method based on fully homomorphic encryption provided by the present invention;
[0055] Figure 2 A schematic diagram of a calculation example for determining the greatest common divisor provided by the present invention;
[0056] Figure 3A schematic diagram of a calculation example for determining the least common multiple provided by the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The embodiment of the present invention discloses a resource synchronization coordination method based on fully homomorphic encryption, which mainly uses fully homomorphic encryption to achieve security and privacy protection of user information; specifically, it includes:
[0059] Perform homomorphic encryption on the resource information of any two users to obtain encrypted ciphertext;
[0060] The larger of the ciphertexts is assigned a value of m, and the smaller of the ciphertexts is assigned a value of n; and the greatest common factor of the encrypted ciphertexts is determined, and the least common multiple is determined based on the ciphertext n and the greatest common factor;
[0061] Use the lowest common multiple to coordinate and synchronize resources.
[0062] The problem of resource synchronization and coordination can be effectively solved through the least common multiple; that is, the least common multiple can effectively ensure the shortest cycle of resource synchronization, so that resources can be reallocated and utilized in the shortest time to reduce the possibility of idle resources or avoid unnecessary waiting time, thereby improving resource utilization and system response speed.
[0063] However, based on the fully homomorphic encryption environment, existing methods for determining the least common multiple, such as the method based on the greatest common divisor (GCD) and the prime factorization method, are difficult to apply directly;
[0064] For the method based on the greatest common divisor (GCD), the essence is to calculate the least common multiple through a*b / GCD(a, b); because it involves division and the greatest common divisor operation, most homomorphic encryption cannot be implemented at present;
[0065] For the prime factorization method, each number is decomposed into prime factors; then the power with the most occurrences of each prime factor is extracted, and these prime factors are multiplied to get the least common multiple; because this method involves prime factorization and comparing the powers with the most occurrences, it cannot be directly applied to homomorphic encrypted data.
[0066] In order to solve the above problem, the present application proposes the following method for determining the least common multiple based on the ciphertext n and the greatest common factor: Figure 1 , the steps include:
[0067] S1. Assign the larger of the ciphertext n and the greatest common factor a, and the smaller one b;
[0068] S2, convert the ciphertext b to b*2 i The ciphertext a and the size of each element in the array D are judged respectively, and the output result of either 0 or 1 is stored in the array C;
[0069] S3, subtract the next element in array C from the adjacent previous element, and form array S based on the calculation results;
[0070] S4, multiply array S by 2 i as the current secret quotient; at the same time, array S is multiplied with array D correspondingly to obtain the largest divisor that is smaller than the ciphertext a, the remainder is determined by subtracting the ciphertext a from the largest divisor, and the remainder is assigned to a;
[0071] S5. Re-compare a and b, assign the larger ciphertext value to a, and the smaller ciphertext value to b;
[0072] S6. Repeat S2-S5 until the maximum number of iterations is met, accumulate the quotients, multiply the result by the ciphertext m, and obtain the least common multiple.
[0073] The present invention can achieve resource synchronization without the need for participating users to disclose their own data; at the same time, the method for determining the least common multiple in this application can be directly applied to homomorphic encryption.
[0074] This embodiment defines a structure DivisionResult for storing the above two parts of results. The structure includes a midquotient (for storing the secret quotient) and a remainder (for storing the remainder).
[0075] Each iteration is equivalent to subtracting the maximum b*2 that is just less than a. i , which is equivalent to performing a division, where the quotient is 2 i , the remainder is ab*2 i ;
[0076] Specifically, according to m[i]=S[i]*2 i Get the array M, and add up the items of the array M and store them in result.midquotient as the quotient obtained by performing a shdiv. At the same time, get the array T according to T[i] = S[i]*D[i], and add up the items of the array T, that is, find the largest b*2 that is just smaller than a. i , then ab*2 iStored in the structure result.remainder as the remainder after completing one shdiv.
[0077] In one embodiment, determining the greatest common factor of the encrypted ciphertext comprises:
[0078] S01, convert the ciphertext n to n*2 i The method is stored in array d;
[0079] S02, respectively determine the size of the ciphertext m and each element in the array d, obtain an output result of either 0 or 1 and store it in the array c;
[0080] S03, subtract the next element in array c from the adjacent previous element, and form array s based on the calculation results;
[0081] S04, multiply the corresponding elements in array s and array d and sum them to obtain the largest divisor that is less than the ciphertext m;
[0082] S05. Subtract the maximum common divisor from the ciphertext m and repeat steps S02-S04 with the ciphertext n until the maximum number of iterations is met, and output the larger value in the last iteration as the greatest common divisor.
[0083] In an exemplary embodiment, Figure 2 As shown,
[0084] First, the larger of the encrypted ciphertexts is assigned a value of m, and the smaller of the encrypted ciphertexts is assigned a value of n. In this embodiment, m=984, n=72;
[0085] Then the ciphertext n is divided into n*2 i The method is stored in array d;
[0086] Furthermore, the ciphertext m is compared with the size of each element in the array d. When m>d[i], output 0, otherwise output 1, and store the output result in the array c.
[0087] Subtract the next element in array c from the previous element, and form array s based on the calculation results;
[0088] Multiply the corresponding elements in array s and array d and sum them to obtain n*8, which is the largest divisor smaller than the ciphertext a; in one embodiment, store it in array t;
[0089] Subtract the maximum divisor from the ciphertext m, that is, 984-n*8=408; then repeat the above steps based on 408 and the ciphertext n until the maximum number of iterations is met, and output the larger value in the last iteration, that is, 24, to obtain the greatest common divisor gcd=24 of the ciphertexts m and n.
[0090] Further, refer to Figure 3 , determine the least common multiple based on the ciphertext n and the greatest common factor; the process is:
[0091] First, the larger of the ciphertext n and the greatest common factor is assigned a, and the smaller is assigned b; at this time, a=n=72, b=gcd=24;
[0092] Further, the ciphertext b is converted to b*2 i The ciphertext a is stored in array D in a manner, and the size of each element in array D is judged. When a>D[i], 0 is output, otherwise 1 is output. In this embodiment, the output result is stored in array C;
[0093] Then, the next element in array C is subtracted from the adjacent previous element, and array S is formed based on the calculation results; and array S is multiplied by 2 i As the current quotient; in this embodiment, 1*2 1 ,
[0094] At the same time, array S is multiplied with array D correspondingly to obtain the largest approximate value 24*2 that is smaller than the ciphertext a. The remainder is determined by subtracting the ciphertext a from the largest approximate value, and the remainder is assigned to a. A and b are compared again, and the larger ciphertext value is assigned to a, and the smaller ciphertext value is assigned to b.
[0095] Repeat the above steps until the maximum number of iterations is met, and finally the cumulative sum of the secret quotient is 2 1 +2 0 +0+...+0=3; the result 3 is multiplied by the ciphertext m=984 to obtain the least common multiple 2952.
[0096] To further optimize the above technical solution:
[0097] The assignment process in the above steps is: first determine the ciphertext value c, that is, when the ciphertext m is less than the ciphertext n, or the ciphertext a is less than the ciphertext b, determine the ciphertext value c to be 1, otherwise determine the ciphertext value c to be 0;
[0098] Then, according to the ciphertext value c, the ciphertext a and ciphertext b are assigned values using the following formula;
[0099] a=(1-c)*a+c*b
[0100] b = c*a+(1-c)*b or
[0101] m=(1-c)*m+c*n
[0102] n=c*m+(1-c)*n.
[0103] For example:
[0104] If a≥b, then c=0, in which case a=(1-c)*a+c*b=a, b=c*a+(1-c)*b=b;
[0105] If a﹤b, then c=1. At this time, a=(1-c)*a+c*b=b, b=c*a+(1-c)*b=a.
[0106] Or determine the ciphertext value c: when the ciphertext m is less than the ciphertext n or the ciphertext a is less than the ciphertext b, the ciphertext value c is determined to be 0, otherwise the ciphertext value c is determined to be 1;
[0107] According to the ciphertext value c, the ciphertext a and ciphertext b are assigned values by the following formula;
[0108] a=c*a+(1-c)*b
[0109] b = (1-c)*a+c*b or
[0110] m=c*m+(1-c)*n
[0111] n=(1-c)*m+c*n.
[0112] In the present application, the above method is used to keep a and m always at a larger value, and b and n always at a smaller value.
[0113] In a preferred embodiment, a sign function shsign(x) is preset, where x is the input of the sign function, and is used to output 1 when x is less than 0, otherwise output 0; or to output 0 when x is less than 0, otherwise output 1;
[0114] Then, by calling the sign function shsign(x), the difference between the ciphertext m and the ciphertext n, or the difference between the ciphertext a and the ciphertext b is taken as input to obtain the ciphertext value c.
[0115] In one embodiment, in order to ensure that the elements in array d or array D are greater than max(a,b), in, is a Gaussian floor function. In an exemplary embodiment, the loop condition is set to (i=0; i≤MAX; i++), Get an array D or array d with MAX+1 elements.
[0116] In one embodiment, the size of the ciphertext a and each element in the array d is determined, and an output result of either 0 or 1 is obtained, that is, when the ciphertext a is greater than or equal to each element in the array d, 1 is output, and when the ciphertext a is greater than or equal to each element in the array d, 0 is output; or when the ciphertext a is greater than or equal to each element in the array d, 0 is output, and when the ciphertext a is greater than or equal to each element in the array d, 0 is output;
[0117] The present invention preferentially calls the sign function shsign(x), that is, using ad[i] as an input parameter to obtain the element c[i] in the array c through the function shsign. At this time, the number of elements in the array c is the same as that in the array d, both containing MAX+1 elements;
[0118] Furthermore, in order to obtain the largest b*2 that is just smaller than a i , get the maximum n*2 that is just less than m i , so that the next element in array c is subtracted from the adjacent previous element, and then array s is formed based on the calculation results, that is, in array s, element s[i]=c[i+1]-c[i]; at this time, the loop condition can be set to (i=0; i≤MAX-1; i++) so that array s has only MAX elements.
[0119] In this application, there are two situations in the first iteration: the first situation is a>a / 2>b, which is reduced to more than half of the original; the other situation is a>b>a / 2, which does not meet the requirement of being reduced to more than half of the original. However, since steps S2-S4 are repeated in each iteration to ensure that a>b, then a / 2>b / 2 must exist, and then a>b>a / 2>b / 2 must exist at this time, so after the second iteration, it can be guaranteed to be reduced to more than half of the original. Therefore, the maximum number of iterations in the present invention is set to:
[0120]
[0121] In the formula, is the ceiling function.
[0122] In one embodiment, the magnitude of the ciphertext is obtained through the client to determine the number of iterations; for example, when a, b < 10 3 When the number of iterations is 2(log 2 1024)=20, when a,b<10 4 When the number of iterations is 2(log 2 16384)=28.
[0123] In a specific embodiment:
[0124] This embodiment discloses a resource synchronization coordination system based on fully homomorphic encryption, characterized in that it includes a user terminal A, a user terminal B, and a server terminal;
[0125] Client A and client B perform homomorphic encryption on their respective resource information and send the encrypted ciphertext to the server.
[0126] The server is used to execute any one of the resource synchronization and coordination methods based on fully homomorphic encryption to synchronize and coordinate user resources.
[0127] In a preferred embodiment,
[0128] User A sends his resource information to the server in encrypted ciphertext using fully homomorphic encryption. User B encrypts his resource information with the public key published by User A, and finds the least common multiple of the two under the ciphertext, and then returns the result to Party A; or sends the ciphertext to the server to determine the least common multiple, and returns the result to both Party A and Party B at the same time.
[0129] User A and user B coordinate and synchronize their respective resources based on the least common multiple.
[0130] Compared with the prior art, the present application achieves effective protection of user resource information by cleverly utilizing the properties of homomorphic encryption, and at the same time combines the least common multiple for coordinated synchronization, which can effectively ensure the shortest cycle of resource synchronization, reasonably allocate resources, reduce resource idleness, or avoid unnecessary waiting time, thereby improving resource utilization and system response speed.
[0131] At the same time, the sign function shsign(x) proposed by this method can determine the size relationship between two numbers in the ciphertext state, ensuring the security of the encryption process. In addition, this method sets a maximum number of iterations during the iteration process to avoid potential security risks caused by infinite iterations.
[0132] In addition, this application converts the smaller ciphertext into b*2 i The method is stored in the array d[i], so that the largest divisor smaller than the ciphertext a can be quickly found in the subsequent steps, which greatly improves the execution efficiency of the algorithm. At the same time, the strategy of first storing the product and then summing is adopted in step S4, which further optimizes the calculation process and reduces the amount of calculation.
[0133] The present invention has a wide range of application scenarios. For example, a certain product is obtained by assembling parts from different factories. The method of the present invention can achieve resource synchronization in the shortest cycle while protecting the production capacity of each factory, thereby helping to reasonably allocate resources, avoid unnecessary shutdowns or backlogs, ensure the production synchronization of each process, and improve overall production efficiency.
[0134] For example, in an industrial park, the maintenance cycles of various equipment are usually different. If you want to maintain multiple devices in the same time period, save manpower and time, save costs, and protect the company's maintenance frequency, this method can solve this problem well.
[0135] Another example is regular meetings or cooperation arrangements. Suppose there are two different companies that need to go to the relevant government departments regularly to handle related business. Company A goes once every 6 weeks, and Company B goes once every 8 weeks. If the two departments need to communicate and cooperate regularly and arrange their joint meetings reasonably, but they don't want each other to know the frequency of their business handling, this method can calculate the least common multiple of 6 and 8 (24 weeks) and know that a meeting can be arranged every 24 weeks, which is convenient for better planning of communication and collaboration.
[0136] In short, the system of coordination and balance of periodic events under privacy protection has a wide range of applications in daily life. Under the premise of protecting user privacy and security, it rationally allocates resources to maximize the overall system utilization, and the phase rate is significantly improved.
[0137] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. The above description of the disclosed embodiments enables professionals and technicians in this field to implement or use the present invention. Various modifications to these embodiments will be obvious to professionals and technicians in this field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to what is shown herein.
Claims
1. A resource synchronization coordination method based on fully homomorphic encryption, characterized in that: Perform homomorphic encryption on the resource information of any two users to obtain encrypted ciphertext; The larger of the ciphertexts is assigned a value of m, and the smaller of the ciphertexts is assigned a value of n; and the greatest common factor of the encrypted ciphertexts is determined, and the least common multiple is determined based on the ciphertext n and the greatest common factor; Use the least common multiple to coordinate and synchronize resources; The steps of determining the greatest common factor of the encrypted ciphertext include: S01, convert the ciphertext n to n*2 i The method is stored in array d; S02, respectively determine the size of the ciphertext m and each element in the array d, obtain an output result of either 0 or 1 and store it in the array c; S03, subtract the next element in array c from the adjacent previous element, and form array s based on the calculation results; S04, multiply the corresponding elements in array s and array d and sum them to obtain the largest divisor that is less than the ciphertext m; S05, subtracting the maximum common divisor from the ciphertext m, and then repeating steps S02-S04 with the ciphertext n until the maximum number of iterations is met, and outputting the larger value in the last iteration as the greatest common divisor; The steps of determining the least common multiple according to the ciphertext n and the greatest common factor include: S1. Assign the larger of the ciphertext n and the greatest common factor a, and the smaller one b; S2, convert the ciphertext b to b*2 i The ciphertext a and the size of each element in the array D are judged respectively, and the output result of either 0 or 1 is stored in the array C; S3, subtract the next element in array C from the adjacent previous element, and form array S based on the calculation results; S4, multiply array S by 2 i as the current secret quotient; at the same time, array S is multiplied with array D correspondingly to obtain the largest divisor that is smaller than the ciphertext a, the remainder is determined by subtracting the ciphertext a from the largest divisor, and the remainder is assigned to a; S5. Re-compare a and b, assign the larger ciphertext value to a, and the smaller ciphertext value to b; S6. Repeat S2-S5 until the maximum number of iterations is met, accumulate the quotients, multiply the result by the ciphertext m, and obtain the least common multiple.
2. The resource synchronization coordination method based on fully homomorphic encryption according to claim 1 is characterized in that: The assignment process includes: Determine the ciphertext value c: when the ciphertext a is less than the ciphertext b or the ciphertext m is less than the ciphertext n, the ciphertext value c is determined to be 1, otherwise the ciphertext value c is determined to be 0; According to the ciphertext value c, the ciphertext a and ciphertext b are assigned values by the following formula; a=(1-c)*a+c*b b = c*a+(1-c)*b or m=(1-c)*m+c*n n=c*m+(1-c)*n.
3. The resource synchronization coordination method based on fully homomorphic encryption according to claim 1 is characterized in that: The assignment process includes: Determine the ciphertext value c: when the ciphertext a is less than the ciphertext b or the ciphertext m is less than the ciphertext n, the ciphertext value c is determined to be 0, otherwise the ciphertext value c is determined to be 1; According to the ciphertext value c, the ciphertext a and ciphertext b are assigned values by the following formula; a=c*a+(1-c)*b b = (1-c)*a+c*b or m=c*m+(1-c)*n n=(1-c)*m+c*n.
4. The resource synchronization coordination method based on fully homomorphic encryption according to claim 2 or 3, characterized in that: The ciphertext value c is determined as follows: A sign function shsign(x) is preset, where x is the input of the sign function, and is used to output 1 when x is less than 0, otherwise output 0; or to output 0 when x is less than 0, otherwise output 1; Call the sign function shsign(x) with the difference between ciphertext a and ciphertext b as input to get the ciphertext value c.
5. The resource synchronization coordination method based on fully homomorphic encryption according to claim 4 is characterized in that: In S2, the sign function shsign(x) is used to determine the size of the ciphertext a and each element in the array D.
6. The resource synchronization coordination method based on fully homomorphic encryption according to claim 1 is characterized in that: In element D[i] of array D or element d[i] of array d, In the formula, is the Gaussian floor function.
7. The resource synchronization coordination method based on fully homomorphic encryption according to claim 1 is characterized in that: The maximum number of iterations is: In the formula, is the ceiling function.
8. A resource synchronization coordination system based on fully homomorphic encryption, characterized in that: Including client A, client B and server; Client A and client B perform homomorphic encryption on their respective resource information and send the encrypted ciphertext to the server. The server is used to execute the resource synchronization and coordination method based on fully homomorphic encryption as described in any one of claims 1 to 7 to synchronize and coordinate user resources.
Citation Information
Patent Citations
KNN classification service system and method supporting privacy protection
CN110011784A
Federal learning privacy protection method and system based on homomorphic encryption
CN117640253A