A function secret sharing method for greater than comparison operations

By embedding a trigger condition greater than the comparison condition during the key generation stage and using a one-sided GGM tree extension, the problem of high online computation overhead of distributed comparison functions is solved, and efficient comparison operations are achieved.

CN123122831APending Publication Date: 2026-11-17BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611614060.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-19
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing distributed comparison functions in privacy-preserving inference systems suffer from excessive online pseudo-random function calls, leading to increased computational and memory access overhead.

Method used

During the key generation phase, a trigger condition greater than the comparison is embedded. Arithmetic payloads are only embedded on branches with the same high-order prefix and a threshold bit. During the key evaluation phase, a one-sided GGM tree expansion mechanism is adopted to reduce the number of online pseudo-random expansions.

Benefits of technology

It reduces the computational overhead of the server's online evaluation phase, improves the execution efficiency of large-scale comparison operations, and protects the privacy of comparison thresholds and arithmetic loads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122831A_ABST
    Figure CN123122831A_ABST
Patent Text Reader

Abstract

This invention is a function secret sharing method for comparison operations, belonging to the fields of big data security and cloud computing privacy protection technology. In the offline stage, a key generation algorithm execution program is deployed on the key generator. This program decomposes the comparison threshold, applies correction words layer by layer to the first few bits, generates the payload mask only by the right expansion function, and generates a leaf mask and lookup table for the last few bits, generating the key held by the server. In the online stage, a key evaluation algorithm execution program is deployed on both servers. This program performs unilateral expansion based on the first few bits of the input, updates the accumulated value using the corrected payload mask from expanding the right child node, and terminates the evaluation using a lookup table for the last few bits, obtaining the local arithmetic share. The user obtains the comparison result of the input based on the arithmetic shares of the two servers. This invention reduces the computational overhead of local pseudo-random tree expansion on the server while maintaining function parameter privacy and semi-honest security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of big data security and cloud computing privacy protection technology, specifically referring to a function secret sharing method for greater than comparison operations. Background Technology

[0002] With the development of cloud computing and machine learning services, an increasing number of computationally intensive tasks are being outsourced to the cloud. These tasks typically involve sensitive information such as user data, model parameters, business thresholds, transaction records, or graph structures, thus requiring computation to be completed without disclosing plaintext data and function parameters. Secure multi-party computation provides an important technical path to meet these needs. For linear computations such as addition, linear layers, and matrix multiplication, schemes based on arithmetic secret sharing and preprocessing randomness are relatively mature. However, nonlinear computations such as comparison, sign judgment, and maximum value determination remain major performance bottlenecks in privacy-preserving machine learning, often resulting in high communication rounds and online computation overhead. For example, in privacy-preserving neural network inference, activation functions such as ReLU can be transformed into sign or comparison judgments; therefore, the efficiency of comparison functions directly affects the overall system performance.

[0003] Function Secret Sharing (FSS) is a lightweight cryptographic primitive oriented at the function level. Its basic idea is to use a key generation algorithm to split the objective function into two function keys. Two non-colluding servers then use their respective keys to perform local evaluations on the same input, ultimately reconstructing the objective function value from the two output shares. Compared to obfuscated circuits or multi-round interactive comparison protocols, FSS typically shifts a significant amount of cryptographic work to the offline key generation stage and significantly reduces the number of online communication rounds. Distributed Point Functions (DPFs) and Distributed Comparison Functions (DCFs) are representative constructs in Function Secret Sharing and have been used in scenarios such as secure comparisons and secure neural network activation functions.

[0004] The GGM tree (Goldreich-Goldwasser-Micali tree) is a binary tree structure formed by recursively expanding a pseudo-randomization function. It is a commonly used key evaluation structure in the construction of DPF / DCF-type FSS. Existing distributed comparison functions can support comparison operations, but they still have shortcomings when facing practical privacy-preserving inference systems: existing schemes expand the left and right GGM tree child nodes at each level simultaneously, resulting in a large number of online pseudo-randomization function calls.

