Boolean function calculation method and device based on fully homomorphic encryption and electronic equipment

By constructing a multi-layered cascaded CMUX circuit and target transformation format, the Boolean function calculation process is optimized, solving the efficiency and scalability issues of fully homomorphic encryption in logical calculations, and achieving efficient and secure ciphertext calculation.

CN121508792APending Publication Date: 2026-02-10BEIHANG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511778370.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing fully homomorphic encryption technology suffers from low efficiency, poor scalability, and limited computational accuracy in Boolean function computation, resulting in an order-of-magnitude gap in logical computation efficiency, which has become a bottleneck restricting the practical deployment of the solution.

Method used

By constructing a multi-layered cascaded ciphertext multiplexer (CMUX) circuit, combined with the target conversion format and logic rules, truth table data is dynamically selected, and coefficient extraction and blind rotation operations are performed to optimize the Boolean function calculation process.

Benefits of technology

It significantly improves the resource utilization and parallel processing capabilities of fully homomorphic encryption in ciphertext computation, ensures the computational accuracy and security of encrypted data, and adapts to changes in computational scale in different business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121508792A_ABST
    Figure CN121508792A_ABST
Patent Text Reader

Abstract

The invention relates to a Boolean function calculation method and device based on fully homomorphic encryption and electronic equipment, and the method comprises the steps: carrying out the format conversion of each received first type of ciphertext based on a target conversion format, and obtaining at least one second type of ciphertext; constructing a multi-layer cascaded CMUX circuit, and based on a preset logic rule, controlling the multi-layer cascaded CMUX circuit to dynamically select pre-encrypted truth table data by taking the second type ciphertext as a control signal to obtain at least one third type ciphertext; and extracting the third type ciphertext coefficient to obtain at least one fourth type ciphertext, and performing blind rotation operation reconstruction on the fourth type ciphertext to obtain at least one encrypted data. Therefore, the problems of low function calculation efficiency, poor expandability and limited calculation precision in the prior art are solved, the resource utilization rate and the parallel processing capability of fully homomorphic encryption in ciphertext calculation are remarkably improved, and meanwhile, the calculation precision and the safety of encrypted data are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to a Boolean function calculation method, apparatus and electronic device based on fully homomorphic encryption. Background Technology

[0002] Data, as a new type of resource, should leverage market-oriented reforms to fully unleash its productivity, while simultaneously promoting data openness and sharing and strengthening data security protection. With the deep integration of technologies such as artificial intelligence, big data analytics, and the Internet of Things into the digital economy, data has become a core resource driving innovation. Its confidentiality, integrity, and availability are directly related to national security, social order, and citizens' rights. Therefore, strengthening data privacy protection is not only an urgent requirement for the implementation of the Digital China strategy, but also a fundamental support and key guarantee for promoting the high-quality development of the digital economy.

[0003] The threats to data security are becoming increasingly complex. At the individual level, cross-platform data transmission increases the risk of privacy breaches; at the enterprise level, lagging technological protections make critical data vulnerable to ransomware and distributed denial-of-service (DDoS) attacks; and at the international level, cross-border data flows raise compliance and security risks. These challenges urgently require support from new technologies such as cryptography-based privacy computing, promoting multi-dimensional collaboration among technology, law, and regulation to improve the privacy protection system.

[0004] Secure computing technologies, including Secure Multi-Party Computation (MPC) and Fully Homomorphic Encryption (FHE), can ensure data confidentiality without a trusted third party and possess provable security. Despite their strong protection capabilities, their usability is limited, primarily due to high computational and communication overhead. For example, MPC-based neural network inference requires over 2GB of communication resources, while FHE, although with lower communication overhead, is still thousands of times slower than plaintext computation. Therefore, MPC is more suitable for low-latency, high-bandwidth scenarios, while FHE is better suited for communication-constrained remote computing environments, such as cloud-edge collaboration and space-air-ground networks.

[0005] The relevant technologies are mainly divided into two categories: word-level computation and bit-level computation. Word-level computation includes algorithms such as BFV and CKKS, while bit-level computation includes algorithms such as FHEW and TFHE. The former excels in efficient parallel arithmetic processing, while the latter supports fast evaluation of Boolean functions and is suitable for applications with high logical precision requirements, such as encrypted processors, privacy databases, and encryption.

[0006] However, bit-based computation schemes face challenges in practical deployment. Compared to word-level computation schemes, the efficiency of logical computation is orders of magnitude lower. For example, the theoretical logical complexity of a 16-bit homomorphic multiply-accumulate message authentication code (MAC) operation is about 16 times that of a two-input AND gate. However, in homomorphic implementations, the evaluation speed of homomorphic multiply-accumulate is 22,000 times faster than that of a homomorphic AND gate. This huge performance gap reveals a systemic performance imbalance in current homomorphic encryption systems when processing logic circuits, becoming a bottleneck restricting the practical deployment of related schemes. Summary of the Invention

