A homomorphic encryption-based technical secret security storage method
Patent Information
- Application Number
- CN202610741507.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]上述常规技术方案在面临人员权限动态变更的场景时,由于访问策略与同态加密密文处于割裂状态,一旦层级树状结构中某个节点的权限参数发生更新,数据拥有者必须针对受影响的技术秘密数据重新计算并分发全新的属性基加密访问策略密文
[0017]1. This invention divides the plaintext of technical secrets into multiple ciphertext matrix blocks and constructs matching homomorphic Boolean circuits, directly embedding the hierarchical tree-structured access strategy into the logic of homomorphic Boolean operations. When processing access requests, the attribute ciphertext and the ciphertext matrix blocks are synchronously input into the homomorphic Boolean circuit in the ciphertext state to perform AND and OR gate operations. When the permissions of intermediate nodes are not satisfied, interference ciphertext factors are directly introduced to perform homomorphic multiplication and set to zero in subsequent operation branches. This mechanism transforms access control judgment from an independent decryption verification stage into a ciphertext calculation process, eliminating the serial dependency between attribute-based encryption and homomorphic encryption. When the permissions of nodes in the hierarchical tree structure change, permission control can be completed simply by updating the permission parameters of the homomorphic Boolean circuit or replacing the interference ciphertext factors, eliminating the need to recalculate and distribute the underlying technical secret ciphertext matrix blocks and eliminating the delay problem caused by the asynchrony between permission updates and ciphertext data states.
Smart Images