[0005] Traditional distributed comparison functions (DCFs) are function secret sharing primitives. Their goal is to achieve local evaluation of the comparison function on two non-colluding servers, allowing each server to receive its share of the output. The reconstructed result then yields the payload corresponding to the comparison outcome. Traditional DCFs use a less-than comparison function as their basic form, but greater-than comparisons can be implemented through additional threshold or interval transformation operations.

[0006] Traditional DCF typically implements the following function: given a threshold and output load For input ,when Time output Otherwise, output 0. The key generator determines the key based on the threshold during the offline phase. Load The security parameters generate two DCF keys held separately by two servers; during the online phase, both servers use the same input. Perform a local evaluation and output the share. Finally, add the two outputs to get the function result.

[0007] Reference 1 (Boyle E, Chandran N, Gilboa N, et al. Function SecretSharing for Mixed-Mode and Fixed-Point Secure Computation[J]. 2021.DOI:10.1007 / 978-3-030-77886-6_30.) discloses a traditional DCF key generation technique. For example... Figure 1 As shown, in the traditional DCF key generation (Gen) stage, input security parameters Comparison threshold Arithmetic load and addition groups Output the keys held by the two servers respectively. and The key generator determines the pseudo-random generator. and mapping Pseudo-random generator Used from Bit seed expansion yields the states of left and right child nodes, control bits, and group element masks, and the mapping function. Will Bit strings are mapped to group elements; the key generator will compare thresholds. Decomposed into an n-bit binary representation, the initial seed is randomly sampled from two servers to generate the start key. For each server, this key is used at each layer. The upper-level seed calls the pseudo-random generator To obtain the seeds for the left and right branches. Group element mask and control bits According to the threshold bits Sure Branches and Branches, This indicates that the threshold should be maintained. Branches with equal prefixes, This indicates the branch that deviates from the threshold path at that layer; then... Add AND when the branch is a left branch The relevant correction terms ensure that the outputs of both parties, after reconstruction, are less than the definition of the comparison function; the key generator calculates a correction word for each path not covered by random sampling, and combines the seed and correction words to output two key shares. and The data is then distributed to two separate servers. For example... Figure 1 As shown, in the traditional DCF key evaluation (Eval) phase, two servers execute the key evaluation process in parallel, with each server inputting its own key. and input to be evaluated Output the share of function values ​​held by this server. The server parses the current layer's correction word at each layer and calls the pseudo-random generator with the current seed. Simultaneously, it generates the complete states of the left and right branches, determines whether to correct the left and right branch states based on the control bits of the previous layer, and after processing all layers, it uses the termination correction word to correct the final output and returns its own function share. The function value shares of the two servers are added together to obtain the output of the traditional DCF comparison function.

[0008] While existing distributed comparison functions (DCFs) can support comparison operations, they still have shortcomings when applied to practical privacy-preserving inference systems. Current solutions simultaneously expand the left and right child nodes of the GGM tree at each layer, leading to a high number of online pseudo-random function calls. Traditional DCF online evaluation phases typically require expanding the left and right child nodes at each layer, then selecting one child node based on the current input bits for further evaluation. For greater-than comparisons, only one branch corresponding to the input path is ultimately used, while the expansion result of the other branch is discarded, resulting in unnecessary pseudo-random generation and state resolution overhead. This makes them inefficient in scenarios such as greater-than comparisons and privacy-preserving machine learning, especially in large-scale cloud deployments, leading to increased computational overhead, temporary state generation, and memory access overhead on the online local computer system. Summary of the Invention

[0009] The technical problem this invention aims to solve is: how to construct a function secret sharing method for greater-than comparison operations in a two-server semi-honest model of secure multi-party computation scenarios, so as to reduce the local computational overhead of the server during the online evaluation phase and improve the execution efficiency of the server's computer system for large-scale comparison operations while protecting the privacy of the comparison threshold, arithmetic load, and intermediate evaluation state. To solve the above technical problem, this invention provides a function secret sharing method for greater-than comparison operations, embedding the triggering condition of the greater-than event into the key generation process, thereby reducing the pseudo-random tree expansion overhead during the online evaluation phase while maintaining the privacy of function parameters and semi-honest security.