[0007] This application provides a Boolean function calculation method, apparatus, and electronic device based on fully homomorphic encryption to solve the problems of low function calculation efficiency, poor scalability, and limited calculation accuracy in related technologies. It significantly improves the resource utilization and parallel processing capability of fully homomorphic encryption in ciphertext calculation, while ensuring the calculation accuracy and security of encrypted data.

[0008] The first aspect of this application provides a method for calculating Boolean functions based on fully homomorphic encryption, comprising the following steps: Receive at least one first-type ciphertext, and based on the target conversion format, convert each first-type ciphertext to obtain at least one second-type ciphertext. Construct a multi-layered cascaded ciphertext multiplexer (CMUX) circuit, and based on preset logic rules, use at least one second-type ciphertext as a control signal to control the multi-layered cascaded CMUX circuit to dynamically select at least one third-type ciphertext from the pre-encrypted truth table data. At least one third-type ciphertext is obtained by extracting coefficients from at least one fourth-type ciphertext, and at least one fourth-type ciphertext is reconstructed by performing a blind rotation operation to obtain at least one encrypted data.

[0009] Optionally, in some embodiments, based on the target conversion format, each first type of ciphertext is converted to obtain at least one second type of ciphertext, including: Based on a preset scheme, the key is switched, and each first type of ciphertext is processed to obtain at least one intermediate ciphertext. Based on the target transformation formula, at least one second-type ciphertext is obtained from at least one first-type ciphertext and at least one intermediate ciphertext.

[0010] Optionally, in some embodiments, the target conversion format is: ; in, For plaintext The ciphertext obtained by RGSW encryption; sk is the encryption key; Q is the modulus of the ring containing the ciphertext; m is the encrypted plaintext message; For plaintext After performing basis decomposition, each of the resulting RLWE ciphertext sequences is encrypted. Let be the Rlev encryption result for the product sk×m; N is the dimension of the polynomial ring; Q is the modulus.

[0011] Optionally, in some embodiments, the preset logical rule is: When a multi-layer cascaded CMUX circuit is a single output, if the left and right child nodes of two CMUX nodes located in the same variable layer point to the same direction, the two CMUX nodes are merged into a single node and share the path; if the left and right child nodes of any CMUX node point to the same subsequent subgraph, then any CMUX node is deleted and the corresponding branch of the parent node of any CMUX node is redirected to the child node of any CMUX node.

[0012] Optionally, in some embodiments, the fourth type of ciphertext is: ; in, For plaintext The ciphertext obtained by LWE encryption; The dimension of the ciphertext; The ciphertext modulus; For encryption key; The plaintext message to be encrypted; For LWE ciphertext pairs; for ; For the scalar component of the encryption result; For vector a and key dot product operation; This is the plaintext scaling factor; This is the error term in encryption.

[0013] A second aspect of this application provides a Boolean function calculation device based on fully homomorphic encryption, comprising: a receiving module, configured to receive at least one first-type ciphertext and, based on a target conversion format, convert each first-type ciphertext to obtain at least one second-type ciphertext; a control module, configured to construct a multi-layer cascaded CMUX circuit and, based on preset logic rules, use at least one second-type ciphertext as a control signal to control the multi-layer cascaded CMUX circuit to dynamically select pre-encrypted truth table data to obtain at least one third-type ciphertext; and a reconstruction module, configured to extract coefficients from at least one third-type ciphertext to obtain at least one fourth-type ciphertext and perform a blind rotation operation on at least one fourth-type ciphertext to reconstruct at least one encrypted data.

[0014] Optionally, in some embodiments, the receiving module is specifically configured to: switch keys based on a preset scheme, process each first type of ciphertext to obtain at least one intermediate ciphertext; and obtain at least one second type of ciphertext based on a target conversion scheme, according to at least one first type of ciphertext and at least one intermediate ciphertext.

[0015] Optionally, in some embodiments, the target conversion format is: ; in, For plaintext The ciphertext obtained by RGSW encryption; sk is the encryption key; Q is the modulus of the ring containing the ciphertext; m is the encrypted plaintext message; For plaintext After performing basis decomposition, each of the resulting RLWE ciphertext sequences is encrypted. Let be the Rlev encryption result for the product sk×m; N is the dimension of the polynomial ring; Q is the modulus.

[0016] Optionally, in some embodiments, the control module is specifically used for: when the multi-layer cascaded CMUX circuit is a single output, if the left and right child nodes of two CMUX nodes located in the same variable layer point to the same direction, then the two CMUX nodes are merged into a single node and share the path; if the left and right child nodes of any CMUX node point to the same subsequent subgraph, then any CMUX node is deleted and the corresponding branch of the parent node of any CMUX node is redirected to the child node of any CMUX node.