Figure CN122601162A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of homomorphic encryption technology, and discloses a method for securely storing technical secrets based on homomorphic encryption. Background Technology
[0002] In the field of homomorphic encrypted data storage, to achieve multi-level access control for technical secrets, conventional solutions typically employ an architecture that concatenates a ciphertext-policy attribute-based encryption mechanism with a homomorphic encryption mechanism. Before storing the technical secrets homomorphically, the data owner first encrypts the secrets using a ciphertext-policy attribute-based encryption algorithm, attaching an access policy tree. When an access requester requests data, the storage terminal must first perform a decryption verification based on attribute-based encryption on the ciphertext. Only after successful verification is the data handed over to the homomorphic encryption computing environment for processing or decryption. In this concatenated architecture, the access policy and the homomorphically encrypted ciphertext are two independent data layers. When processing an access request, the storage node must completely read and parse the attribute-based encrypted access policy tree to determine whether the requester's attributes match the preset conditions.
[0003] When faced with scenarios involving dynamic changes in user permissions, the aforementioned conventional technical solutions suffer from several drawbacks. Because the access policy and homomorphic encrypted ciphertext are disconnected, once the permission parameters of a node in the hierarchical tree structure are updated, the data owner must recalculate and distribute entirely new attribute-based encrypted access policy ciphertext for the affected technical secret data. This recalculation and distribution mechanism results in the storage end being unable to immediately respond to legitimate access requests during permission changes, leading to a delay in the synchronization between permission updates and the underlying homomorphic encrypted data state. Summary of the Invention
[0004] The purpose of this invention is to provide a secure storage method for technical secrets based on homomorphic encryption, which can solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A method for securely storing technical secrets based on homomorphic encryption, the method comprising: dividing plaintext technical secrets into multiple ciphertext matrix blocks according to a preset confidentiality level, constructing a hierarchical tree structure corresponding to the preset confidentiality level, and generating a homomorphic Boolean circuit matching the hierarchical tree structure; receiving attribute ciphertext sent by an access request terminal, and inputting the attribute ciphertext and the ciphertext matrix block of the technical secret to be accessed into the homomorphic Boolean circuit; the homomorphic Boolean circuit performing AND and OR gate operations in the ciphertext state, comparing the attribute ciphertext with the permission parameters of each node in the hierarchical tree structure layer by layer; when the attribute ciphertext does not meet the permission requirements of a certain intermediate node in the hierarchical tree structure, introducing a preset interference ciphertext factor, and performing homomorphic multiplication to zero the subsequent operation branch connected to the intermediate node in the homomorphic Boolean circuit; and outputting the ciphertext of the result processed by the homomorphic Boolean circuit.
[0007] Preferably, the plaintext of the technical secret is divided into multiple ciphertext matrix blocks according to a preset security level, including: parsing the data structure features of the plaintext of the technical secret; dividing the plaintext of the technical secret into multiple plaintext data segments according to the access boundaries defined in the preset security level; performing homomorphic encryption encoding on each of the multiple plaintext data segments to generate the multiple ciphertext matrix blocks; and generating a hierarchical tree structure corresponding to the preset security level, including: establishing a one-to-one mapping relationship between the multiple ciphertext matrix blocks and the leaf nodes, with the root node as the highest security level and the leaf nodes as the lowest security level, and filling the hierarchical tree structure with the key parameters of the plaintext data segments as node attributes.
[0008] Preferably, generating the homomorphic Boolean circuit matching the hierarchical tree structure includes: extracting path vectors from the root node to each leaf node in the hierarchical tree structure; for each path vector, converting the node attributes in the path vector into corresponding homomorphic AND gate logic and homomorphic OR gate logic; connecting the homomorphic AND gate logic and homomorphic OR gate logic on the same branch path in series, and connecting the homomorphic AND gate logic and homomorphic OR gate logic on different branch paths in parallel to form a homomorphic Boolean circuit with the topological characteristics of the hierarchical tree structure.
[0009] Preferably, the homomorphic Boolean circuit performs AND and OR gate operations in the ciphertext state, comparing the attribute ciphertext with the permission parameters of each node in the hierarchical tree structure layer by layer, including: inputting the attribute ciphertext into the root node of the homomorphic Boolean circuit, calculating the first homomorphic intersection of the attribute ciphertext and the permission parameter ciphertext of the root node using a homomorphic AND gate operation at the root node; using the first homomorphic intersection as the input of the next intermediate node, calculating the second homomorphic intersection of the first homomorphic intersection and the permission parameter ciphertext of the intermediate node using a homomorphic OR gate operation at the intermediate node, until the target leaf node is reached.
[0010] Preferably, a preset interference ciphertext factor is introduced, and a homomorphic multiplication zeroing operation is performed on the subsequent operation branches connected to the intermediate node in the homomorphic Boolean circuit. This includes: at the intermediate node, obtaining the ciphertext state value output by the homomorphic OR gate operation; when the ciphertext state value indicates that the attribute ciphertext does not meet the permission requirements of the intermediate node, calling the interference ciphertext factor stored in the local ciphertext pool, wherein the interference ciphertext factor is a zero ciphertext generated by homomorphically encrypting the number zero; using the interference ciphertext factor as a multiplier, performing homomorphic scalar multiplication with all ciphertexts to be processed in the subsequent operation branches, and replacing all ciphertexts to be processed in the subsequent operation branches with the interference ciphertext factor.
[0011] Preferably, outputting the ciphertext result after processing by the homomorphic Boolean circuit includes: collecting the ciphertext data output by all leaf nodes in the homomorphic Boolean circuit; marking the ciphertext data output by leaf nodes that have not performed the homomorphic multiplication zeroing operation as authorized fragment ciphertext, and marking the ciphertext data output by leaf nodes that have performed the homomorphic multiplication zeroing operation as interference fragment ciphertext; performing matrix concatenation of the authorized fragment ciphertext and the interference fragment ciphertext according to the original arrangement order of the leaf nodes in the hierarchical tree structure to generate the ciphertext result and returning it to the access request terminal.
[0012] Preferably, the method further includes: when receiving an update instruction for the preset security level, parsing the target plaintext data segment identifier and the new access boundary carried in the update instruction; according to the new access boundary, re-segmenting the plaintext data segment corresponding to the target plaintext data segment identifier, and re-performing homomorphic encryption encoding on the segmented plaintext data segments to generate an updated ciphertext matrix block; establishing a new mapping relationship between the updated ciphertext matrix block and the corresponding leaf node in the hierarchical tree structure, and releasing the storage space occupied by the original ciphertext matrix block.
[0013] Preferably, the homomorphic AND gate logic and the homomorphic OR gate logic on the same branch path are combined in series, including: calculating the total number of homomorphic AND gate logic and homomorphic OR gate logic connected in series on the current branch path; when the total number exceeds a preset gate circuit depth threshold, extracting multiple consecutively arranged homomorphic OR gate logic in the branch path; performing homomorphic polynomial packing processing on the input ciphertext of the multiple homomorphic OR gate logic; inputting the packed polynomial ciphertext into a single-level homomorphic OR gate logic for one-time operation; replacing the original multiple homomorphic OR gate logic with the single-level homomorphic OR gate logic; and updating the series topology of the branch path.
[0014] Preferably, the method further includes: before the homomorphic Boolean circuit is deployed, the data owner generates multiple sets of interference ciphertext factors using a homomorphic encryption private key, wherein each set of interference ciphertext factors is bound to a unique intermediate node identifier; the multiple sets of interference ciphertext factors are distributed to the storage nodes corresponding to the intermediate nodes, and the storage nodes store the interference ciphertext factors in the local ciphertext pool; a lifecycle timer is allocated to each set of interference ciphertext factors, and when the lifecycle timer reaches a preset validity period threshold, the data owner is triggered to regenerate and distribute new interference ciphertext factors.
[0015] Preferably, triggering the data owner to regenerate and distribute a new interference ciphertext factor includes: when the permission parameters of an intermediate node change, the data owner generates a new version of the interference ciphertext factor corresponding to the intermediate node identifier; the data owner sends the new version of the interference ciphertext factor to the storage node corresponding to the intermediate node, and sends an interference removal instruction to adjacent storage nodes that have a parent-child relationship with the intermediate node; after receiving the interference removal instruction, the adjacent storage node deletes the old version of the interference ciphertext factor stored in its local ciphertext pool, and the storage node corresponding to the intermediate node uses the new version of the interference ciphertext factor to overwrite the old version of the interference ciphertext factor.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0017] 1. This invention divides the plaintext of technical secrets into multiple ciphertext matrix blocks and constructs matching homomorphic Boolean circuits, directly embedding the hierarchical tree-structured access strategy into the logic of homomorphic Boolean operations. When processing access requests, the attribute ciphertext and the ciphertext matrix blocks are synchronously input into the homomorphic Boolean circuit in the ciphertext state to perform AND and OR gate operations. When the permissions of intermediate nodes are not satisfied, interference ciphertext factors are directly introduced to perform homomorphic multiplication and set to zero in subsequent operation branches. This mechanism transforms access control judgment from an independent decryption verification stage into a ciphertext calculation process, eliminating the serial dependency between attribute-based encryption and homomorphic encryption. When the permissions of nodes in the hierarchical tree structure change, permission control can be completed simply by updating the permission parameters of the homomorphic Boolean circuit or replacing the interference ciphertext factors, eliminating the need to recalculate and distribute the underlying technical secret ciphertext matrix blocks and eliminating the delay problem caused by the asynchrony between permission updates and ciphertext data states.
[0018] 2. By converting path vectors into homomorphic AND and OR logic gates, and performing homomorphic polynomial packaging on the input ciphertext of consecutively arranged homomorphic OR logic gates when the gate depth of a branch path exceeds a preset threshold, the computational depth of the homomorphic Boolean circuit is reduced, thus minimizing noise growth during ciphertext computation. Furthermore, by assigning lifecycle timers to interfering ciphertext factors and binding intermediate node identifiers, the generation of new interfering ciphertext factors and the targeted clearing of old interfering ciphertext factors are triggered when the validity period threshold is reached or permission parameters change. This eliminates the risk of long-term stored interfering ciphertext factors being cracked, causing the homomorphic multiplication to fail and maintaining the operational stability of the access control logic. Attached Figure Description
[0019] Figure 1 The main flowchart of the secure storage method for technical secrets based on homomorphic encryption;
[0020] Figure 2 Flowchart for ciphertext matrix block partitioning and hierarchical tree structure generation;
[0021] Figure 3 Flowchart for constructing and optimizing homomorphic Boolean circuits;
[0022] Figure 4 Flowchart of the layer-by-layer comparison operation for ciphertext states;
[0023] Figure 5 Flowchart for the zeroing operation of homomorphic multiplication in subsequent computation branches;
[0024] Figure 6 The flowchart shows the output of the ciphertext and the update of the interference ciphertext factor. Detailed Implementation
[0025] The technical solution disclosed in this specific embodiment is based on a fully homomorphic encryption system, preferably using the BFV fully homomorphic encryption scheme. This scheme supports homomorphic addition and homomorphic multiplication operations on integers, has the adaptability of Boolean circuit operations, and can realize logical and numerical operations in the ciphertext state. Those skilled in the art can replace it with homomorphic encryption schemes such as BGV and CKKS according to the calculation accuracy requirements of the application scenario, and no unique limitation is made here.
[0026] Please refer to the attached document. Figure 1 This embodiment provides a secure storage method for technical secrets based on homomorphic encryption. The preset security level is predefined by the data owner, and each security level corresponds to an access permission gradient for the technical secret. Different security levels correspond to different access permission ranges, with the highest security level corresponding to the core data of the technical secret and the lowest security level corresponding to the publicly accessible data of the technical secret. Specifically, the data owner divides the plaintext of the technical secret into multiple ciphertext matrix blocks according to the preset security level. During the division process, the security level corresponding to different data segments in the plaintext of the technical secret is first identified. Data segments of the same security level are grouped into the same processing unit, and homomorphic encryption is performed on each processing unit to generate a corresponding ciphertext matrix block. The dimension of each ciphertext matrix block matches the number of plaintext slots in the homomorphic encryption scheme, and each element in the ciphertext matrix block is the homomorphic encryption result of the corresponding plaintext data. A hierarchical tree structure corresponding to the preset security levels is constructed. The number of nodes in the hierarchical tree structure matches the number of preset security levels. Each node corresponds to an access control unit for a security level. The topological relationship of the hierarchical tree structure is consistent with the hierarchical relationship of the preset security levels. Nodes corresponding to higher security levels are the parent nodes of nodes corresponding to lower security levels. Multiple child nodes under the same parent node correspond to different access control branches under the same security level. A homomorphic Boolean circuit matching the hierarchical tree structure is generated. The input ports of the homomorphic Boolean circuit are divided into two types: the first type of input port is used to input the attribute ciphertext sent by the access request client, and the second type of input port is used to input the ciphertext matrix block of the technical secret to be accessed. The operation logic of the homomorphic Boolean circuit is completely consistent with the access control logic of the hierarchical tree structure. The output port of the homomorphic Boolean circuit corresponds to the lowest level node of the hierarchical tree structure and is used to output the processed ciphertext data.
[0027] Let the encryption algorithm of the fully homomorphic encryption scheme be... The decryption algorithm is Homomorphic multiplication is Homomorphic addition is Homomorphic subtraction is The private key is The public key is For Boolean values in plaintext space The corresponding ciphertext is , The expression for the AND gate operation in a homomorphic Boolean circuit is: in, , This refers to the Boolean AND operation. The expression for the OR gate operation in a homomorphic Boolean circuit is: in, , For Boolean OR operation.
[0028] The system receives attribute ciphertext sent by the access requesting client. This attribute ciphertext is generated by the requesting client using a homomorphic encryption public key identical to that of the data owner, performing homomorphic encryption on the requesting client's identity and permission attributes. The format of the attribute ciphertext is completely consistent with the ciphertext format of the permission parameters of the nodes in the hierarchical tree structure, ensuring that logical comparison operations can be performed in ciphertext mode. The attribute ciphertext and the ciphertext matrix block of the technical secret to be accessed are input into the homomorphic Boolean circuit. The ciphertext matrix block of the technical secret to be accessed is the ciphertext matrix block corresponding to the technical secret requested by the access requesting client. The ciphertext matrix blocks are sequentially input into the corresponding input ports of the homomorphic Boolean circuit according to the order of the corresponding nodes in the hierarchical tree structure. The homomorphic Boolean circuit performs AND and OR gate operations in ciphertext mode, comparing the attribute ciphertext with the permission parameters of each node in the hierarchical tree structure layer by layer. Specifically, the operation process of the homomorphic Boolean circuit is consistent with the node traversal order of the hierarchical tree structure. Starting from the highest level node, the operation is performed sequentially to the lower level nodes. Each node corresponds to a set of logic gate operations in the homomorphic Boolean circuit. The input of the logic gate operation is the output ciphertext of the previous level node and the permission parameter ciphertext of the current node. The output of the logic gate operation is the permission verification result ciphertext of the current node. The permission verification result ciphertext is used to characterize whether the attribute ciphertext meets the permission requirements of the current node.
[0029] When the attribute ciphertext does not meet the permission requirements of a certain intermediate node in the hierarchical tree structure, a preset interference ciphertext factor is introduced. This factor is then used to perform a homomorphic multiplication zeroing operation on the subsequent operation branches connected to that intermediate node in the homomorphic Boolean circuit. Specifically, the intermediate node is any node in the hierarchical tree structure other than the root and leaf nodes. The subsequent operation branches are the homomorphic Boolean circuit operation paths corresponding to all child nodes of that intermediate node. The homomorphic multiplication zeroing operation converts all ciphertext data in the subsequent operation branches into the ciphertext value corresponding to the interference ciphertext factor through homomorphic multiplication, ensuring that the operation results of the subsequent branches cannot decrypt valid plaintext data. Let the interference ciphertext factor be... The ciphertext to be processed in the subsequent computation branch is The output expression for the homomorphic multiplication zeroing operation is: in, , for The corresponding plaintext value.
[0030] The output is the ciphertext of the result processed by the homomorphic Boolean circuit. Specifically, after the homomorphic Boolean circuit completes all levels of operations, it collects the output ciphertext of all operational branches, concatenates the output ciphertext according to a preset format, and generates the result ciphertext. The result ciphertext is returned to the requesting end through a preset communication link. The requesting end uses the corresponding homomorphic encryption private key to perform a decryption operation on the result ciphertext, and can only obtain plaintext data within the authorized scope. Data outside the authorized scope is decrypted into a meaningless zero value, and no valid information can be obtained.
[0031] Table 1. Mapping Relationship Between Hierarchical Tree Structure Nodes and Ciphertext Matrix Blocks
[0032] N00 0 (roots) P00 none none N01, N02 N01 1 (middle) P01 none N00 N03, N04 N02 1 (middle) P02 none N00 N05, N06 N03 2 (Leaf) P03 M01 N01 none N04 2 (Leaf) P04 M02 N01 none N05 2 (Leaf) P05 M03 N02 none N06 2 (Leaf) P06 M04 N02 none
[0033] This table is used to record the topological relationships, permission parameters and mapping relationships between the nodes in the hierarchical tree structure, ensuring that the operation logic of the homomorphic Boolean circuit is completely matched with the permission verification logic of the hierarchical tree structure. Each leaf node uniquely corresponds to a ciphertext matrix block. Intermediate nodes and root nodes are not directly associated with ciphertext matrix blocks, and are only used for the execution of permission verification logic.
[0034] In this embodiment, by dividing the plaintext of the technical secret into multiple ciphertext matrix blocks, constructing a corresponding hierarchical tree structure and a homomorphic Boolean circuit, and embedding the permission verification logic into the operation process of the homomorphic Boolean circuit, the comparison between the attribute ciphertext and the permission parameters is completed in the ciphertext state. For branches that do not meet the permission requirements, a homomorphic multiplication operation is performed to set them to zero, and the final result ciphertext is output. This achieves secure storage and access control of the technical secret, removes the cascade dependency between attribute base encryption and homomorphic encryption, and avoids the recalculation and distribution of the underlying ciphertext during the permission update process.
[0035] Please refer to the attached document. Figure 2 In a preferred embodiment, during the process of dividing the plaintext of technical secrets into multiple ciphertext matrix blocks according to a preset security level, the data structure features of the plaintext are first parsed. These features include the byte length of the plaintext, data segment separators, semantic relationships between data segments, and security level labeling information for each data segment. During parsing, a preset structure parsing algorithm is used to identify structured and unstructured data in the plaintext. For structured data, the data is divided according to the boundaries of data fields; for unstructured data, it is divided according to the boundaries of semantic segments, ensuring that each segment has complete semantic information and that no data breaks occur. The plaintext is then divided into multiple plaintext data segments according to the access boundaries defined in the preset security level. These access boundaries include the start and end addresses of the plaintext data segments corresponding to each security level, as well as the access permission constraints for each data segment. Let the total byte length of the plaintext be... The number of preset security levels is , No. The starting address of the access boundary corresponding to each security level is The end address is ,in , , Then the constraint expression for accessing the boundary is: This expression ensures that there is no address overlap between plaintext data segments corresponding to different security levels, while completely covering the address range of all technical secret plaintext.
[0036] Homomorphic encryption is performed on multiple plaintext data segments to generate multiple ciphertext matrix blocks. Specifically, during the homomorphic encryption process, the plaintext data segments are first converted into integer vectors that match the plaintext space of the homomorphic encryption scheme. Each element of the integer vector corresponds to one byte of data in the plaintext data segment. During the conversion, a preset encoding rule is used to convert the 8-bit byte data into an integer within the range of 0-255, ensuring that the converted integers are within the plaintext space of the homomorphic encryption scheme. The integer vectors are then encrypted using the homomorphic encryption public key to generate ciphertext matrix blocks. The number of rows in each ciphertext matrix block matches the order of the ciphertext polynomial in the homomorphic encryption scheme, and the number of columns matches the length of the integer vector. Each ciphertext matrix block corresponds to a unique key parameter, which includes the identifier of the encryption public key, the sequence number of the ciphertext, and the set of parameters required for decryption.
[0037] A hierarchical tree structure corresponding to preset security levels is generated. Specifically, the root node represents the highest security level, and the leaf nodes represent the lowest security level. The root node corresponds to the highest level of access permission within the preset security level, and only the data owner has full access to the root node. Leaf nodes correspond to the lowest level of access permission within the preset security level. Each leaf node corresponds to a ciphertext matrix block generated from a plaintext data segment. A one-to-one mapping relationship is established between multiple ciphertext matrix blocks and leaf nodes. Each ciphertext matrix block can only be output through the computation branch of its corresponding leaf node, ensuring that the access permissions of different ciphertext matrix blocks are isolated from each other. The key parameters of the plaintext data segment are used as node attributes to populate the hierarchical tree structure. Specifically, the node attributes of the leaf nodes include the key parameters of the corresponding ciphertext matrix block, the security level of the plaintext data segment, and access boundary information. The node attributes of the intermediate nodes and the root node include the permission parameters of the corresponding level, the identifier list of child nodes, and the identifier information of the parent node, ensuring that each node in the hierarchical tree structure has complete attribute information, which can support the logic generation of homomorphic Boolean circuits.
[0038] Table 2 Plaintext Data Segmentation and Homomorphic Encryption Coding Parameters
[0039] D01 2 0 1023 1024 1024 M01 K01 N03 D02 2 1024 2047 1024 1024 M02 K02 N04 D03 2 2048 3071 1024 1024 M03 K03 N05 D04 2 3072 4095 1024 1024 M04 K04 N06
[0040] This table records the mapping relationship between the plaintext data segmentation parameters, homomorphic encryption encoding parameters, and corresponding hierarchical tree structure nodes. It provides complete parameter support for the management of ciphertext matrix blocks, the maintenance of hierarchical tree structures, and the generation of homomorphic Boolean circuits, ensuring that the segmentation and encryption process of each plaintext data segment is traceable and verifiable.
[0041] Upon receiving an update command for a preset security level, the system parses the target plaintext data segment identifier and the new access boundary carried in the update command. The update command is sent by the data owner through a preset secure channel and carries the data owner's digital signature. Upon receiving the update command, the system first verifies the digital signature using a preset signature verification algorithm. Only after successful verification is the subsequent parsing operation performed, ensuring the legality and immutability of the update command. During parsing, the target plaintext data segment identifier is extracted from the update command. This identifier is used to locate the plaintext data segment whose access boundary needs adjustment. Simultaneously, the new access boundary is extracted, including the adjusted start address, end address, and new security level information. Based on the new access boundary, the plaintext data segment corresponding to the target plaintext data segment identifier is re-segmented, and homomorphic encryption is re-executed on the segmented plaintext data segment to generate an updated ciphertext matrix block. Specifically, during the re-segmentation process, the position of the target plaintext data segment within the original technical secret plaintext is first located. Based on the new access boundaries, the target plaintext data segment is then segmented into one or more new plaintext data segments. Each new plaintext data segment corresponds to a new security level. During the segmentation process, it is ensured that the address range of the new plaintext data segments is completely consistent with the new access boundaries, with no address overflows or overlaps. Homomorphic encryption encoding is performed on each new plaintext data segment, with the encoding rules remaining consistent with the original encryption process, generating an updated ciphertext matrix block. Each updated ciphertext matrix block corresponds to a unique new key parameter. A new mapping relationship is established between the updated ciphertext matrix blocks and the corresponding leaf nodes in the hierarchical tree structure, and the storage space occupied by the original ciphertext matrix blocks is released. Specifically, based on the security level of the new plaintext data segment, the corresponding leaf node is located in the hierarchical tree structure. If the existing number of leaf nodes cannot meet the new mapping requirements, a corresponding leaf node is added to the hierarchical tree structure, and the child node list of the corresponding intermediate node is adjusted to ensure that the topology of the hierarchical tree structure matches the new security level. Establish the mapping relationship between the updated ciphertext matrix block and the corresponding leaf node, fill the node attributes of the corresponding leaf node with the new key parameters, delete the original mapping relationship between the ciphertext matrix block and the corresponding leaf node, release the storage space occupied by the original ciphertext matrix block, and complete the update operation of the preset security level.
[0042] In this embodiment, by parsing the data structure characteristics of the plaintext of technical secrets, the plaintext data segments are divided according to the preset access boundaries and homomorphic encryption is performed to generate ciphertext matrix blocks. A hierarchical tree structure matching the security level is constructed, realizing the mapping between ciphertext matrix blocks and leaf nodes. At the same time, for the update instruction of the security level, the plaintext data segments are re-segmented, the ciphertext matrix blocks are updated, and the mapping adjustment of the hierarchical tree structure is completed. It is not necessary to re-encrypt all the plaintext of technical secrets; only the ciphertext matrix blocks and hierarchical tree structures corresponding to the affected plaintext data segments need to be adjusted, which improves the flexibility and efficiency of the security level update.
[0043] refer to Figure 3 and 4 In a preferred embodiment, a homomorphic Boolean circuit matching the hierarchical tree structure is generated. Specifically, the path vectors from the root node to each leaf node in the hierarchical tree structure are first extracted. A path vector is a sequence of nodes in the hierarchical tree structure that starts from the root node, passes through intermediate nodes, and finally reaches the target leaf node. Each path vector corresponds to a complete permission verification path. Only when the attribute ciphertext of the access requesting end satisfies the permission requirements of all nodes in the path vector can the valid data of the ciphertext matrix block associated with the leaf node corresponding to that path vector be obtained. Let the root node of the hierarchical tree structure be... , No. The leaf nodes are From the root node To leaf node The path vector is Then the expression for the path vector is: in, For path The intermediate nodes that are passed through in sequence. For path The number of intermediate nodes and the length of the path vector are... The total number of nodes on the corresponding path.
[0044] For each path vector, the node attributes in the path vector are converted into corresponding homomorphic AND and OR logic gates. Specifically, the node attributes contain the node's permission verification rules, which are divided into AND and OR rules. AND rules require that the attribute ciphertext of the access request client must simultaneously satisfy all permission parameters of the node, corresponding to homomorphic AND logic; OR rules require that the attribute ciphertext of the access request client satisfies any one of the node's permission parameters, corresponding to homomorphic OR logic. During the conversion process, the node's AND rules are converted into corresponding homomorphic AND logic gates. The input of the homomorphic AND logic gate is the attribute ciphertext and the node's permission parameter ciphertext, and the output is the ciphertext of the AND rule's verification result. Similarly, the node's OR rules are converted into corresponding homomorphic OR logic gates. The input of the homomorphic OR logic gate is the output ciphertext of the previous level node and the node's permission parameter ciphertext, and the output is the ciphertext of the OR rule's verification result. Homomorphic AND and OR gates on the same branch path are connected in series, while homomorphic AND and OR gates on different branch paths are connected in parallel to form a homomorphic Boolean circuit with a hierarchical tree-like topology. Specifically, for the same branch path, which corresponds to a path vector from the root node to a leaf node in the hierarchical tree structure, the output of the logic gate corresponding to the previous node in the path vector is used as the input of the logic gate corresponding to the next node, and so on, forming a complete operational branch. Different branch paths correspond to different path vectors. In the parallel connection process, the input ports of all operational branches of all branch paths are connected to the input port of the attribute ciphertext, and the output ports of all operational branches of all branch paths together form the output port of the homomorphic Boolean circuit. The final homomorphic Boolean circuit has a topology completely isomorphic to the hierarchical tree structure, ensuring that the operational logic of the homomorphic Boolean circuit is completely consistent with the permission verification logic of the hierarchical tree structure.
[0045] Table 3. Comparison of Homomorphic Boolean Circuit Path Vector AND Gate Logic Transformation Table
[0046] P01 N03 N00-N01-N03 N00: AND; N01: OR; N03: AND AND gate - OR gate - AND gate Cattr,P00,P01,P03 C_L03 B01 P02 N04 N00-N01-N04 N00: AND; N01: OR; N04: AND AND gate - OR gate - AND gate Cattr,P00,P01,P04 C_L04 B02 P03 N05 N00-N02-N05 N00: AND; N02: OR; N05: AND AND gate - OR gate - AND gate Cattr,P00,P02,P05 C_L05 B03 P04 N06 N00-N02-N06 N00: AND; N02: OR; N06: AND AND gate - OR gate - AND gate Cattr,P00,P02,P06 C_L06 B04
[0047] This table records the correspondence between each path vector in the hierarchical tree structure and the homomorphic Boolean circuit gate logic. It clarifies the input and output parameters of each gate logic and its corresponding operation branch, providing complete parameter basis for the topology construction, operation verification and subsequent optimization of the homomorphic Boolean circuit, and ensuring that the permission verification logic of the path vector is completely converted into the operation logic of the homomorphic Boolean circuit.
[0048] When concatenating homomorphic AND gates and homomorphic OR gates on the same branch path, first calculate the total number of concatenated homomorphic AND gates and homomorphic OR gates on the current branch path. The total number of concatenated homomorphic gates on the current branch path corresponds to the gate depth of that branch path. The gate depth is positively correlated with the noise growth during homomorphic encryption operations; the greater the gate depth, the higher the noise level after ciphertext processing. When the noise level exceeds the noise tolerance of the homomorphic encryption scheme, it will lead to ciphertext decryption failure. Therefore, it is necessary to optimize branch paths with gate depths exceeding a preset threshold. Let the number of concatenated homomorphic AND gates on the current branch path be... The number of homomorphic OR gate logic is Then the gate depth of this branch path The expression is: The preset gate depth threshold is , The noise margin and computational accuracy requirements of the homomorphic encryption scheme used are determined when... At that time, the gate circuit depth optimization operation is triggered.
[0049] When the total number exceeds a preset gate depth threshold, extract multiple consecutive homomorphic OR gates in the branch path. Specifically, traverse all cascaded homomorphic gates in the branch path, identify consecutive homomorphic OR gate sequences, record the number of homomorphic OR gates in the sequence, and the input and output ciphertext parameters of each homomorphic OR gate. Prioritize the selection of the homomorphic OR gate sequence with the largest consecutive number for optimization to maximize the reduction of gate depth. Pack the input ciphertext of multiple homomorphic OR gates into a homomorphic polynomial, input the packaged polynomial ciphertext into a single-level homomorphic OR gate for a one-time operation, replace the original multiple homomorphic OR gates with a single-level homomorphic OR gate, and update the cascaded topology of the branch path. Specifically, homomorphic polynomial packing processing is based on the plaintext slot packing technique of homomorphic encryption schemes. It packs multiple independent plaintext values into different slots of the same ciphertext polynomial, with each slot corresponding to an independent plaintext value. This allows for parallel homomorphic operations on the plaintext values in all slots under ciphertext conditions, eliminating the need to perform separate operations on the ciphertext corresponding to each plaintext value. Let the polynomial to be packed be... The input ciphertexts of the homomorphic OR gate logic are respectively The plaintext corresponding to each input ciphertext is The number of plaintext polynomial slots in a homomorphic encryption scheme is ,and The ciphertext polynomial after homomorphic polynomial packing is... The expression is: in, For variables in plaintext polynomials, the encrypted polynomials are packaged together. Each slot stores the plaintext value corresponding to the input ciphertext. Parallel OR operations can be performed on the plaintext values in all slots using a single-level homomorphic OR gate logic, and the results are stored in the corresponding slot of the ciphertext polynomial.
[0050] The packaged polynomial ciphertext is input into a single-level homomorphic OR gate logic for a one-time operation, generating a ciphertext polynomial of the operation result. Then, through a preset slot extraction operation, the ciphertext of the operation result corresponding to each slot is extracted from the ciphertext polynomial of the operation result, and used as the output ciphertext of the original multiple homomorphic OR gate logics. Replacing a series of consecutive homomorphic OR gates with a single-level homomorphic OR gate reduces the gate depth of the branch path. This reduces noise growth during ciphertext computation. When updating the serial topology of this branch path, the input ports of the original multiple homomorphic OR gate logics are connected to the input ports of the homomorphic polynomial packaging processing module, and the output ports of the single-level homomorphic OR gate logics are connected to the input ports of the subsequent homomorphic gate logics. This ensures that the computation logic of the optimized branch path is completely consistent with the original path and will not change the result of permission verification.
[0051] In this embodiment, by extracting the path vectors of the hierarchical tree structure, the node attributes of the path vectors are converted into corresponding homomorphic gate logic. Through series and parallel combinations, a homomorphic Boolean circuit matching the topology of the hierarchical tree structure is formed. At the same time, for branch paths where the gate circuit depth exceeds the threshold, multiple consecutive homomorphic OR gate logics are replaced with single-level homomorphic OR gate logics through homomorphic polynomial packaging processing. This reduces the operational level depth of the homomorphic Boolean circuit, reduces noise growth during ciphertext operation, and improves the stability and decryption success rate of the homomorphic Boolean circuit operation.
[0052] refer to Figure 5 In a preferred embodiment, the homomorphic Boolean circuit performs AND and OR gate operations in the ciphertext state, comparing the attribute ciphertext with the permission parameters of each node in the hierarchical tree structure layer by layer. Specifically, the attribute ciphertext is input into the root node of the homomorphic Boolean circuit, and at the root node, the first homomorphic intersection of the attribute ciphertext and the root node's permission parameter ciphertext is calculated using homomorphic AND gate operations. The root node's permission parameter ciphertext is the homomorphic encryption result of the permission verification parameters of the highest level of confidentiality, corresponding to the highest access permission requirements of the technical secret. The homomorphic AND gate operation is used to verify whether the attribute ciphertext simultaneously satisfies all permission parameters of the root node. The first homomorphic intersection is the root node's permission verification result ciphertext, used to characterize whether the attribute ciphertext satisfies the root node's permission requirements. Let the attribute ciphertext be... The root node's permission parameters are encrypted. Then the intersection of the first homomorphism The expression is: in, The plaintext value corresponding to the first homomorphic intersection is 1 if and only if the Boolean AND operation result of the plaintext value corresponding to the attribute ciphertext and the plaintext value corresponding to the root node permission parameter ciphertext is 1, indicating that the attribute ciphertext satisfies the root node's permission requirements.
[0053] The first homomorphic intersection is used as the input to the next intermediate node. At each intermediate node, a homomorphic OR gate is used to calculate the second homomorphic intersection of the first homomorphic intersection with the ciphertext of the intermediate node's permission parameters. This process continues until the target leaf node is reached. Specifically, the hierarchical tree structure is traversed using a depth-first approach. Starting from the root node, each intermediate node is traversed sequentially. The input to each intermediate node is the ciphertext of the homomorphic intersection output by the parent node at the previous level. At each intermediate node, a homomorphic OR gate is used to calculate the homomorphic intersection of the input ciphertext with the ciphertext of the current intermediate node's permission parameters. The resulting second homomorphic intersection is used as the output of the current intermediate node and simultaneously as the input to the next level's child node. This process is repeated until the target leaf node corresponding to the path vector is reached, completing the permission verification operation for that path. Let the first node be... The input ciphertext for each intermediate node is The encrypted permission parameters of this intermediate node are Then the intersection of the second homomorphism The expression is: in, When the Boolean OR operation between the plaintext value corresponding to the input ciphertext and the plaintext value corresponding to the ciphertext of the intermediate node permission parameter results in 1, the plaintext value corresponding to the second homomorphic intersection is 1, indicating that the attribute ciphertext satisfies the permission requirements of the intermediate node.
[0054] At the intermediate node, the ciphertext state value output by the homomorphic OR gate operation is obtained. The ciphertext state value is the second homomorphic intersection ciphertext output by the intermediate node, and the corresponding plaintext value is 0 or 1. When the plaintext value is 0, it indicates that the attribute ciphertext does not meet the permission requirements of the intermediate node; when the plaintext value is 1, it indicates that the attribute ciphertext meets the permission requirements of the intermediate node. When the ciphertext state value indicates that the attribute ciphertext does not meet the permission requirements of the intermediate node, the interference ciphertext factor stored in the local ciphertext pool is invoked. The interference ciphertext factor is a zero ciphertext generated by homomorphically encrypting the number zero. The local ciphertext pool is an encrypted storage area in the storage node specifically used to store the interference ciphertext factor, which can only be accessed through a preset permission verification interface to ensure the storage security of the interference ciphertext factor. The interference ciphertext factor is used as a multiplier to perform homomorphic scalar multiplication with all ciphertexts to be processed in the subsequent operation branch, replacing all ciphertexts to be processed in the subsequent operation branch with the interference ciphertext factor. Specifically, the subsequent computation branches are the computation paths corresponding to all child nodes of the intermediate node. All ciphertext to be processed includes the ciphertext output from the intermediate node to the child nodes, the ciphertext matrix block corresponding to the child nodes, and all intermediate ciphertext generated during the subsequent computation of the child nodes. Through homomorphic scalar multiplication, all ciphertext to be processed and interference ciphertext factors are subjected to homomorphic multiplication. The plaintext value corresponding to the ciphertext after the operation is 0. Regardless of the logic of the subsequent computation branches, the ciphertext output after decryption is a meaningless zero value, and no valid information can be obtained, thus achieving the shielding of unauthorized branches.
[0055] Collect the ciphertext data output from all leaf nodes in the homomorphic Boolean circuit. The ciphertext data output from all leaf nodes includes valid ciphertext data from branches that meet the access requirements, and interference ciphertext data from branches that do not meet the access requirements. Mark the ciphertext data output from leaf nodes that have not undergone homomorphic multiplication to zero operation as authorized fragment ciphertext; the plaintext data corresponding to the authorized fragment ciphertext is technical secret data within the access requester's access permissions. Mark the ciphertext data output from leaf nodes that have undergone homomorphic multiplication to zero operation as interference fragment ciphertext; the plaintext data corresponding to the interference fragment ciphertext is a meaningless zero value. Concatenate the authorized fragment ciphertext and interference fragment ciphertext into a matrix according to the original arrangement order of the leaf nodes in the hierarchical tree structure to generate the result ciphertext, which is then returned to the access requester. Let the result ciphertext matrix be... The total number of leaf nodes is , No. The ciphertext output by each leaf node is The concatenation expression for the resulting ciphertext matrix is then: in, The column order is completely consistent with the original arrangement order of the leaf nodes, ensuring that the decrypted plaintext data matches the structure of the original technical secret plaintext. After the access requesting end decrypts, it can only obtain valid plaintext data at the position corresponding to the authorized segment, and the rest of the positions are all zero values, making it impossible to obtain technical secret information outside the scope of authorization.
[0056] refer to Figure 6 Before deploying the homomorphic Boolean circuit, the data owner generates multiple sets of interference ciphertext factors using a homomorphic encryption private key. Each set of interference ciphertext factors is bound to a unique intermediate node identifier. During the generation of interference ciphertext factors, the data owner performs multiple encryption operations on the number zero using a homomorphic encryption public key, generating multiple sets of different zero ciphertexts. Each set of zero ciphertexts corresponds to a unique interference ciphertext factor, and each set of interference ciphertext factors is bound to an intermediate node identifier. The binding relationship is stored in the data owner's local secure database, ensuring that each intermediate node can only access the interference ciphertext factors bound to it, thus preventing misuse of the interference ciphertext factors. The multiple sets of interference ciphertext factors are distributed to the storage nodes corresponding to the intermediate nodes, and the storage nodes store the interference ciphertext factors in their local ciphertext pools. The distribution process is executed through a pre-defined secure channel. The distributed data packets carry interference ciphertext factors, bound intermediate node identifiers, and the data owner's digital signature. Upon receiving the data packet, the storage node first verifies the validity of the digital signature. If verification is successful, it extracts the interference ciphertext factors and the bound intermediate node identifier, and stores the interference ciphertext factors in the corresponding intermediate node's local ciphertext pool, ensuring the security and immutability of the distribution process. A lifecycle timer is assigned to each set of interference ciphertext factors. When the lifecycle timer reaches a pre-defined validity period threshold, the data owner is triggered to regenerate and distribute new interference ciphertext factors. The lifecycle timer starts when the storage node stores the interference ciphertext factors in its local ciphertext pool. The timer's duration is consistent with the pre-defined validity period threshold, which is preset by the data owner according to security requirements. Let the generation time of a certain set of interference ciphertext factors be... The preset validity period threshold is The current time is The trigger condition expression for the lifecycle timer is: When the above conditions are met, the update operation of the interference ciphertext factor is triggered, and the data owner regenerates and distributes the new version of the interference ciphertext factor.
[0057] Table 4. Binding Relationship between Interference Ciphertext Factor and Intermediate Node, and Lifecycle Parameters
[0058]
[0059] This table records the binding relationship between the interference ciphertext factor and the intermediate node, as well as the lifecycle parameters and storage location information. It provides complete parameter support for the distribution, lifecycle management, and update operations of the interference ciphertext factor, ensuring that the use and update process of each interference ciphertext factor is traceable and controllable, and preventing expired or illegal interference ciphertext factors from being used.
[0060] The process triggers the data owner to regenerate and distribute new interference ciphertext factors. This includes generating a new version of the interference ciphertext factor corresponding to the intermediate node's identifier when the permission parameters of a certain intermediate node change. The change in the intermediate node's permission parameters is triggered by a permission update command sent by the data owner through a pre-defined secure channel. The permission update command carries the changed intermediate node identifier, the new permission parameters, and the data owner's digital signature. Simultaneously with sending the permission update command, the data owner uses a homomorphic encryption public key to generate a new version of the interference ciphertext factor bound to that intermediate node's identifier. The plaintext value of the new interference ciphertext factor is zero, just like the old one, but the ciphertext values are different, preventing the old interference ciphertext factor from being reused after being cracked. The data owner sends the new interference ciphertext factor to the storage node corresponding to the intermediate node and sends interference removal commands to adjacent storage nodes with a parent-child relationship to that intermediate node. Adjacent storage nodes include the storage node corresponding to the parent node of the intermediate node, and the storage nodes corresponding to all child nodes of the intermediate node. The interference removal instruction carries the number of the old version of the interference ciphertext factor to be removed, the bound intermediate node identifier, and the digital signature of the data owner. This ensures that adjacent storage nodes only remove the specified old version of the interference ciphertext factor and do not affect the normal use of other interference ciphertext factors. After receiving the interference removal instruction, the adjacent storage node first verifies the legality of the digital signature in the instruction. If the verification is successful, it deletes the old version of the interference ciphertext factor stored in its local ciphertext pool. The storage node corresponding to the intermediate node then overwrites the old version of the interference ciphertext factor with the new version, completing the interference ciphertext factor update operation. At the same time, the storage node corresponding to the intermediate node restarts the lifecycle timer of the new version of the interference ciphertext factor, restarting the timer according to the preset validity period threshold, ensuring that the lifecycle management of the new version of the interference ciphertext factor meets security requirements.
[0061] In this embodiment, the comparison between attribute ciphertext and node permission parameters is completed layer by layer through homomorphic AND and OR gate operations. For branches that do not meet the permission requirements, interference ciphertext factors are introduced and homomorphic multiplication is performed to zero them. The result ciphertext is generated by concatenating the leaf nodes according to their original order. At the same time, the interference ciphertext factors are bound to intermediate node identifiers and distributed. A lifecycle timer is allocated for validity management. When the permission parameters change, the generation of a new version of interference ciphertext factors and the targeted clearing of the old version of interference ciphertext factors are triggered. This eliminates the risk that the zeroing operation will fail due to the cracking of long-term stored interference ciphertext factors, and maintains the operational stability of the access control logic.
Claims
1. A method for securely storing technical secrets based on homomorphic encryption, characterized in that, The method includes: dividing plaintext technical secrets into multiple ciphertext matrix blocks according to a preset security level, constructing a hierarchical tree structure corresponding to the preset security level, and generating a homomorphic Boolean circuit matching the hierarchical tree structure; receiving attribute ciphertext sent by an access request terminal, and inputting the attribute ciphertext and the ciphertext matrix block of the technical secrets to be accessed into the homomorphic Boolean circuit; the homomorphic Boolean circuit performs AND and OR gate operations in the ciphertext state, comparing the attribute ciphertext with the permission parameters of each node in the hierarchical tree structure layer by layer; when the attribute ciphertext does not meet the permission requirements of a certain intermediate node in the hierarchical tree structure, introducing a preset interference ciphertext factor, and performing homomorphic multiplication to zero the subsequent operation branch connected to the intermediate node in the homomorphic Boolean circuit; and outputting the ciphertext of the result processed by the homomorphic Boolean circuit.
2. The method for securely storing technical secrets based on homomorphic encryption according to claim 1, characterized in that, The process of dividing the plaintext technical secret into multiple ciphertext matrix blocks according to a preset security level includes: parsing the data structure features of the plaintext technical secret; dividing the plaintext technical secret into multiple plaintext data segments according to the access boundaries defined in the preset security level; performing homomorphic encryption encoding on each of the multiple plaintext data segments to generate the multiple ciphertext matrix blocks; and generating a hierarchical tree structure corresponding to the preset security level, including: establishing a mapping relationship between the multiple ciphertext matrix blocks and the leaf nodes, with the root node as the highest security level and the leaf nodes as the lowest security level; and filling the hierarchical tree structure with the key parameters of the plaintext data segments as node attributes.
3. The method for securely storing technical secrets based on homomorphic encryption according to claim 1, characterized in that, Generating the homomorphic Boolean circuit that matches the hierarchical tree structure includes: extracting path vectors from the root node to each leaf node in the hierarchical tree structure; for each path vector, converting the node attributes in the path vector into corresponding homomorphic AND gate logic and homomorphic OR gate logic; connecting the homomorphic AND gate logic and homomorphic OR gate logic on the same branch path in series, and connecting the homomorphic AND gate logic and homomorphic OR gate logic on different branch paths in parallel to form a homomorphic Boolean circuit with the topological characteristics of the hierarchical tree structure.
4. The method for securely storing technical secrets based on homomorphic encryption according to claim 1, characterized in that, The homomorphic Boolean circuit performs AND and OR operations in the ciphertext state, comparing the attribute ciphertext with the permission parameters of each node in the hierarchical tree structure layer by layer. This includes: inputting the attribute ciphertext into the root node of the homomorphic Boolean circuit; calculating the first homomorphic intersection of the attribute ciphertext and the permission parameter ciphertext of the root node using a homomorphic AND operation at the root node; using the first homomorphic intersection as the input of the next intermediate node; calculating the second homomorphic intersection of the first homomorphic intersection and the permission parameter ciphertext of the intermediate node using a homomorphic OR operation at the intermediate node, until the target leaf node is reached.
5. The method for securely storing technical secrets based on homomorphic encryption according to claim 1, characterized in that, Introducing a preset interference ciphertext factor, a homomorphic multiplication zeroing operation is performed on the subsequent operation branches connected to the intermediate node in the homomorphic Boolean circuit. This includes: at the intermediate node, obtaining the ciphertext state value output by the homomorphic OR gate operation; when the ciphertext state value indicates that the attribute ciphertext does not meet the permission requirements of the intermediate node, calling the interference ciphertext factor stored in the local ciphertext pool, wherein the interference ciphertext factor is a zero ciphertext generated by homomorphically encrypting the number zero; using the interference ciphertext factor as a multiplier, performing homomorphic scalar multiplication with all ciphertexts to be processed in the subsequent operation branches, and replacing all ciphertexts to be processed in the subsequent operation branches with the interference ciphertext factor.
6. The method for securely storing technical secrets based on homomorphic encryption according to claim 1, characterized in that, Outputting the ciphertext result after processing by the homomorphic Boolean circuit includes: collecting the ciphertext data output by all leaf nodes in the homomorphic Boolean circuit; marking the ciphertext data output by leaf nodes that have not performed the homomorphic multiplication zeroing operation as authorized fragment ciphertext, and marking the ciphertext data output by leaf nodes that have performed the homomorphic multiplication zeroing operation as interference fragment ciphertext; performing matrix concatenation of the authorized fragment ciphertext and the interference fragment ciphertext according to the original arrangement order of the leaf nodes in the hierarchical tree structure to generate the result ciphertext and returning it to the access request end.
7. The method for securely storing technical secrets based on homomorphic encryption according to claim 2, characterized in that, The method further includes: when receiving an update instruction for the preset security level, parsing the target plaintext data segment identifier and the new access boundary carried in the update instruction; according to the new access boundary, re-segmenting the plaintext data segment corresponding to the target plaintext data segment identifier, and re-performing homomorphic encryption encoding on the segmented plaintext data segments to generate an updated ciphertext matrix block; establishing a new mapping relationship between the updated ciphertext matrix block and the corresponding leaf node in the hierarchical tree structure, and releasing the storage space occupied by the original ciphertext matrix block.
8. The method for securely storing technical secrets based on homomorphic encryption according to claim 3, characterized in that, The process of concatenating homomorphic AND gate logic and homomorphic OR gate logic on the same branch path includes: calculating the total number of homomorphic AND gate logic and homomorphic OR gate logic concatenated on the current branch path; when the total number exceeds a preset gate circuit depth threshold, extracting multiple consecutively arranged homomorphic OR gate logic in the branch path; performing homomorphic polynomial packing processing on the input ciphertext of the multiple homomorphic OR gate logic; inputting the packed polynomial ciphertext into a single-level homomorphic OR gate logic for one-time operation; replacing the original multiple homomorphic OR gate logic with the single-level homomorphic OR gate logic; and updating the concatenated topology of the branch path.
9. The method for securely storing technical secrets based on homomorphic encryption according to claim 5, characterized in that, The method further includes: before the homomorphic Boolean circuit is deployed, the data owner generates multiple sets of interference ciphertext factors using a homomorphic encryption private key, wherein each set of interference ciphertext factors is bound to a unique intermediate node identifier; the multiple sets of interference ciphertext factors are distributed to the storage nodes corresponding to the intermediate nodes, and the storage nodes store the interference ciphertext factors in the local ciphertext pool; a lifecycle timer is assigned to each set of interference ciphertext factors, and when the lifecycle timer reaches a preset validity period threshold, the data owner is triggered to regenerate and distribute new interference ciphertext factors.
10. The method for securely storing technical secrets based on homomorphic encryption according to claim 9, characterized in that, Triggering the data owner to regenerate and distribute a new interference ciphertext factor includes: when the permission parameters of an intermediate node change, the data owner generates a new version of the interference ciphertext factor corresponding to the intermediate node identifier; the data owner sends the new version of the interference ciphertext factor to the storage node corresponding to the intermediate node, and sends an interference removal instruction to the adjacent storage node that has a parent-child relationship with the intermediate node; after receiving the interference removal instruction, the adjacent storage node deletes the old version of the interference ciphertext factor stored in its local ciphertext pool, and the storage node corresponding to the intermediate node uses the new version of the interference ciphertext factor to overwrite the old version of the interference ciphertext factor.