[0010] This invention provides a method for sharing function secrets oriented towards greater than comparison operations. The system in which this method is applied includes a key generator, a result user, and a non-colluding server. and The method includes the following steps:

[0011] Step 1, the key generator determines the key based on the comparison threshold. Arithmetic load And security parameters, generate server Key held ,in ;

[0012] Deploy the key generation algorithm on the key generator's computer system. The execution program, and the algorithm is pre-set. Low-order suffix number Left expansion function Right expansion function and termination mapping function , Expanding only the left child node does not generate a payload mask. Only the right child node is expanded, and a mask for the payload is generated; the key generator executes the algorithm. Based on the input threshold, arithmetic load, security parameters, and addition group Output server Key held ;

[0013] The algorithm Will Decomposed into A bit string, the first bit string Bit by bit, apply the correction word layer by layer, using the left spread function at each layer. Expand the left child node using the right expansion function. Expand the right child node and generate a mask for the payload; the last bit of the bit string Bits, using the termination mapping function and the The layer's node state generates leaf masks and lookup tables. Ultimately, the server Initial node state, initial control bits, and previous Layer calibration information and lookup table The key is combined to form the server's key. ;

[0014] The key generator will give the key Send to server ;

[0015] Step 2, the two servers process the input data. The online evaluation is performed in parallel, and each entity outputs its respective arithmetic share to the result user.

[0016] On the server Deploying key evaluation algorithms in computer systems The execution program; when the server Obtain input data At that time, the algorithm is executed. Output its own arithmetic share; server Parse local key Obtain the initial node state, initial control bits, and previous... Layer calibration information and lookup table The algorithm Input data Decomposed into Bit string, for The former For each bit, perform a one-sided expansion based on the bit value. If the value is 1, expand the right child node; otherwise, expand the left child node. Update the node state and control bits at each level. When expanding the right child node, update the accumulated value using the corrected payload mask. The end suffix By terminating the mapping function Obtain the leaf group elements, based on the first The layer's control bits and lookup table are used to correct the leaf group elements, and the corrected leaf group elements are used to update the accumulated value to obtain the server. Arithmetic share;

[0017] Step 3, the user will use the arithmetic shares of the two servers in the addition group. Add them together to get the input data. With threshold The comparison results, if The result is Otherwise, the result is 0.

[0018] Compared with existing technologies, the advantages and positive effects of this invention are as follows: the method of this invention directly addresses the design of the key generation and evaluation process based on the greater than comparison function; in the key generation stage, according to the triggering condition of the greater than comparison, key generation is performed only when the high-order prefixes are the same and a threshold bit exists. Input bits The arithmetic load is embedded on the truly effective branches that may produce results greater than the expected outcome. During the key evaluation phase, a one-sided GGM tree evaluation mechanism is proposed, which no longer expands both left and right child nodes simultaneously, but expands only one child node based on the current input bits, thereby reducing the number of online pseudo-random expansions. This invention achieves the protection of the comparison threshold and the arithmetic load... While maintaining the privacy of the intermediate evaluation state, it reduces the local computing overhead of the server during the online evaluation phase and improves the execution efficiency of large-scale comparison operations. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the existing DCF key generation and evaluation process;

[0020] Figure 2 This is a schematic diagram illustrating the implementation of the function secret sharing method for greater than comparison operations of the present invention;

[0021] Figure 3 This is a flowchart illustrating the process of implementing secure ReLU function computation using the function secret sharing method for greater than comparison operations according to the present invention. Detailed Implementation

[0022] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0023] The proposed method for secret sharing based on greater-than comparison functions (GTDCF) directly addresses the key generation and evaluation process for greater-than comparison functions. This method operates within a dual-server semi-honest model, and the applied system includes a key generator and a server. ,server And the user of the result. The key generator can be a trusted third party, a data owner, an offline preprocessor, or a key generation module securely implemented by the protocol. The two servers do not collude with each other and perform computations according to the protocol under a semi-honest model. The key generator determines the key based on a comparison threshold. Arithmetic load Safety parameters and input bit length Two key shares are generated. Each server holds one key share and verifies the input during the online phase. Perform a local evaluation. The user will then output the evaluation results from both servers into an adder group. The sum of the two results is greater than the result of the comparison function.