[0017] Optionally, in some embodiments, the fourth type of ciphertext is: ; in, For plaintext The ciphertext obtained by LWE encryption; The dimension of the ciphertext; The ciphertext modulus; For encryption key; The plaintext message to be encrypted; For LWE ciphertext pairs; for ; For the scalar component of the encryption result; For vector a and key dot product operation; This is the plaintext scaling factor; This is the error term in encryption.

[0018] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the Boolean function calculation method based on fully homomorphic encryption as described in the above embodiments.

[0019] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the Boolean function calculation method based on fully homomorphic encryption as described in the above embodiments.

[0020] A fifth aspect of this application provides a computer program product, including a computer program that is executed by a processor to implement the Boolean function calculation method based on fully homomorphic encryption as described in the above embodiments.

[0021] This application has at least the following beneficial effects: (1) Highly efficient multi-level logic processing capability: Through the CMUX tree structure and hierarchical dense state computation framework, the evaluation process of complex Boolean functions is decomposed into efficient low-level homomorphic operations, which greatly improves the parallel processing efficiency and avoids the computational bottleneck of traditional layer-by-layer encryption, making it suitable for high-throughput privacy computing scenarios. At the same time, TFHE ciphertext is based on the LWE hard problem, which can effectively guarantee the security of the ciphertext.

[0022] (2) Flexible and scalable logical scale adaptation: Based on the dynamically optimized binary decision tree (BDD) compression technology and multi-path result reuse mechanism, it supports low-latency response of small-scale Boolean functions and meets the high-efficiency dense state processing requirements of large-scale complex logical networks, adapts to the dynamic changes in computing scale under different business scenarios, and effectively controls resource consumption.

[0023] (3) Systematic balance between security and computational accuracy: The embodiments of this application support general and efficient computation of multi-input, multi-output Boolean functions. RLev format ciphertext is used as the data input for Boolean function computation, RLWE format ciphertext is used as the encrypted representation of the function lookup table, and the output ciphertext is also kept in RLev format to enable continuous deployment and linkage computation in encrypted circuits. At the same time, a noise refresh mechanism using multi-value encoding is used to refresh the ciphertext noise, suppressing the noise accumulation effect of ciphertext operations, ensuring the long-term computational stability of complex Boolean functions, ensuring that the scheme can be deployed in logic circuits of arbitrary computational depth, easily deployed in large-scale homomorphic encryption circuits, and can be connected to the underlying hardware acceleration, thereby achieving efficient homomorphic evaluation of general Boolean functions while ensuring ciphertext security.

[0024] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0025] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a Boolean function calculation method based on fully homomorphic encryption according to an embodiment of this application. Figure 2 This is a flowchart illustrating a Boolean function calculation method based on fully homomorphic encryption according to an embodiment of this application; Figure 3 This is a block diagram of a Boolean function calculation device based on fully homomorphic encryption according to an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0026] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0027] The following description, with reference to the accompanying drawings, describes a Boolean function calculation method, apparatus, and electronic device based on fully homomorphic encryption according to embodiments of this application. Addressing the problems of low function calculation efficiency, poor scalability, and limited calculation accuracy in related technologies mentioned in the background, this application provides a Boolean function calculation method based on fully homomorphic encryption. In this method, based on a target conversion format, each received first-type ciphertext is converted to obtain at least one second-type ciphertext; a multi-layered cascaded CMUX circuit is constructed, and based on preset logic rules, the second-type ciphertext is used as a control signal to dynamically select pre-encrypted truth table data to obtain at least one third-type ciphertext; the coefficients of the third-type ciphertext are extracted to obtain at least one fourth-type ciphertext, and a blind rotation operation is performed on the fourth-type ciphertext to reconstruct at least one encrypted data. Thus, the problems of low calculation efficiency, poor scalability, and limited calculation accuracy of Boolean functions based on fully homomorphic encryption are solved.

[0028] Specifically, Figure 1 This is a flowchart illustrating a Boolean function calculation method based on fully homomorphic encryption, provided in an embodiment of this application.

[0029] like Figure 1As shown, the Boolean function calculation method based on fully homomorphic encryption includes the following steps: In step S101, at least one first type of ciphertext is received, and each first type of ciphertext is converted into at least one second type of ciphertext based on the target conversion format.

[0030] Among them, the first type of ciphertext refers to RLev ciphertext; the target conversion format refers to the format that conforms to the structure and parameter standard of RGSW ciphertext; the format conversion refers to the cryptographic process of converting RLev ciphertext into RGSW ciphertext format; and the second type of ciphertext refers to RGSW ciphertext.

[0031] Specifically, embodiments of this application can receive at least one input first-type ciphertext, and convert each first-type ciphertext into a second-type ciphertext conforming to the RGSW ciphertext structure and parameter standard through scheme switching. The first-type ciphertext is: ; in, This refers to plaintext Perform base After decomposition, each ciphertext sequence obtained is encrypted into a set of RLWE ciphertext sequences; N refers to the ciphertext ring dimension; Q is the ciphertext modulus; Bg refers to the decomposition basis number; d refers to the decomposition depth, satisfying Q≈ ; This refers to the encryption key; It refers to the written text. Perform base The ciphertext obtained by encrypting the decomposed components using RLWE encryption; This refers to the decomposition factor based on the base decomposition ratio; is the j-th power of the base Bg, representing the decomposition weight of the j-th layer; j is the current decomposition layer index; m is the plaintext to be decomposed. This means that index j belongs to the hierarchical set {0, 1, 2, ..., d-1}.