[0024] The core of the technical implementation of this invention is: during the key generation stage, the key generator is still allowed to prepare the necessary left and right branch correction information for both parties, based on the condition "high-order prefixes are equal and exist". The first difference bit of the selective embedding arithmetic load It generates correction words that support one-sided evaluation; however, during the online evaluation phase, the server no longer expands both left and right child nodes simultaneously at each layer like in traditional DCF, but instead only calls the left expansion function based on the public input bits. or right expansion function One of them is used to reduce the overhead of online pseudo-random expansion, and ultimately the two servers directly obtain the additive group. The arithmetic secrets of the above are shared and output. Simultaneously, the method of this invention will load... Only embed into branches where the condition is greater than the possible value, and finally... The evaluation is terminated using a lookup table.

[0025] The method of this invention is for a family of comparison functions, given a threshold. and arithmetic load ,in Let the finite abelian group be represented using additive notation, and the objective function be defined as: ,like ;otherwise .in, For input, The objective function value. This invention provides a method for sharing function secrets within a family of comparison functions, including a key generation algorithm. and key evaluation algorithm Key generation algorithm Executed by the key generator, according to a pre-set addition group Threshold Arithmetic load Safety parameters Bit length of threshold decomposition and low-order suffix numbers Output the keys of the two servers. and Key evaluation algorithm By server Execution, based on server identifier Key For input Perform an evaluation and output the arithmetic share. Correctness requires that for any input... The output share of both servers meets the requirements. addition in This is done online. Any single server only holds its own key and output share, and recovery is not possible. Or a complete function, which guarantees data privacy.

[0026] Using the method of this invention, each server Key held Include at least the following:

[0027] Server Identifier Initial node state and initial control bits ;

[0028] Seed correction word for each layer This is used to establish a correct correlation between two pseudo-random states;

[0029] Control bit correction word for each layer This is used to indicate whether the layer correction needs to be applied;

[0030] Arithmetic output correction word for each layer This is used to directly accumulate and obtain the arithmetic share output;

[0031] Termination seed, termination correction word, or termination lookup table after early stopping layer Used to process the remainder A low-position suffix.

[0032] server We also need to obtain the necessary group element conversion functions. And the identifier of the pseudo-random generation function. That is, the terminating mapping function.

[0033] The function secret sharing method for greater than comparison operations in this invention is based on a key generation algorithm. and key evaluation algorithm The pseudocode for the two algorithms is shown below for Algorithm 1 and Algorithm 2, respectively. An example is shown below. Figure 2 As shown. To highlight the unilateral expansion characteristic of online evaluation, the method of this invention sets two different expansion functions: Expand only the left child node. Expand only the right child node and generate the payload mask simultaneously; set the termination mapping function at the same time. Used to terminate seeds and low-order leaf index Leaf group elements are generated on top. In this embodiment... .

[0034]

[0035] In the key generation stage, the method of this invention inputs security parameters. Threshold Arithmetic load addition group Output server and Keys held separately and Unlike traditional DCF, the method of this invention will... The last 8 bits are used as the low-order suffix and processed uniformly through a terminating lookup table. The word is corrected layer by layer.

[0036] The key generation stage of this invention includes the following steps:

[0037] Step a1, the key generator sets the left expansion function. Right expansion function and termination mapping function Unlike traditional DCF methods that use a single extension function to generate both left and right branches, this invention separates the left and right extension functions, providing an interface for online one-sided evaluation.

[0038] Step a2, the key generator sets the threshold. Decomposed into Bit string The bit string is divided into high-order prefix. and the last 8 And randomly generate the initial node states of the two servers. and control bits The last 8 bits of the threshold decomposition are not evaluated layer by layer, but are processed later through a lookup table. It is the set of residues modulo 256 of integers. (Due to the low-order suffix...) From the last Composed of bits, when interpreted as an unsigned integer... ,when At that time, the set is In this embodiment, it is... .

[0039] Step a3, for the previous In the offline phase, the key generator still calculates the left and right candidate branch information for both servers to generate the complete correction word; however, this information is only used for key generation and does not mean that the online evaluation should also expand to two branches. For the previous Each floor Perform the following steps a31~a35.

[0040] Step a31, as in line 3 of Algorithm 1, left expansion function Based on the state of the previous level node Calculate the state of the left node in the current layer and control bits right expansion function Based on the state of the previous level node Calculate the state of the right node in the current layer Control bits and payload mask Payload mask This refers to processing data through operations such as XOR to hide the true value and improve data security.

[0041] Step a32, corresponding to line 4 of Algorithm 1, involves the key generator acting according to... Determine the branch that preserves the equal prefix. and deviation branches . This indicates that the threshold should be maintained. Branches with equal prefixes, This indicates the branch that deviates from the threshold path at that layer. For the first... Layer, when hour, This indicates that the value of this layer is set to 0. Branches are with Paths with equal prefixes are assigned the value 1. Branches are deviations from the path. The branches are left and right branches, when the input Taking the right branch at this level indicates a potential trigger. ;when When setting this layer Branches are Branches, Branches are Branch, Input Taking the right branch at this level indicates that the equal prefix should be maintained.

[0042] Step a33, corresponding to lines 5 and 6 of Algorithm 1, involves the key generator calculating the seed correction word. and left and right control bit correction words This is used to ensure that when two servers evaluate along the same input path, they obtain reconfigurable relevant states. These are the two services in the first... The layer is selected as the node state that is off-path. These are servers In the Candidate control bits generated by the left and right expansion functions of the layer. These are servers In the Candidate control bits generated by the left and right expansion functions of the layer.

[0043] Step a34, corresponding to line 7 of Algorithm 1, involves the key generator setting intermediate parameters based on the trigger condition of being greater than the comparison threshold. Only when At that time, the first Only the right branch of the layer can make the comparison result true, therefore Pick ;when hour, Set it to 0. Then, calculate the load correction word using the right branch load mask. .

[0044] Step a35, corresponding to lines 8 and 9 of Algorithm 1, involves the key generator transferring the current key. Layer correction information is combined as and along the branches that maintain the same prefix Update the node status of both servers and control bits . These are servers In the The layer was selected as The node status and control bits of the branch, Indicates server In the -1 layer control bits.

[0045] Then Increment by 1, execute steps a31-a35 to generate the next layer of correction words, update the node status and control bits of both servers, until completion. The loop ends after generating the layer correction word, updating the node status and control bits.

[0046] Step a4 corresponds to lines 11 to 14 of Algorithm 1, before processing... After that, the key generator processes the remaining bits. The least significant suffix is ​​used for all least significant indexes. Generate leaf mask and lookup table correction terms .for Low-position suffix Each index According to the Calculate the leaf mask for the node state of the layer. ,in, Indicates server The node state corresponding to the high-order prefix processing. The key generator further... Set intermediate parameters , This indicates that the lower-order suffix is ​​equal when the higher-order prefixes are equal. Whether to make Greater than ,like ,parameter for ,otherwise It is 0. Finally, according to , and Calculate the termination correction term This allows two servers to use the low-order index when the high-order prefix is ​​equal to the threshold. Reconstruction is strictly greater than the comparison result.

[0047] Step a5 corresponds to line 15 of Algorithm 1. The key generator combines the initial node state, the layer-by-layer correction word, and the low-order lookup table into the server key. No single key can recover the threshold. Load Or a complete function.

[0048] The key evaluation phase of the method of this invention is performed by the server. and Parallel execution. Server Enter your own key and input data to be evaluated Output arithmetic share The core difference between this invention and traditional DCF lies in the fact that, in the online phase, each layer is called only based on the input bits. or An extension function that does not generate another sub-branch that was not selected.

[0049]

[0050] The key evaluation phase of the method of the present invention performs the following steps:

[0051] Step b1, server Parse local key Obtain the initial node state Control bits Layer-by-layer correction of characters and low-order lookup table; simultaneously input data Decomposed into high-order prefix and the last 8 suffixes and initialize the output accumulation value. It is 0.