[0032] It should be understood that Rlev ciphertext is a set of RLWE ciphertext tuples used to encrypt a decomposed message. Its characteristics are determined by the decomposition base. and decomposition length Provided.

[0033] Furthermore, the second type of ciphertext is: ; in, This refers to plaintext The ciphertext obtained by RGSW encryption; N refers to the dimension of the ciphertext ring; Q refers to the modulus of the ring containing the ciphertext; Bg refers to the basis number of the decomposition; d refers to the decomposition depth, satisfying Q≈ ;m refers to the encrypted plaintext message; This refers to RGSW ciphertext pairs; This refers to a randomly generated ring vector; H refers to the ring vector corresponding to the encryption result; H refers to the decomposition matrix.

[0034] It should be understood that the RGSW ciphertext contains the encryption key. Encrypt a message ;in H is used to decompose plaintext m according to the basis Bg. It is a decomposition matrix. Represents the identity matrix; an RGSW ciphertext can be viewed as... RLWE ciphertext.

[0035] Optionally, in some embodiments, each first type of ciphertext is converted to at least one second type of ciphertext based on the target conversion format, including: processing each first type of ciphertext to obtain at least one intermediate ciphertext based on a preset scheme switching key; and obtaining at least one second type of ciphertext based on the target conversion format and at least one first type of ciphertext and at least one intermediate ciphertext.

[0036] The switching key is a special key used to convert the first type of ciphertext into the second type of ciphertext; the intermediate ciphertext refers to the transitional ciphertext generated after the first type of ciphertext is processed by the switching key.

[0037] Specifically, in this embodiment, several first-type ciphertexts may be received firstly, where each first-type ciphertext represents the input bits of a Boolean function. Then, based on the ciphertext encoding structure in the encryption protocol, i.e., a preset scheme switching key, each input first-type ciphertext is converted into an intermediate ciphertext while maintaining the security of the first-type ciphertexts.

[0038] The preset scheme switching key is: ; in, This refers to switching keys; This refers to obtaining the switching key by performing Rlev encryption on the square of the key sk; N refers to the dimension of the polynomial ring; Q refers to the modulus of the encryption ring; sk refers to the private key parameter corresponding to the target RGSW encryption format; It refers to the square of the private key.

[0039] In addition, utilizing Able to calculate Furthermore, it is possible to construct the target conversion format, thereby obtaining two types of ciphertext. The intermediate ciphertext can be used as control selection bits of the CMUX tree to adapt to subsequent CMUX operations.

[0040] The target conversion format is as follows: ; in, For plaintext The ciphertext obtained by RGSW encryption; sk is the encryption key; Q is the modulus of the ring containing the ciphertext; m is the encrypted plaintext message; For plaintext After performing basis decomposition, each of the resulting RLWE ciphertext sequences is encrypted. Let be the Rlev encryption result for the product sk×m; N is the dimension of the polynomial ring; Q is the modulus.

[0041] In step S102, a multi-layer cascaded CMUX circuit is constructed, and based on preset logic rules, at least one second-type ciphertext is used as a control signal to control the multi-layer cascaded CMUX circuit to dynamically select the pre-encrypted truth table data to obtain at least one third-type ciphertext.

[0042] Among them, a multi-layer cascaded CMUX circuit refers to a circuit composed of multiple basic CMUX units cascaded in a hierarchical structure; the preset logic rules are the logical mapping relationships used to guide the CMUX circuit in selecting ciphertext; the control signals are the logic information in the second type of ciphertext form used to drive the CMUX circuit to select; the pre-encrypted truth table data refers to the ciphertext set of the logic function truth table after encryption; dynamic selection refers to the process by which the CMUX circuit selects and transmits the corresponding ciphertext data in real time according to the control signals; and the third type of ciphertext refers to RLWE ciphertext.

[0043] Specifically, after input conversion, this embodiment constructs a multiplexing tree based on CMUX operations to evaluate lookup table logic. Multi-layered cascaded CMUX circuits dynamically select from pre-encrypted truth table data, where each data channel corresponds to a truth table entry value encrypted with third-type ciphertext. For a lookup table with L outputs, since third-type ciphertext allows simultaneous encryption of multiple values, multiple functions can be computed through a single CMUX tree evaluation by packaging corresponding values ​​from different truth tables into the same third-type ciphertext. Multi-Terminal Binary Decision Diagram (MTBDD) allows multiple Boolean functions to be expressed simultaneously on a shared decision graph, where terminal nodes are no longer bit sequences but integers containing multiple bit values. Based on this structure and the packaging characteristics of third-type ciphertext, a multi-terminal CMUX tree can be constructed. Specifically, firstly, multiple Boolean functions with partially overlapping inputs are unified onto a larger input set, and the corresponding truth tables are reconstructed based on this new input set. Subsequently, the outputs from these truth tables are packaged and encoded as integer values, serving as terminal nodes of the CMUX tree. In this way, overlapping structural parts between different output functions can be shared, thereby significantly reducing the overall graph structure size. Subsequently, this embodiment applies dynamic variable rearrangement to the newly constructed multi-terminal CMUX tree to eliminate redundant paths and duplicate nodes caused by structural symmetry.