[0052] Step b2, server Processing starts from the highest bit. The former The system calculates the number of bits and determines whether to perform a right-branch evaluation or a left-branch evaluation based on the current input bits. forward Each bit is processed using steps b21-b22. Let's assume the seed correction word for the current layer i is obtained through parsing. Left and right control bit correction words and load correction word .

[0053] Step b21, corresponding to lines 4 to 7 of Algorithm 2, server right Get the corresponding number Layer correction word. When At that time, the server Call only the right extension function Get the state of the right child node. Control bits and payload mask .server Based on the control bits of the upper layer Calculate the corrected load mask And sum the results to In the middle, when At that time, load correction word When added to the payload mask, At this time, the payload correction word should not be used, but the server will still use the original payload mask. Accumulate to local output. Then, the server updates the current output. Layer node status and control bits .in This represents the XOR operation.

[0054] Step b22, corresponding to lines 9 and 10 of Algorithm 2, when At that time, the server Call only the left expansion function Get the state of the left child node. and control bits and update the number Layer node status and control bits This branch does not generate a payload mask, therefore payload accumulation is not required.

[0055] server The one-sided expansion is performed iteratively until the high-order prefix is ​​processed. Compared with traditional DCF, the key evaluation method of this invention performs branch expansion only once per layer, thus reducing online PRG calls and state resolution.

[0056] Step b3, corresponding to lines 13-14 of Algorithm 2, involves the server performing the high-order prefix evaluation after the process is complete. Use the state of the termination layer node and low-position suffix Generate leaf group elements And when the control bit is 1, for element Add lookup table correction item .

[0057] Step b4, corresponding to line 15 of Algorithm 2, updates the accumulated value to obtain the server's value. The arithmetic share, and the final accumulated value is updated to .

[0058] The user then performs an addition operation on the arithmetic share values ​​returned by the two servers. Adding the two together, if The result is obtained. Otherwise, you get 0.

[0059] In this embodiment of the invention, the key generation algorithm of the present invention is deployed in the computer system of the key generator. The executable program on the server and Deploying the key evaluation algorithm of this invention in computer systems The program to execute. Input Length Low-position early stop width addition group Taken integer ring ,parameter A value of 128 is acceptable. The key generator obtains the input threshold. and arithmetic load ,Will It is decomposed into a 56-bit high-order prefix and an 8-bit low-order suffix. The key generator generates a layer-by-layer correction word for the first 56 bits and a low-order lookup table of size 256 for the last 8 bits. During the online phase, the server processes each input... Only perform evaluation on a 56-level single-sided tree, and then utilize The last 8 bits of the index lookup table are terminated and corrected. After adding the shares output by the two servers, if... Then we get Otherwise, you get 0.

[0060] like Figure 3 As shown, in an embodiment of the present invention, in a two-server semi-honest secure computing system, the server and Each holding secret value Sharing the secrets of arithmetic and And satisfy , This is a positive integer, typically 64. The arithmetic secret is shared by the data owner or a secure preprocessing protocol. To compute the ReLU function using the method of this invention, the secure computing system will conditionally... This is converted to a strict greater-than comparison on the common mask input. The following explanation uses bounded integer computation without modulo wrapping as an example.

[0061] During the offline phase, the key generator first samples a random mask. And split it into two shares and ,satisfy The key generator will share the mask. Send to server Because the online phase sets the exposed mask input to... Under the condition that the addition does not cause the module to wrap around, Equivalent to Therefore, the key generator sets the hidden comparison threshold for GTDCF. and arithmetic load and call the key generation algorithm Generation server key The key generator will use the function key. Send to server Function key Used to hide comparison threshold It then generates a comparison result share and compares it with the input secret share. They are independent of each other.

[0062] During the online phase, the server First, use the local input share. and mask share calculate Two servers are public. and And reconstruct the common mask input. Subsequently, the server and Using their respective GTDCF function keys, and the same public mask input... Perform local assessment The arithmetic output share obtained by the two servers and satisfy:

[0063] ;