[0044] The third type of ciphertext is: ; in, This refers to plaintext polynomials The ciphertext obtained by performing RLWE encryption; N refers to the dimension of the polynomial ring; Q refers to the modulus of the ciphertext ring; It refers to the key; It refers to the verbal polynomial; This refers to the RLWE ciphertext pair; This refers to random polynomial components; This refers to the polynomial components corresponding to the encryption result; This refers to the linear constraint relationship between random components and the key; It refers to text scaling; .

[0045] It should be understood that RLWE ciphertext uses an encryption key. Encrypt a polynomial of an encoded message .

[0046] Optionally, in some embodiments, the preset logic rule is as follows: when the multi-layer cascaded CMUX circuit is a single output, if the left and right child nodes of two CMUX nodes located in the same variable layer point to the same direction, then the two CMUX nodes are merged into a single node and share the path; if the left and right child nodes of any CMUX node point to the same subsequent subgraph, then any CMUX node is deleted and the corresponding branch of the parent node of any CMUX node is redirected to the child node of any CMUX node.

[0047] In this context, "single output" means that the CMUX circuit ultimately produces only one third-type ciphertext as the output result; "same variable layer" refers to the layer where all CMUX nodes that use the same second-type ciphertext (control signal) as the selection criterion are located; "left and right child nodes of a CMUX node" refers to the path endpoints selected by a single CMUX node when the control signal is 0 or 1, respectively; "single node" means replacing two merged CMUX nodes with a new CMUX node; "shared path" means that the merged node has the same lower-level path as the original two nodes; "subsequent subgraph" refers to the lower-level circuit structure starting from a child node of a certain CMUX node; "parent node of a CMUX node" refers to the upper-level CMUX node that directly drives the node; "redirection" means changing the branch that the parent node of the CMUX node points to to its child node; and "child node of a CMUX node" refers to the lower-level node to which the output of the current CMUX node is connected after selection according to the control signal.

[0048] It should be understood that for a homomorphic lookup table with one input, its CMUX tree contains one CMUX node. Although the computational cost of a single CMUX operation is relatively small, its computational complexity increases exponentially with the input size, especially when the computational cost is large, the evaluation latency rises rapidly. To alleviate the exponential computational latency caused by large input sizes, it is necessary to compress the CMUX tree structure. Since the CMUX tree is highly similar in structure to a binary decision graph, there is a lot of structural redundancy in the CMUX tree, such as repeated subtrees and "unimportant" nodes that do not affect the computation result. Therefore, by reducing the CMUX tree, the number of nodes can be effectively reduced without changing the semantics of the Boolean function, thereby reducing the number of CMUX computations.

[0049] Specifically, the embodiments of this application may adopt two simplified rules in the binary decision graph: (a) if two different nodes are in the same variable layer and their left and right child nodes point to the same direction, then the two are considered as redundant structures, and only one node is retained and the path is merged; (b) if the left and right child nodes of a certain node point to the same subsequent subgraph, then the node is directly deleted and its parent node's corresponding branch is redirected to the child node.

[0050] Optionally, in some embodiments, the fourth type of ciphertext is: ; in, For plaintext The ciphertext obtained by LWE encryption; The dimension of the ciphertext; The ciphertext modulus; For encryption key; The plaintext message to be encrypted; For LWE ciphertext pairs; for ; For the scalar component of the encryption result; For vector a and key dot product operation; This is the plaintext scaling factor; This is the error term in encryption.

[0051] It should be understood that LWE ciphertext uses an encryption key. Encrypt a single message ,in, It is a random binary vector that follows a uniform distribution; It is a uniform random vector. The standard deviation is expressed as Error distribution The noise term obtained by sampling is usually randomly sampled from a discrete Gaussian distribution or a uniform distribution; It is a scaling factor used to separate encoded messages from noise.

[0052] In step S103, coefficients are extracted from at least one third-type ciphertext to obtain at least one fourth-type ciphertext, and a blind rotation operation is performed on at least one fourth-type ciphertext to reconstruct at least one encrypted data.

[0053] Among them, the fourth type of ciphertext refers to Ciphertext; blind rotation operation refers to a rotation transformation with a randomization factor within the ciphertext field; encrypted data refers to the final encrypted result corresponding to the original plaintext after reconstruction by this operation.

[0054] It should be understood that after the combinational logic evaluation (i.e., step S102) is completed, the output third type ciphertext has high noise and needs to be re-encoded to make the input and output formats consistent.

[0055] Specifically, in the noise refresh step, this embodiment of the application can first extract coefficients from the output third-type ciphertext and convert it into an equivalent fourth-type ciphertext. Then, a blind rotation operation is used to decompose the fourth-type ciphertext while simultaneously refreshing the noise, ultimately obtaining the RLev format calculation result, i.e., the new RLev ciphertext, which is the encrypted data. This completes the evaluation process and controls the growth of ciphertext noise. Furthermore, for Boolean functions with multiple outputs, this embodiment of the application can employ a multi-valued blind rotation mechanism to optimize the noise refresh process. The mathematical expression of this multi-valued blind rotation mechanism is as follows:

[0056]

[0057] in, This refers to the overall expression for multivalued blind rotation operations; It refers to the polynomial function to be rotated, whose encoding represents the lookup table function of basis decomposition; This refers to polynomial ring variables; It refers to the m-th element on the polynomial ring; This refers to the ciphertext obtained by LWE encryption of plaintext m; m refers to the encrypted plaintext message, representing the input index value of the calculated function; This refers to the result of performing a polynomial rotation on the polynomial V(x) with phase m through a multivalued blind rotation; It means The polynomial expansion term; ring polynomials Power terms; This refers to the offset expression for the polynomial exponent; This refers to the block size of the polynomial partitioning; This refers to the RLWE ciphertext dimension; This refers to the maximum value of the block; 1 refers to the decomposition depth; j refers to the index variable of the current coefficient in the polynomial ring; i refers to the block index variable; k refers to the base decomposition layer index variable. This refers to the k-th power of the factorization base; refers to the polynomial corresponding to the i-th block; t refers to the coefficients corresponding to the decomposed function values. This refers to the polynomial displacement term controlled by plaintext m; This refers to the rotating portion of the ring controlled by plaintext; It refers to the j-th power basis function term on the ring; This refers to the combined expressions corresponding to each output function.

[0058] It should be understood that, Indicates the degree of the modulo polynomial. It is the number of segments in the plaintext vector. For decomposition depth, It is the cardinality of the factorization. These are the ciphertext coefficients of a polynomial factorization. This expression can be divided into two parts: the common rotation factor. This factor is independent of the specific lookup table content and can be used for blind rotation sharing among multiple lookup tables; as well as for factoring the data expression corresponding to a polynomial. For multi-valued outputs, the polynomial decomposition requires enumerating all possible output combinations. The value corresponding to each combination must be encrypted and filled into the polynomial coefficients to form the packaged RLWE decomposition polynomial.

[0059] To facilitate those skilled in the art to further understand the Boolean function calculation method based on fully homomorphic encryption in the embodiments of this application, the following is combined with... Figure 2 The specific implementation methods will be described in detail.

[0060] Figure 2 This is a flowchart illustrating a Boolean function calculation process based on fully homomorphic encryption, provided as an embodiment of this application.

[0061] like Figure 2 As shown, the embodiments of this application include three stages: ciphertext format conversion, combinational logic evaluation, and noise refresh. First, a hierarchical encryption mode using the TFHE homomorphic encryption scheme is adopted to construct a general-purpose encrypted computation architecture supporting multi-input multi-output Boolean functions. Specific technical content is as follows: Boolean function computation based on the TFHE ciphertext hierarchical encryption mode. By mapping any Boolean function to a homomorphic multiplexer (CMUX) tree structure, encoding input variables as encryption selection signals, and dynamically managing encryption parameters, efficient homomorphic evaluation of Boolean functions is supported. This overcomes the accuracy limitations of traditional Boolean function evaluation using programmable bootstrapping, significantly improving the scale of Boolean function evaluation and parallel processing capabilities. Second, structural optimization and scale compression are achieved based on BDD. To address the exponential scaling problem of multiplexers, this paper employs isomorphic subtree merging and dynamic variable reordering strategies to eliminate redundant computational paths and reduce the number of nodes, generating a minimum-area BDD structure to reduce resource overhead. Furthermore, it extends Multi-Terminal BDD (MTBDD) by compressing multiple output truth tables into a single ciphertext through node value domain encoding, supporting parallel evaluation of multivariate Boolean functions and cross-path result reuse, significantly improving computational scalability. Finally, it implements noise refresh for multi-output Boolean functions based on TFHE ciphertext. By encoding key values ​​in the output truth table using sparse polynomial basis encoding and combining this with a multi-dimensional encoding space based on parameter optimization to expand the ciphertext slots, it achieves multi-target value extraction in a single blind rotation operation, and performs noise refresh on multiple output ciphertexts at once. This ensures that the embodiments of this application can be deployed in large-scale logic circuits while maintaining a low decryption error rate.