[0064] because ,and Equivalent to ,therefore ,in, Indicates the indicator function: when Take 1 if the result is true, otherwise take 0. Let the arithmetic secret of the comparison result be shared as... Each individual server holds only one arithmetic share of the comparison result and cannot know it independently. Whether it is valid or not.

[0065] Finally, two servers Invoking the safe multiplication protocol ,by Sharing the secrets of arithmetic Sharing the arithmetic secrets of comparison results As input, calculate Assume the output of the safe multiplication protocol ,server Holding output shares And satisfy If the ReLU result needs to be used in subsequent security calculations, then each server retains [the result]. and There is no need to publicly disclose the ReLU refactoring results. When it is necessary to disclose the ReLU function results, the server... and server The output fraction is sent to the result user, who then reconstructs the ReLU function result. In this embodiment, the output of the ReLU function is: when Time output Otherwise, output 0.

[0066] When the system adopts a model Integer ring and calculation Modulus wrap-around may occur. In this case, a carry or interval correction step needs to be added during the input mask conversion stage to ensure that the comparison result of the method of the present invention after conversion still matches the conditions. equivalence.

[0067] The method of this invention not only directly integrates the triggering condition of the greater than comparison into the key generation stage, avoiding the extra operations brought by the traditional DCF to implement the greater than operation; at the same time, it adopts a one-sided GGM tree evaluation method in the key evaluation stage, so that the server only expands one child node corresponding to the current input bit at each layer, thereby reducing the online pseudo-random expansion overhead and local computation, and greatly improving the online evaluation efficiency.

[0068] Except for the technical features described in the specification, all other technologies are known to those skilled in the art. Descriptions of well-known components and technologies are omitted in this invention to avoid redundancy and unnecessary limitation. The embodiments described above do not represent all embodiments consistent with this application. Various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this invention are still within the protection scope of this invention.

[0069] In general, the various exemplary embodiments of this disclosure can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software executed by a controller, microprocessor, or other computing device. When aspects of embodiments of this disclosure are illustrated or described as block diagrams, flowcharts, or using some other graphical representation, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

Claims

1. A function secret sharing method oriented towards greater than comparison operations, applied in a secure computing system including a key generator, a result user, and a non-colluding server. and Its characteristics are, The method includes: Step 1, the key generator determines the key based on the comparison threshold. Arithmetic load And security parameters, generate server Key held ,in ; Deploy the key generation algorithm on the key generator's computer system. The execution program, and the algorithm is pre-set. Low-order suffix number Left expansion function Right expansion function and termination mapping function , A mask that only expands the left child node but does not generate a payload. Only the right child node is expanded, and a mask for the payload is generated; the key generator executes the algorithm. Based on the input threshold, arithmetic load, security parameters, and addition group Output server Key held ; The algorithm Will Decomposed into A bit string, the first bit string Bit by bit, apply the correction word layer by layer, using the left spread function at each layer. Expand the left child node using the right expansion function. Expand the right child node and generate a mask for the payload; the last bit of the bit string Bits, using the termination mapping function and the The layer's node state generates leaf masks and lookup tables. Ultimately, the server Initial node state, initial control bits, and previous Layer calibration information and lookup table The key is combined to form the server's key. ; The key generator will give the key Send to server ; Step 2, the two servers process the input data. The online evaluation is performed in parallel, and each entity outputs its respective arithmetic share to the result user. On the server Deploying key evaluation algorithms in computer systems The execution program; when the server Obtain input data At that time, the algorithm is executed. Output its own arithmetic share; server Parse local key Obtain the initial node state, initial control bits, and previous... Layer calibration information and lookup table The algorithm Input data Decomposed into Bit string, for The former For each bit, perform a one-sided expansion based on the bit value. If the value is 1, expand the right child node; otherwise, expand the left child node. Update the node state and control bits at each level. When expanding the right child node, update the accumulated value using the corrected payload mask. The end suffix By terminating the mapping function Obtain the elements of the leaf group, based on the first... The layer's control bits and lookup table are used to correct the leaf group elements, and the corrected leaf group elements are used to update the accumulated value to obtain the server. Arithmetic share; Step 3, the user will use the arithmetic shares of the two servers in the addition group. Add them together to get the input data. With threshold The comparison results, if The result is Otherwise, the result is 0.

2. The method according to claim 1, characterized in that, In step 1, the key generation algorithm executed by the key generator is... include: Step 11, set the threshold Decomposed into bit string, The bit string is divided into high-order prefix. And finally suffix of position Two servers are randomly generated. Initial node state and set up the server Initial control bits Configure the server Initial control bits Then the key generator provides each server with a key. in front Each layer executes step 12; where ; Step 12, execute steps 121-125, for the current... Apply correction words to the layer; Step 121, using the left expansion function Calculate the state of the left node in the current layer based on the state of the nodes in the previous layer. and candidate control bits Using the right expansion function Calculate the state of the right node in the current layer based on the state of the nodes in the previous layer. Candidate control bits and payload mask ; Step 122, according to Determine the branch that preserves the equal prefix. and deviation branches ;like Set this layer Branches are Branches, Branches are Branch; if Set this layer Branches are Branches, Branches are Branches; Step 123, calculate the seed correction word for the current layer. and left and right control bit correction words ; Step 124: Set intermediate parameters based on the trigger condition of greater than comparison. ,when hour, Pick ,when hour, Set to 0; calculate the load correction word. ; Step 125, set the current layer , , and Combined into correction information and along the branch Update server node status and control bits ; Step 13, if Proceed to step 14, otherwise Increment by 1, then continue with step 12; Step 14, for the suffix index Calculate the leaf mask and lookup table correction items , ;in, , ,like intermediate parameters for ,otherwise =0; For server The Layer node status; Step 15, set the server of , , and lookup table Combined into server key .

3. The method according to claim 1, characterized in that, In step 2, the server Key evaluation algorithm executed Includes the following steps: Step 21, parse the local key Obtain the initial node state Initial control bits ,forward Layer calibration information and lookup table Input data Decomposed into Bits and last suffix Cumulative value Initialize to 0; Step 22, evaluate starting from the highest value. The former Bit, based on the current input bit Decide whether to perform the right-branch evaluation in step A or the left-branch evaluation in step B; parse and obtain the correction information for each layer, assuming the current layer is obtained. Seed correction word of layer Left and right control bit correction words and load correction word ; ; Step A, if the current input bit Call the right expansion function Get the state of the right child node Control bits and payload mask ; Then based on the control bits of the previous layer Correct the item join in Using the corrected payload mask Will Accumulated to , Number the server; then update the current number. Layer node status for Update the current number Layer control bits for ; This represents the XOR operation; Step B, if the current input bit Call the left expansion function Get the state of the left child node and control bits Then update the current number. Layer node status for Update control bits for ; Step 23, in the process of... The former After the bit evaluation is completed, the 1st bit is obtained. Layer node status and control bits Using the termination mapping function right and Mapping to obtain leaf group elements ,like Then the lookup table correction item will be... join in ; Step 24, finally using the corrected leaf group elements Will Accumulated to Output the final accumulated value. server The arithmetic share.

4. The method according to claim 1, characterized in that, The method includes: During the offline phase, the key generator first samples a random mask. and will Split into and ,satisfy ,in It is a positive integer; the key generator will use the mask share. Send to server , The key generator sets a threshold. Arithmetic load The key generator generates the server through step 1. Key held And send to the server ; During the online phase, it is necessary to determine the input secret value. If the value is greater than 0, the ReLU function outputs: Otherwise, output 0; server and Hold separately Sharing the secrets of arithmetic and And satisfy ;server use and Calculate the local share Two servers publicly share local resources, and the public mask input is obtained through reconstruction. ;server use right Execute key evaluation algorithm Output the comparison result share The shares of the two comparison results satisfy , As an indicator value, when The value is 1 if the condition is met, and 0 otherwise. Finally, the server Invoking the Secure Multiplication Protocol Sharing the secrets of arithmetic Sharing the arithmetic secrets of comparison results As input, the output of the secure multiplication protocol is calculated. ;server Output Send the results to the user, who will then reconstruct the data. The final comparison result for whether it is greater than 0, and the output value of the ReLU function.