[0062] Therefore, existing technologies suffer from low computational efficiency, poor scalability, and limited computational accuracy in function computation. This application provides a Boolean function computation method based on fully homomorphic encryption to address the limitations of existing technologies in terms of computational efficiency, scalability, and computational accuracy. By constructing a encrypted computation framework adapted to complex logical operations and optimizing the Boolean function processing flow in the encrypted state, the resource utilization and parallel processing capabilities of fully homomorphic encryption in ciphertext computation are significantly improved. This application supports highly complex multivariate logical operation scenarios, reduces computational latency and hardware resource redundancy, while ensuring the computational accuracy and security of encrypted data. Furthermore, it can be used for Boolean function computation of encrypted data in outsourced computing scenarios, is easily extensible, and supports hardware acceleration.

[0063] According to an embodiment of this application, a Boolean function calculation method based on fully homomorphic encryption can be proposed. Based on a target conversion format, each received first-type ciphertext is converted to obtain at least one second-type ciphertext. A multi-layered cascaded CMUX circuit is constructed, and based on preset logic rules, the second-type ciphertext is used as a control signal to dynamically select pre-encrypted truth table data to obtain at least one third-type ciphertext. The coefficients of the third-type ciphertext are extracted to obtain at least one fourth-type ciphertext, and a blind rotation operation is performed on the fourth-type ciphertext to reconstruct at least one encrypted data. This solves the problems of low Boolean function calculation efficiency, poor scalability, and limited calculation accuracy in fully homomorphic encryption, significantly improving the resource utilization and parallel processing capability of fully homomorphic encryption in ciphertext calculation, while ensuring the calculation accuracy and security of encrypted data.

[0064] Next, referring to the accompanying drawings, an embodiment of this application proposes a Boolean function calculation device based on fully homomorphic encryption.

[0065] Figure 3 This is a block diagram of a Boolean function calculation device based on fully homomorphic encryption according to an embodiment of this application.

[0066] like Figure 3As shown, the Boolean function calculation device 10 based on fully homomorphic encryption includes: a receiving module 100, a control module 200, and a reconstruction module 300. The receiving module 100 receives at least one first-type ciphertext and, based on a target conversion format, performs format conversion on each first-type ciphertext to obtain at least one second-type ciphertext. The control module 200 constructs a multi-layered cascaded CMUX circuit and, based on preset logic rules, uses at least one second-type ciphertext as a control signal to control the multi-layered cascaded CMUX circuit to dynamically select pre-encrypted truth table data to obtain at least one third-type ciphertext. The reconstruction module 300 extracts coefficients from at least one third-type ciphertext to obtain at least one fourth-type ciphertext and performs a blind rotation operation on at least one fourth-type ciphertext to reconstruct at least one encrypted data.

[0067] Optionally, in some embodiments, the receiving module 100 is specifically used to: switch keys based on a preset scheme, process each first type of ciphertext to obtain at least one intermediate ciphertext; and obtain at least one second type of ciphertext based on a target conversion scheme, according to at least one first type of ciphertext and at least one intermediate ciphertext.

[0068] Optionally, in some embodiments, the target conversion format is: ; in, For plaintext The ciphertext obtained by RGSW encryption; sk is the encryption key; Q is the modulus of the ring containing the ciphertext; m is the encrypted plaintext message; For plaintext After performing basis decomposition, each of the resulting RLWE ciphertext sequences is encrypted. Let be the Rlev encryption result for the product sk×m; N is the dimension of the polynomial ring; Q is the modulus.

[0069] Optionally, in some embodiments, the control module 200 is specifically used for: when the multi-layer cascaded CMUX circuit is a single output, if the left and right child nodes of two CMUX nodes located in the same variable layer point to the same path, then the two CMUX nodes are merged into a single node and share the path; if the left and right child nodes of any CMUX node point to the same subsequent subgraph, then any CMUX node is deleted and the corresponding branch of the parent node of any CMUX node is redirected to the child node of any CMUX node.

[0070] Optionally, in some embodiments, the fourth type of ciphertext is: ; in, For plaintext The ciphertext obtained by LWE encryption; The dimension of the ciphertext; The ciphertext modulus; For encryption key; The plaintext message to be encrypted; For LWE ciphertext pairs; for ; For the scalar component of the encryption result; For vector a and key dot product operation; This is the plaintext scaling factor; This is the error term in encryption.

[0071] It should be noted that the foregoing explanation of the embodiment of the Boolean function calculation method based on fully homomorphic encryption also applies to the Boolean function calculation device based on fully homomorphic encryption in this embodiment, and will not be repeated here.

[0072] The Boolean function computation device based on fully homomorphic encryption proposed in this application can convert each received first-type ciphertext into at least one second-type ciphertext based on a target conversion format; construct a multi-layered cascaded CMUX circuit, and based on preset logic rules, use the second-type ciphertext as a control signal to dynamically select pre-encrypted truth table data to obtain at least one third-type ciphertext; extract the coefficients of the third-type ciphertext to obtain at least one fourth-type ciphertext, and reconstruct it by performing a blind rotation operation to obtain at least one encrypted data. This solves the problems of low computational efficiency, poor scalability, and limited computational accuracy of fully homomorphic encryption's Boolean function computation, significantly improving the resource utilization and parallel processing capability of fully homomorphic encryption in ciphertext computation, while ensuring the computational accuracy and security of encrypted data.

[0073] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 401, the processor 402, and the computer program stored on the memory 401 and capable of running on the processor 402.

[0074] When the processor 402 executes the program, it implements the Boolean function calculation method based on fully homomorphic encryption provided in the above embodiments.

[0075] Furthermore, electronic devices also include: Communication interface 403 is used for communication between memory 401 and processor 402.

[0076] The memory 401 is used to store computer programs that can run on the processor 402.

[0077] Memory 401 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0078] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0079] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.

[0080] Processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0081] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described Boolean function calculation method based on fully homomorphic encryption.

[0082] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0083] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0084] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0085] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0086] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0087] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0088] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0089] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A Boolean function calculation method based on fully homomorphic encryption, characterized in that, Includes the following steps: Receive at least one first-type ciphertext, and based on the target conversion format, convert each first-type ciphertext to obtain at least one second-type ciphertext. Construct a multi-layered CMUX circuit, and based on preset logic rules, use the at least one second-type ciphertext as a control signal to control the multi-layered CMUX circuit to dynamically select the pre-encrypted truth table data to obtain at least one third-type ciphertext. The coefficients of the at least one third-type ciphertext are extracted to obtain at least one fourth-type ciphertext, and the at least one fourth-type ciphertext is reconstructed by a blind rotation operation to obtain at least one encrypted data.

2. The method according to claim 1, characterized in that, The process of converting each type of ciphertext into at least one type of ciphertext based on the target conversion format includes: Based on a preset scheme, the key is switched, and each of the first type of ciphertexts is processed to obtain at least one intermediate ciphertext. Based on the target conversion formula, the at least one second type of ciphertext is obtained according to the at least one first type of ciphertext and the at least one intermediate ciphertext.

3. The method according to claim 2, characterized in that, The target conversion format is: ; in, For the plaintext The ciphertext obtained by RGSW encryption; sk is the encryption key; Q is the modulus of the ring containing the ciphertext; m is the encrypted plaintext message; For the plaintext After performing basis decomposition, each of the resulting RLWE ciphertext sequences is encrypted. Let be the Rlev encryption result for the product sk×m; N be the dimension of the polynomial ring; and Q be the modulus.

4. The method according to claim 1, characterized in that, The preset logical rules are as follows: When the multi-layer cascaded CMUX circuit is a single output, if the left and right child nodes of two CMUX nodes located in the same variable layer point to the same direction, the two CMUX nodes are merged into a single node and share the path; if the left and right child nodes of any CMUX node point to the same subsequent subgraph, the CMUX node is deleted and the corresponding branch of the parent node of the CMUX node is redirected to the child node of the CMUX node.

5. The method according to claim 1, characterized in that, The fourth type of ciphertext is: ; in, For the plaintext The ciphertext obtained by LWE encryption; Let be the dimension of the ciphertext; The ciphertext modulus; The encryption key; The plaintext message to be encrypted; For the LWE ciphertext pair; For the ; For the scalar component of the encryption result; For the vector a and the key dot product operation; The plaintext scaling factor; This refers to the error term in the encryption.

6. A Boolean function calculation device based on fully homomorphic encryption, characterized in that, include: The receiving module is used to receive at least one first-type ciphertext and, based on the target conversion format, convert each first-type ciphertext into at least one second-type ciphertext. The control module is used to construct a multi-layer cascaded CMUX circuit and, based on preset logic rules, use the at least one second-type ciphertext as a control signal to control the multi-layer cascaded CMUX circuit to dynamically select pre-encrypted truth table data to obtain at least one third-type ciphertext. The reconstruction module is used to extract coefficients from the at least one third-type ciphertext to obtain at least one fourth-type ciphertext, and to reconstruct the at least one fourth-type ciphertext by performing a blind rotation operation to obtain at least one encrypted data.

7. The apparatus according to claim 6, characterized in that, The receiving module is specifically used for: Based on a preset scheme, the key is switched, and each of the first type of ciphertexts is processed to obtain at least one intermediate ciphertext. Based on the target conversion formula, the at least one second type of ciphertext is obtained according to the at least one first type of ciphertext and the at least one intermediate ciphertext.

8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the Boolean function calculation method based on fully homomorphic encryption as described in any one of claims 1-5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the Boolean function computation method based on fully homomorphic encryption as described in any one of claims 1-5.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the Boolean function calculation method based on fully homomorphic encryption as described in any one of claims 1-5.

Citation Information

Cited By

  • A linear computation-based fully homomorphic encryption ciphertext transmission method and system

    CN122247763A