Privacy protection method and system for hybrid encryption strategy
By employing hybrid encryption strategies and zero-knowledge proofs, the efficiency issues of data encryption strength and integrity verification in cloud computing environments are resolved, achieving efficient data protection and privacy protection, and enhancing data transmission security and system trustworthiness.
Patent Information
- Application Number
- CN202511516099.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-23
AI Technical Summary
Existing data encryption methods struggle to simultaneously guarantee high encryption strength and quantum computing resistance in cloud computing and distributed storage environments, while also exhibiting low efficiency in data integrity verification and privacy protection.
A hybrid encryption strategy is employed. By randomly generating primary and auxiliary lattice base matrices, and combining orthogonalization and matrix norm, these matrices are decomposed into upper triangular and orthogonal matrices to generate a homomorphic encryption key. This key is then mapped to a Riemannian manifold. The encryption strength is calculated using the auxiliary lattice base matrix, and the upper triangular matrix is iteratively optimized to generate the hybrid encryption key. Simultaneously, a hash tree structure for the data fragments is constructed, and zero-knowledge proofs are generated.
It achieves a more efficient data protection mechanism, significantly improves encryption strength, prevents keys from being cracked, ensures data transmission security, and verifies data integrity without disclosing the original data content, thereby enhancing privacy protection capabilities and system credibility.
Smart Images

Figure CN121000522A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security, in particular to a privacy protection method and system of a hybrid encryption strategy. BACKGROUND
[0002] With the rapid development of information technology, data security and privacy protection have become important issues in today's society. The data generated by users when using various services often contains sensitive information. How to protect the security of these data during storage and transmission is of great significance to maintaining personal privacy and organizational information security.
[0003] Traditional data encryption methods usually use symmetric encryption or asymmetric encryption technologies such as AES, RSA, etc. With the popularity of cloud computing and distributed storage, homomorphic encryption technology has attracted widespread attention because it allows computation in an encrypted state. At the same time, encryption algorithms based on lattice cryptography have become a research hotspot in the post-quantum cryptography field due to their strong resistance to quantum computing. In terms of data verification, Merkle hash tree and zero-knowledge proof technologies provide new ideas for data integrity verification. SUMMARY
[0004] The embodiments of the present application provide a privacy protection method and system of a hybrid encryption strategy, which can solve the problems in the prior art.
[0005] In a first aspect, the embodiments of the present application provide a privacy protection method of a hybrid encryption strategy, comprising: receiving encrypted data sent by a user terminal and dividing it into multiple data blocks; randomly selecting a prime number, generating a main lattice basis matrix and an auxiliary lattice basis matrix, decomposing the main lattice basis matrix into an upper triangular matrix and an orthogonal matrix based on orthogonalization processing and matrix norm, generating a homomorphic encryption key based on the orthogonal matrix, mapping it to a Riemann manifold to obtain an orthogonal metric tensor, and calculating the encryption strength in combination with the auxiliary lattice basis matrix; iteratively optimizing the upper triangular matrix to obtain an optimal key state, combining the homomorphic encryption key with the optimal key state to obtain a hybrid encryption key; reconstructing the data blocks into a data vector and performing vector inner product operation with the hybrid encryption key to obtain a ciphertext data block; dividing the ciphertext data block into multiple data segments, calculating the hash value of each data segment as a leaf node, splicing the hash values of adjacent leaf nodes and calculating layer by layer to obtain a root node value; randomly selecting multiple leaf nodes to generate multiple verification paths; calculating the local proof value of each verification path, and generating a zero-knowledge proof when the local proof value is greater than a confidence threshold; Returning encrypted data to the user terminal, the encrypted data including the ciphertext data block, the hybrid encryption key, the root node value and the zero-knowledge proof.
[0006] Randomly select a prime number, generate a main lattice basis matrix and an auxiliary lattice basis matrix, based on orthogonalization processing and matrix norm, decompose the main lattice basis matrix into an upper triangular matrix and an orthogonal matrix, including: Select a first prime number, generate an initial invertible matrix, calculate the determinant value of the initial invertible matrix, when the result of the determinant value modulo the first prime number is not zero, take the initial invertible matrix as the main lattice basis matrix; select a second prime number, generate a diagonal matrix, multiply the main lattice basis matrix and the diagonal matrix to obtain an auxiliary lattice basis matrix; Perform orthogonalization processing on the main lattice basis matrix to obtain an orthogonal matrix; based on the orthogonal matrix and the main lattice basis matrix, calculate an upper triangular matrix; calculate the norm difference value of the product of the upper triangular matrix and the orthogonal matrix and the main lattice basis matrix, when the norm difference value is less than a stability threshold parameter, complete the main lattice basis matrix decomposition.
[0007] Based on the orthogonal matrix, generate a homomorphic encryption key, map it to Riemann manifold to obtain an orthogonal metric tensor, combine the auxiliary lattice basis matrix to calculate the encryption strength; iteratively optimize the upper triangular matrix to obtain an optimal key state, combine the homomorphic encryption key and the optimal key state to obtain a hybrid encryption key, including: Perform inner product operation on the row vectors of the orthogonal matrix and random integer coefficients to obtain a homomorphic encryption key, map the homomorphic encryption key to Riemann manifold to obtain an orthogonal metric tensor; square and square root all element squares of the auxiliary lattice basis matrix, and multiply the orthogonal metric tensor to obtain the encryption strength; Take the diagonal elements of the upper triangular matrix as the initial key state, take the difference between the initial key state's Riemann curvature and its second derivative as the evolution speed; accumulate the evolution speed to the initial key state to obtain the key state at the next time, repeat the accumulation operation until the evolution speed is less than the convergence threshold; Integrate all key states on the Riemann manifold to obtain curvature energy, select the key state corresponding to the minimum curvature energy value as the optimal key state, and linearly combine the homomorphic encryption key according to the encryption strength to generate a hybrid encryption key.
[0008] Integrate all key states on the Riemann manifold to obtain curvature energy, select the key state corresponding to the minimum curvature energy value as the optimal key state, and linearly combine the homomorphic encryption key according to the encryption strength to generate a hybrid encryption key, including: Map all key states to a multi-dimensional Riemann manifold space through a mapping function; extract multiple local coordinate components from the key states based on the mapping function, respectively calculate the products of the multiple local coordinate components and corresponding coordinate basis vectors and sum them up to obtain a local key; calculate the inner product between adjacent coordinate basis vectors according to the local key to generate a Riemann curvature tensor; Calculate the square of the modulus value of the Riemann curvature tensor, and integrate the square of the modulus value over the entire Riemann manifold to obtain a curvature energy value; select the key state corresponding to the minimum curvature energy value as the optimal key state; Divide the exponential decay value of the curvature energy value by the encryption strength and the exponential decay value of the curvature energy value to obtain a mixing coefficient; linearly combine the optimal key state and the homomorphic encryption key according to the mixing coefficient to output a mixed encryption key.
[0009] Divide the ciphertext data block into multiple data segments, calculate the hash value of each data segment as a leaf node, and calculate the root node value by concatenating the hash values of adjacent leaf nodes layer by layer, including: Calculate the information entropy of the ciphertext data block, calculate the product of the information entropy and the basic fragmentation length, and divide the ciphertext data block into multiple data segments according to the product; The number of connected components, the number of cavities, the mean and the standard deviation of each data segment are used as a topological feature vector, and the data segment and the corresponding topological feature vector are concatenated and hashed to obtain the hash value of the leaf node; Calculate the Euclidean distance of the topological feature vectors corresponding to adjacent leaf nodes, take the negative exponential operation result of the Euclidean distance as the topological similarity, divide the topological similarity by the sum of the topological similarities of the leaf node and its neighborhood nodes to obtain a merging weight, multiply the hash values of adjacent leaf nodes by the corresponding merging weights respectively and concatenate them, and perform hash operation to obtain the hash value of the parent node; Repeat the concatenation and hash operation until only one node is left, and take the hash value of the node as the root node value.
[0010] Randomly select multiple leaf nodes to generate multiple verification paths; calculate the local proof value of each verification path, and generate a zero-knowledge proof when the local proof value is greater than a confidence threshold, including: Starting from the root node, record all node hash values on the path leading to the target leaf node, and connect the nodes with node hash values greater than a preset screening threshold to generate a verification path; Cascade the hash values of adjacent nodes on the verification path to obtain a concatenated hash value; assign a depth weight coefficient to each node on the verification path, multiply the depth weight coefficient by the concatenated hash value, and sum them up to obtain the local proof value of the verification path; When the local proof value of each verification path is greater than the confidence threshold, a random string is generated, the node hash value of the verification path is mixed with the random string to obtain a commitment value, and the commitment value, the random string, the node hash value of the verification path and the local proof value are output as zero-knowledge proof.
[0011] The second aspect of the embodiment of the application provides a privacy protection system of a hybrid encryption strategy, comprising: A first unit is configured to receive to-be-encrypted data sent by a user terminal and divide the to-be-encrypted data into a plurality of data blocks. A second unit is configured to randomly select a prime number, generate a main lattice matrix and an auxiliary lattice matrix, decompose the main lattice matrix into an upper triangular matrix and an orthogonal matrix based on orthogonalization processing and matrix norm, generate a homomorphic encryption key based on the orthogonal matrix, map the homomorphic encryption key to a Riemann manifold to obtain an orthogonal metric tensor, calculate encryption strength in combination with the auxiliary lattice matrix, and iteratively optimize the upper triangular matrix to obtain an optimal key state, combine the homomorphic encryption key and the optimal key state to obtain a hybrid encryption key. A third unit is configured to reconstruct the data blocks into a data vector, perform vector inner product operation on the data vector and the hybrid encryption key to obtain a ciphertext data block. A fourth unit is configured to divide the ciphertext data block into a plurality of data segments, calculate the hash value of each data segment as a leaf node, splice the hash values of adjacent leaf nodes and calculate a root node value layer by layer, randomly select a plurality of leaf nodes to generate a plurality of verification paths, and calculate the local proof value of each verification path, and generate zero-knowledge proof when the local proof value is greater than the confidence threshold. A fifth unit is configured to return encrypted data to the user terminal, wherein the encrypted data comprises the ciphertext data block, the hybrid encryption key, the root node value and the zero-knowledge proof.
[0012] The third aspect of the embodiment of the application, An electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; The processor is configured to invoke the instructions stored in the memory to execute the method described above.
[0013] The fourth aspect of the embodiment of the application, A computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.
[0014] The application has the following beneficial effects: The application realizes a more efficient data protection mechanism by dividing data into multiple data blocks and adopting a hybrid encryption strategy combining a main lattice matrix and an auxiliary lattice matrix, significantly improves encryption strength, effectively prevents key cracking, and guarantees data transmission security.
[0015] The application maps a homomorphic encryption key to a Riemann manifold and combines upper triangular matrix iteration optimization, realizes dynamic adjustment of key state, enhances the anti-attack ability of the encryption algorithm, while maintaining the computing efficiency, so that the encryption process is both safe and efficient.
[0016] The application realizes verification of data integrity without revealing the original data content by constructing a hash tree structure of data segments and generating zero-knowledge proof, enhances the privacy protection capability, while supporting efficient verification of data authenticity by a third party, and improves the overall credibility of the system. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 It is a flowchart of a privacy protection method of a hybrid encryption strategy of the embodiment of the application. Figure 2 It is a flowchart of a key state optimization method based on a Riemann manifold. DETAILED DESCRIPTION
[0018] To make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme of the embodiments of the application will be described clearly and completely below in combination with the drawings of the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.
[0019] The technical scheme of the application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in some embodiments.
[0020] Figure 1 It is a flowchart of a privacy protection method of a hybrid encryption strategy of the embodiment of the application, as shown in Figure 1 The method comprises the following steps. Receiving the to-be-encrypted data sent by the user terminal and dividing it into multiple data blocks; Randomly select a prime number, generate a main lattice basis matrix and an auxiliary lattice basis matrix, decompose the main lattice basis matrix into an upper triangular matrix and an orthogonal matrix based on orthogonalization processing and matrix norm, generate a homomorphic encryption key based on the orthogonal matrix, map it to Riemann manifold to obtain an orthogonal metric tensor, and calculate the encryption strength in combination with the auxiliary lattice basis matrix; obtain the optimal key state by iteratively optimizing the upper triangular matrix, combine the homomorphic encryption key and the optimal key state to obtain a hybrid encryption key; Reconstruct the data block into a data vector, and perform vector inner product operation with the hybrid encryption key to obtain a ciphertext data block. Divide the ciphertext data block into multiple data segments, calculate the hash value of each data segment as a leaf node, splice the hash values of adjacent leaf nodes and calculate layer by layer to obtain a root node value; randomly select multiple leaf nodes to generate multiple verification paths; calculate the local proof value of each verification path, and generate zero-knowledge proof when the local proof value is greater than the confidence threshold. Return the encrypted data to the user terminal, which includes the ciphertext data block, the hybrid encryption key, the root node value and the zero-knowledge proof.
[0021] In an optional implementation, a prime number is randomly selected to generate a main lattice basis matrix and an auxiliary lattice basis matrix, and the main lattice basis matrix is decomposed into an upper triangular matrix and an orthogonal matrix based on orthogonalization processing and matrix norm, including: Select a first prime number to generate an initial invertible matrix, calculate the determinant value of the initial invertible matrix, and when the result of the determinant value modulo the first prime number is not zero, use the initial invertible matrix as the main lattice basis matrix; select a second prime number to generate a diagonal matrix, multiply the main lattice basis matrix and the diagonal matrix to obtain an auxiliary lattice basis matrix. Perform orthogonalization processing on the main lattice basis matrix to obtain an orthogonal matrix; calculate an upper triangular matrix based on the orthogonal matrix and the main lattice basis matrix; calculate the norm difference value between the product of the upper triangular matrix and the orthogonal matrix and the main lattice basis matrix, and complete the main lattice basis matrix decomposition when the norm difference value is less than a stability threshold parameter.
[0022] The application provides a method for randomly selecting a prime number to generate a main lattice basis matrix and an auxiliary lattice basis matrix, which decomposes the main lattice basis matrix into an upper triangular matrix and an orthogonal matrix based on orthogonalization processing and matrix norm.
[0023] In a specific implementation, a first prime number p is selected, for example, p = 17. An initial invertible matrix A is generated, which can be obtained in a random manner or by a preset matrix generation algorithm. Assuming that the generated initial invertible matrix A is a 3x3 matrix, as shown below: A = [[4, 2, 1], [3, 5, 2], [1, 4, 6]]. The determinant value det(A) of the initial invertible matrix A is calculated. In this example, det(A) = 4x5x6 + 2x2x1 + 1x3x4 - 1x5x1 - 4x2x6 - 3x4x2 = 120 + 4 + 12 - 5 - 48 - 24 = 59.
[0024] It is determined whether the result of the determinant value det(A) modulo the first prime number p is zero. In this example, 59 mod 17 = 8 ≠ 0, so the initial invertible matrix A is taken as the main lattice basis matrix B. That is, B = [[4, 2, 1], [3, 5, 2], [1, 4, 6]].
[0025] A second prime number q is selected, for example, q = 23. A diagonal matrix D is generated, and the diagonal elements of the diagonal matrix D can be set to a specified power of the second prime number q. In this example, D = [[q, 0, 0], [0, q, 0], [0, 0, q]] = [[23, 0, 0], [0, 23, 0], [0, 0, 23]].
[0026] The main lattice basis matrix B is multiplied by the diagonal matrix D to obtain an auxiliary lattice basis matrix C. In this example, C = BxD = [[4x23, 2x23, 1x23], [3x23, 5x23, 2x23], [1x23, 4x23, 6x23]] = [[92, 46, 23], [69, 115, 46], [23, 92, 138]].
[0027] The main lattice basis matrix B is subjected to an orthogonalization process to obtain an orthogonal matrix Q. The orthogonalization process can use the Gram-Schmidt orthogonalization method. In this method, the column vectors of the main lattice basis matrix B are taken, each column vector is projected onto the orthogonal complement of the already orthogonalized column vector space by iterative calculation, and each orthogonal vector is normalized to obtain a unit orthogonal vector. Through the orthogonalization process, the orthogonal matrix Q is obtained. Assuming that the obtained orthogonal matrix Q is: Q = [[0.8, -0.6, 0], [0.6, 0.8, 0], [0, 0, 1]]. Based on the orthogonal matrix Q and the main lattice basis matrix B, an upper triangular matrix R is calculated. The upper triangular matrix R can be calculated by R = Q T× B = [[0.8, 0.6, 0], [-0.6, 0.8, 0], [0, 0, 1]] × [[4, 2, 1], [3, 5, 2], [1, 4, 6]] = [[5, 5, 2.2], [0, 3.75, 1.8], [1, 4, 6]]. T denotes the transpose matrix of Q.
[0028] In this example, R = Q T × B = [[0.8, 0.6, 0], [-0.6, 0.8, 0], [0, 0, 1]] × [[4, 2, 1], [3, 5, 2], [1, 4, 6]] = [[5, 5, 2.2], [0, 3.75, 1.8], [1, 4, 6]].
[0029] The norm difference between matrix P and the principal lattice basis matrix B is calculated. The matrix norm can use the Frobenius norm, which is the square root of the sum of the squares of all elements in the matrix. In this example, P is identical to B, so the norm difference is 0. Determine whether the norm difference is less than the preset stability threshold parameter ε. Assuming ε = 0.001, since the norm difference is 0, which is less than ε, the principal lattice basis matrix decomposition is completed. At this time, the principal lattice basis matrix B has been decomposed into B = Q × R, where Q is an orthogonal matrix and R is an upper triangular matrix.
[0030] In practical applications, multiple iterations are needed to improve the accuracy of the orthogonalization process. The orthogonal matrix Q and the upper triangular matrix R are updated in each iteration until the norm difference is less than the stability threshold parameter ε. In addition, similar operations can be performed on the auxiliary lattice basis matrix C to decompose it into an orthogonal matrix and an upper triangular matrix for subsequent lattice cryptography applications, such as lattice basis reduction, shortest vector problem solving, etc.
[0031] Through the method provided by the present application, the principal lattice basis matrix and the auxiliary lattice basis matrix can be effectively generated, and the principal lattice basis matrix can be decomposed into an upper triangular matrix and an orthogonal matrix, providing the necessary mathematical foundation for the application of lattice cryptography. This method has the characteristics of high computational efficiency and good numerical stability, and is suitable for various lattice cryptography application scenarios.
[0032] In an alternative embodiment, a homomorphic encryption key is generated based on the orthogonal matrix, mapped to a Riemannian manifold to obtain an orthogonal metric tensor, and combined with the auxiliary lattice basis matrix to calculate an encryption strength; the upper triangular matrix is iteratively optimized to obtain an optimal key state, and the homomorphic encryption key is combined with the optimal key state to obtain a hybrid encryption key, including: The inner product of the row vectors of the orthogonal matrix and the random integer coefficients is calculated to obtain a homomorphic encryption key, and the homomorphic encryption key is mapped to a Riemannian manifold to obtain an orthogonal metric tensor; the square root of the sum of the squares of all elements of the auxiliary lattice basis matrix is calculated, and multiplied by the orthogonal metric tensor to obtain an encryption strength; The diagonal elements of the upper triangular matrix are taken as the initial key state, and the difference between the Ricci curvature of the initial key state and the second derivative thereof is taken as the evolution speed; the evolution speed is accumulated to the initial key state to obtain the key state at the next time, and the accumulation operation is repeated until the evolution speed is less than a convergence threshold; The curvature energy of all key states is integrated on the Riemannian manifold, and the key state corresponding to the minimum curvature energy value is selected as the optimal key state, and is linearly combined with the homomorphic encryption key according to the encryption strength to generate a hybrid encryption key.
[0033] The embodiment provides a method for generating a hybrid encryption key based on an orthogonal matrix, which realizes high-strength encryption protection through Riemannian manifold mapping and key state optimization.
[0034] In this embodiment, it is assumed that the orthogonal matrix is an 8x8 matrix, and the row vectors thereof are orthogonal to each other and have a length of 1. The first row of the orthogonal matrix is (0.35, 0.28, -0.42, 0.31, 0.52, -0.29, 0.18, 0.33), the second row is (0.29, -0.51, 0.23, 0.44, -0.26, 0.38, -0.31, 0.32), and so on.
[0035] A set of 8 random integer coefficients is generated, such as c=(15, 23, 7, 18, 29, 12, 9, 25). The inner product of each row vector of the orthogonal matrix and the set of random integer coefficients c is calculated to obtain a homomorphic encryption key k. Specifically, for the ith row vector of the orthogonal matrix and the integer coefficient vector c, the inner product thereof is calculated to obtain the ith element of the key k. For example, k1=0.35x15+0.28x23+(-0.42)x7+0.31x18+0.52x29+(-0.29)x12+0.18x9+0.33x25=25.492. The complete homomorphic encryption key k is obtained in the same manner.
[0036] Mapping the homomorphic encryption key k onto a Riemannian manifold yields an orthogonal metric tensor G. This mapping is achieved by constructing a metric tensor at a given point using the elements of k as coordinates. In this example, since k is an 8-dimensional vector, G is an 8×8 matrix, where the diagonal elements of G represent the metric along the corresponding direction, and the off-diagonal elements represent the correlation between different coordinate directions. To ensure orthogonality, G is set as a diagonal matrix with diagonal elements g. ii =exp(k i 2 / σ 2 ), where σ is the smoothing parameter, with a value of 5.0. For example, g 11 =exp((25.492) 2 / 25)=exp(25.992)=1.94×10 11 .
[0037] In this embodiment, the auxiliary lattice base matrix is 8×8 in size and is used to calculate the encryption strength. For example, the auxiliary lattice base matrix can be set as follows: the first row is (3, 1, 0, 2, 1, 2, 0, 1), the second row is (1, 4, 2, 0, 1, 0, 3, 2), and so on. The square root of the sum of squares of all elements in the auxiliary lattice base matrix is calculated, which is 12.806. Multiplying 12.806 by the orthogonal metric tensor G yields the encryption strength S = 12.806 × |det(G)|. (1 / 8) , where |det(G)| is the absolute value of the determinant of G. In this example, S = 2.48 × 10 8 .
[0038] The diagonal elements of the upper triangular matrix are used as the initial key state ψ0, for example, ψ0=(2.5, 3.1, 1.8, 2.2, 3.7, 1.5, 2.9, 3.4). The system calculates the Ricci curvature Ric(ψ0) and its second derivative ∇²ψ0 of ψ0, and calculates the difference between them as the evolution rate v0=Ric(ψ0)-∇²ψ0. In actual calculations, the Ricci curvature can be obtained from the metric tensor G and its first and second derivatives, while the second derivative can be approximated by the finite difference method. Assuming an initial evolution rate v0 = (0.82, -0.53, 0.67, -0.41, 0.58, -0.72, 0.49, -0.61), the system accumulates v0 into the initial state ψ0 to obtain the key state ψ1 = ψ0 + Δt × v0 at the next time step, where Δt is the time step size, set to 0.05. Therefore, ψ1 = (2.541, 3.074, 1.834, 2.180, 3.729, 1.464, 2.925, 3.370).
[0039] The evolution speed v1 corresponding to ψ1 is continuously calculated, and the cumulative operation is performed to obtain ψ2, and the iteration is continued. Assuming that after 50 iterations, the maximum absolute value of the evolution speed is reduced to below 0.001 (less than the preset convergence threshold 0.001), the iteration stops. At this time, the key state sequence is {ψ0, ψ1,..., ψ 50}.
[0040] Integrating all key states on the Riemannian manifold, the curvature energy E i =∫R(ψ i )dV is calculated, where R(ψ i ) is the scalar curvature corresponding to the i-th state, and dV is the volume element. For example, E0=387.6, E1=375.2,..., E 50 =128.9 are calculated. The state with the minimum curvature energy, i.e. E 50 , is selected, and the corresponding ψ 50 is taken as the optimal key state ψ opt =(2.832, 2.951, 2.104, 2.367, 3.526, 1.912, 3.081, 3.221).
[0041] The homomorphic encryption key k and the optimal key state ψ opt are linearly combined according to the encryption strength S to generate a hybrid encryption key h. The specific combination method is h=α×k+(1-α)×S×ψ opt , where α is a weight parameter, set to 0.6. For example, h1=0.6×25.492+(1-0.6)×2.48×10 8 ×2.832=2.81×10 8 . Similarly, the complete hybrid encryption key h is calculated.
[0042] The hybrid encryption key h generated by this method combines the advantages of the homomorphic encryption key and the geometrically optimized key state, and has high security and anti-cracking ability. The encryption system using this key can resist common cryptanalysis attacks, and the key distribution and management process has good controllability.
[0043] Figure 2 The flowchart of the key state optimization method based on Riemannian manifold is shown. In an optional embodiment, the curvature energy is obtained by integrating all key states on the Riemannian manifold, the key state corresponding to the minimum curvature energy value is selected as the optimal key state, and the linear combination of the homomorphic encryption key and the encryption strength is performed to generate a hybrid encryption key, including: mapping all key states to a multi-dimensional Riemannian manifold space through a mapping function; extracting a plurality of local coordinate components from the key states based on the mapping function, respectively calculating the product of the plurality of local coordinate components and the corresponding coordinate basis vector and summing up to obtain a local key; calculating the inner product between adjacent coordinate basis vectors according to the local key to generate a Riemann curvature tensor; calculating the square of the modulus value of the Riemann curvature tensor, and integrating the square of the modulus value on the entire Riemann manifold to obtain a curvature energy value; selecting the key state corresponding to the minimum curvature energy value as the optimal key state; dividing the exponential decay value of the curvature energy value by the encryption strength and the sum of the exponential decay value of the curvature energy value to obtain a mixing coefficient; and linearly combining the optimal key state and the homomorphic encryption key according to the mixing coefficient to output a mixed encryption key.
[0044] The present application provides a method for optimizing key states on a Riemannian manifold, which generates a mixed encryption key by calculating the minimum curvature energy. The method maps all key states to a multi-dimensional Riemannian manifold space, and then processes based on a specific mapping function to finally obtain an optimal mixed encryption key.
[0045] In a specific implementation, in order to map the key state to the Riemannian manifold space, a nonlinear mapping function is used. Taking a 256-bit key state as an example, it is represented in hexadecimal form: 7A9C4E2F8B1D5036A7C9E2F8D1B5340729AE1F8D3B5C6079E2F1D8A4B6C3059. The key state can be regarded as a point in a high-dimensional space, which needs to be converted to a Riemannian manifold space through a suitable mapping function. In this embodiment, an 8-dimensional Riemannian manifold is selected as the target space, and a mapping function is constructed. The mapping function divides the 256-bit key state into 8 groups, each group has 32 bits, and a nonlinear transformation is applied to each group. Specifically, each group of 32 bits is converted into a real number between 0 and 1 as the coordinate value of the corresponding dimension. For the example key, the 8 coordinate values are: (0.478, 0.305, 0.729, 0.186, 0.645, 0.392, 0.527, 0.841). These coordinate values define the position of the key in the 8-dimensional Riemannian manifold. A local coordinate transformation matrix is applied to the 8 coordinate values. For the example data, the local coordinate components obtained after transformation are: (0.512, 0.367, 0.703, 0.225, 0.618, 0.433, 0.494, 0.826).
[0046] The local key is computed based on the extracted local coordinate components and the corresponding coordinate basis vectors. Coordinate basis vectors are unit vectors that describe the local coordinate system. For an 8-dimensional space, there are 8 basis vectors e1 to e8, each of which is also 8-dimensional. The system pre-defines a set of standard basis vectors, e.g., e1 = (1, 0, 0, 0, 0, 0, 0, 0), e2 = (0, 1, 0, 0, 0, 0, 0, 0), and so on. The process of computing the local key is to multiply each local coordinate component with the corresponding basis vector and sum them up. For example, the first coordinate component 0.512 is multiplied with the basis vector e1 to get (0.512, 0, 0, 0, 0, 0, 0, 0), the second coordinate component 0.367 is multiplied with the basis vector e2 to get (0, 0.367, 0, 0, 0, 0, 0, 0), and so on. The 8 resulting vectors are added up to get the local key (0.512, 0.367, 0.703, 0.225, 0.618, 0.433, 0.494, 0.826). To increase security, a rotation transformation is applied to the coordinate basis vectors, making the basis vectors no longer standard orthogonal basis. For example, after the rotation matrix transformation, the basis vector e1 becomes (0.94, 0.17, 0.12, 0.08, 0.21, 0.05, 0.03, 0.10). After applying similar transformations to all basis vectors, the local key is recomputed as K' = (0.482, 0.412, 0.658, 0.274, 0.593, 0.455, 0.478, 0.798). This rotation transformation increases the complexity of the key generation process and improves security.
[0047] The inner products between adjacent coordinate basis vectors are computed based on the local key, and the Riemann curvature tensor is generated. Inner product computation reflects the metric properties of the manifold and is the basis for constructing the curvature tensor. For the basis vectors after the rotation transformation, the inner products between adjacent basis vectors are computed. For example, the inner product of e1 and e2 is e1 · e2 = 0.94 × 0.23 + 0.17 × 0.91 + 0.12 × 0.15 + 0.08 × 0.17 + 0.21 × 0.08 + 0.05 × 0.12 + 0.03 × 0.21 + 0.10 × 0.07 = 0.436. Similarly, the inner products of all adjacent basis vector pairs are computed: e2 · e3 = 0.327, e3 · e4 = 0.512, e4 · e5 = 0.283, e5 · e6 = 0.391, e6 · e7 = 0.204, e7 · e8 = 0.376.
[0048] Based on the computed inner product values, the Riemann curvature tensor L is constructed. The Riemann curvature tensor L is a fourth-order tensor that describes the degree of curvature of the manifold. For an 8-dimensional space, the Riemann curvature tensor L has 8 4 = 4096 components, but due to its symmetry and antisymmetry, the number of independent components is greatly reduced. Specific computation rules are used to construct the components of L. Taking L 1234For example, its calculation involves the inner product relationship between e1, e2, e3, and e4: L 1234 = 0.5 x [(e1·e3)(e2·e4) - (e1·e4)(e2·e3) + (e1·e2)(e3·e4)] - (K'[1] x K'[2] x K'[3] x K'[4]), where K'[i] represents the i-th component of the local key. Substituting the numerical values: e1·e3 = 0.241, e2·e4 = 0.368, e1·e4 = 0.183, e2·e3 = 0.327, e1·e2 = 0.436, e3·e4 = 0.512, K'[1] = 0.482, K'[2] = 0.412, K'[3] = 0.658, K'[4] = 0.274. The calculation results in: L 1234 = 0.5 x [(0.241 x 0.368) - (0.183 x 0.327) + (0.436 x 0.512)] - (0.482 x 0.412 x 0.658 x 0.274) = 0.5 x [0.089 - 0.060 + 0.223] - 0.036 = 0.5 x 0.252 - 0.036 = 0.090.
[0049] The modulus square of the Riemann curvature tensor, which is the sum of the squares of all curvature components, is calculated. The modulus square of the Riemann curvature tensor is defined as the sum of the squares of all tensor components. In specific calculations, the square of each component is taken and summed. Considering the symmetry of the tensor, only independent components can be calculated, multiplied by the corresponding repetition count. Taking an 8-dimensional space as an example, after considering all symmetries of the tensor, the actual number of independent components to be calculated is about 336. For the calculated curvature tensor, some component values are: L 1234 = 0.090, L 1256 = -0.047, L 1357 = 0.068, L 2345 = 0.112, L 2468 = -0.083, L 3478 = 0.057. The squares of these components are calculated: L 1234 = 0.090 x 0.090 = 0.0081, L 1256 = (-0.047) x (-0.047) = 0.0022, L 1357 = 0.068 x 0.068 = 0.0046, and so on. Adding the square values of all independent components and considering the repetition count, the modulus square of the curvature tensor |L|² = 2.634 is obtained.
[0050] The modulus square of the curvature tensor is integrated over the entire Riemannian manifold to obtain the curvature energy value. In Riemannian geometry, integration over a manifold requires consideration of the manifold's metric and volume element. This embodiment employs a numerical integration method to discretize the 8-dimensional manifold into grid points and calculate the modulus square of the curvature tensor at each grid point for weighted summation. Ten sampling points are selected in each dimension to form a 10 8 dimensional grid. Due to the large amount of computation, the Monte Carlo integration method is used to randomly select 10,000 points for sampling calculation. At each sampling point, the local key, coordinate basis vector inner product, and Riemann curvature tensor are recalculated, and the modulus square is calculated. Each sampling point also needs to be multiplied by the corresponding volume element, which is the square root of the metric tensor determinant. For the example key state, the system calculates the weighted modulus square at 10,000 sampling points as: 2.634, 2.795, 2.412, 2.867, 3.021, 2.543,... Multiply these values by the corresponding volume element weight and sum them up to obtain the approximate value of the curvature energy E = 2.718. Repeat the above process for multiple key states to obtain a series of curvature energy values. Assuming the system analyzes 100 different key states, the curvature energy values range from 0.02 to 2.95, with the minimum value 0.02 corresponding to the key state "1101...0110". The system selects this key state as the optimal key state.
[0051] In the hybrid encryption key generation phase, the exponential decay value exp(-E) of the curvature energy value E needs to be calculated. For the energy value 0.02 corresponding to the optimal key state, the exponential decay value is exp(-0.02) = 0.9802. Assuming the user sets the encryption strength to 0.8, the hybrid coefficient a is calculated as 0.9802 / (0.8 + 0.9802) = 0.5507.
[0052] The optimal key state and the homomorphic encryption key are linearly combined according to the hybrid coefficient. If the optimal key state is K1 = "1101...0110" and the homomorphic encryption key is K2 = "0110...1001", then the hybrid encryption key K = a · K1 + (1-a) · K2 = 0.5507 · K1 + 0.4493 · K2. In actual implementation, for linear combination of binary bits, the probability selection method can be used: for each position, select the corresponding bit of K1 with probability a and select the corresponding bit of K2 with probability (1-a). For example, for the first bit, if the random number 0.63 > a (0.5507), select the first bit "0" of K2; for the second bit, if the random number 0.48 < a, select the second bit "1" of K1, and so on. The final hybrid encryption key combines the curvature optimal property and the homomorphic encryption property, providing stronger security and functionality.
[0053] In practical applications, the method can adjust the encryption strength parameter according to different security requirements to balance the homomorphic computing capability and security. Through the mathematical framework of Riemann geometry, the whole process realizes the optimized selection of the key state and improves the overall performance of the encryption system.
[0054] In an optional embodiment, the ciphertext data block is divided into multiple data segments, the hash value of each data segment is calculated as a leaf node, the hash values of adjacent leaf nodes are spliced and calculated layer by layer to obtain a root node value, comprising: The information entropy of the ciphertext data block is calculated, the product of the information entropy and the basic segment length is calculated, and the ciphertext data block is divided into multiple data segments according to the product; The number of connected components, the number of holes, the mean and the standard deviation of each data segment are taken as a topological feature vector, the data segment and the corresponding topological feature vector are spliced and a hash operation is performed to obtain the hash value of the leaf node; The Euclidean distance of the topological feature vectors corresponding to adjacent leaf nodes is calculated, the negative exponential operation result of the Euclidean distance is taken as a topological similarity, the topological similarity is divided by the sum of the topological similarities of the leaf node and its neighborhood nodes to obtain a merging weight, the hash values of adjacent leaf nodes are multiplied by the corresponding merging weights respectively and spliced, and a hash operation is performed to obtain the hash value of the parent node; The splicing and hash operation is repeatedly performed until only one node is left, and the hash value of the node is taken as the root node value.
[0055] The embodiment provides a data division and hash calculation method for dividing a ciphertext data block into multiple data segments and calculating the hash value of each data segment as a leaf node to construct a hash tree structure.
[0056] In the specific implementation process, in order to reasonably divide the ciphertext data block, the information entropy of the ciphertext data block needs to be calculated. The information entropy reflects the uncertainty degree of the data, which is obtained by calculating the probability distribution of different byte values in the ciphertext data. For example, for a ciphertext data block containing 1024 bytes, the number of times of each byte value (0-255) is counted, the probability of each byte value is calculated, and the information entropy is calculated according to the probability values. Assuming that the calculated information entropy value is 7.85 bits.
[0057] The information entropy value is multiplied by the preset basic segment length to obtain the actual segment size. The basic segment length can be set to 16 bytes, so the actual segment size is 16x7.85=125.6 bytes, rounded up to 126 bytes. In this way, the 1024-byte ciphertext data block is divided into 1024÷126≈8.13, i.e. 9 data segments, of which the first 8 segments are 126 bytes each, and the last segment is 1024-126x8=16 bytes.
[0058] For each data segment, its topological features need to be extracted. The data segment is regarded as a two-dimensional matrix, for example, a 126-byte data segment is arranged into a 9x14 matrix. The matrix is binarized by setting a threshold (e.g. the median), resulting in a binary image. Connected component analysis is performed on the binary image, and the number of connected regions is counted, for example, resulting in 12 connected components. The number of holes in the image, i.e. the number of background regions completely surrounded by connected regions, is calculated, assuming 5. At the same time, the mean and standard deviation of the original data segment are calculated, for example, the mean is 127.3 and the standard deviation is 58.9. Thus, the topological feature vector of the data segment is [12, 5, 127.3, 58.9].
[0059] After concatenating the data segment with its corresponding topological feature vector, the SHA-256 hash algorithm is executed, resulting in the leaf node hash value corresponding to the data segment. For example, the hash value calculated for the first data segment is "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069".
[0060] To construct the non-leaf nodes of the hash tree, the topological similarity of adjacent leaf nodes needs to be calculated. Take the first data segment (feature vector [12, 5, 127.3, 58.9]) and the second data segment (feature vector [14, 7, 138.2, 62.5]) as an example, the Euclidean distance is calculated: according to the sum of the squares of the differences of the two feature vectors and then taking the square root, the Euclidean distance is approximately 12.6, and performing negative exponential transformation, i.e. e (-12.6) ≈0.000003, as the topological similarity of the two data segments.
[0061] To determine the merging weight, the sum of the topological similarity of each leaf node and its adjacent nodes is calculated. For example, the sum of the topological similarity of the first node and its adjacent nodes (here only the second node) is 0.000003. The merging weight of the first node is 0.000003 ÷ 0.000003 = 1. The topological similarity of the second node and its adjacent nodes (the first and third nodes) is assumed to be 0.000003 + 0.000005 = 0.000008, so the merging weight of the first node corresponding to the second node is 0.000003 ÷ 0.000008 = 0.375.
[0062] The hash values of the first and second leaf nodes are multiplied by their corresponding merge weights respectively (in actual implementation, the hash values can be converted into numerical values before multiplication), and then concatenated, and a SHA-256 hash operation is performed on the concatenated result to obtain the parent node hash value. This process is repeated, and two adjacent nodes are selected for merging each time until only one node is left, and the hash value of the node is the root node value.
[0063] In practical applications, if the input ciphertext data block size is 2048 bytes, the calculated information entropy is 8.1, and the base fragment length is 16, then the actual fragment size is 16x8.1=129.6 bytes, rounded up to 130 bytes. After dividing the data block into 16 segments, the topological features of each segment are extracted, the hash value is calculated, and the hash tree is constructed according to the above rules. The final root node hash value can be used for data integrity verification or data digest generation in blockchain applications.
[0064] Through this method, not only the content information of the data is considered, but also the topological features of the data are integrated, making the generated hash value more unique and secure. At the same time, the dynamic fragmentation strategy based on information entropy makes the data division more reasonable, which can adapt to the characteristics of different types of ciphertext data, and improve the efficiency and accuracy of subsequent processing.
[0065] In an optional implementation, a plurality of leaf nodes are randomly selected to generate a plurality of verification paths; the local proof value of each verification path is calculated, and when the local proof value is greater than a confidence threshold, a zero-knowledge proof is generated, including: Starting from the root node, record all node hash values on the path leading to the target leaf node, and connect the nodes with node hash values greater than a preset screening threshold to generate a verification path; Cascade the hash values of adjacent nodes on the verification path to obtain a concatenated hash value; assign a depth weight coefficient to each node on the verification path, multiply the depth weight coefficient by the concatenated hash value, and sum the results to obtain the local proof value of the verification path; When the local proof value of each verification path is greater than a confidence threshold, a random string is generated; the node hash value of the verification path is mixed with the random string to obtain a commitment value, and the commitment value, the random string, the node hash value of the verification path, and the local proof value are output as a zero-knowledge proof.
[0066] In a method based on zero-knowledge proof, an efficient and secure verification mechanism is achieved by randomly selecting multiple leaf nodes and generating multiple verification paths. A Merkle tree is constructed, and the value of each non-leaf node of the tree is a combination of the hash values of its child nodes. Starting from the root node, the system records all the node hash values on the path leading to the target leaf node and filters out the nodes with hash values greater than a preset threshold to form a verification path.
[0067] In the implementation process, it is assumed that the depth of the Merkle tree is 8, and there are a total of 256 leaf nodes. Three leaf nodes are randomly selected, namely the 37th, 125th, and 219th leaf nodes. For the 37th leaf node, the system starts from the root node and records the node hash values on the path as 0x9a72f7d5cb96e40b8544c31c3895d0ab, 0x7b3c48465fc7bedf204f3c360ba02565, 0xd47efcde803d988178726e4634241997, and 0x9876543210abcdef0123456789abcdef. Among them, the first and third nodes have hash values greater than the filtering threshold, so the verification path includes these two nodes.
[0068] For the nodes on the verification path, the hash values of adjacent nodes are concatenated. Taking the above verification path as an example, the hash values of the two nodes are concatenated to obtain 0x9a72f7d5cb96e40b8544c31c3895d0abd47efcde803d988178726e4634241997. To calculate the local proof value, the system assigns a depth weight coefficient to each node, and the weight decreases with the increase of node depth. For example, the weight of the root node is 1.0, the weight of the first layer node is 0.8, the weight of the second layer node is 0.64, and so on.
[0069] For the verification path of the 37th leaf node, the first node is located at the root layer, and the weight is 1.0; the third node is located at the second layer, and the weight is 0.64. Multiply the weight of each node with the corresponding part of the concatenated hash value and sum them up to get the local proof value as 0.8704. Similarly, the local proof values of the 125th and 219th leaf nodes are calculated as 0.9152 and 0.8832, respectively.
[0070] The preset confidence threshold is 0.85, and the local proof values of all verification paths are checked to see if they are greater than the threshold. In this example, the local proof values of the three verification paths are 0.8704, 0.9152, and 0.8832, all of which are greater than the confidence threshold of 0.85, so the system can generate a zero-knowledge proof.
[0071] When generating the zero-knowledge proof, a 128-bit random string such as 0xe5c42a8b7f3d691024c8d5eb3fa79c62 is generated. The commitment value is calculated by mixing the node hash values of the verification paths with the random string. Specifically, the node hash values of the verification paths are XORed with the random string, and the SHA-256 hash value of the result is calculated to obtain the commitment value 0x2c7d8fe94b9a1a57e8ccb5f5e138c952e7c12c8dfa8c1a0f8a9b6f3e1d2a4c5b.
[0072] The zero-knowledge proof is outputted, including the following contents: the commitment value 0x2c7d8fe94b9a1a57e8ccb5f5e138c952e7c12c8dfa8c1a0f8a9b6f3e1d2a4c5b, the random string 0xe5c42a8b7f3d691024c8d5eb3fa79c62, the set of node hash values of the verification paths (including all filtered node hash values on the three paths) and the corresponding local proof values 0.8704, 0.9152 and 0.8832.
[0073] In the verification phase, after receiving the zero-knowledge proof, the verifier can repeat the above calculation process. The verifier uses the received node hash values and the random string to calculate the commitment value in the same way, and compares it with the received commitment value. At the same time, the verifier also calculates the local proof values and checks whether they are all greater than the confidence threshold. Only when the calculated commitment value matches and all local proof values are greater than the confidence threshold, the verification is considered to pass.
[0074] The advantage of this method is that it does not need to expose the structure of the entire Merkle tree, but only needs to provide part of the node information on the verification path to prove that a certain leaf node indeed exists in the tree, while protecting the privacy of other nodes. By randomly selecting multiple leaf nodes and verifying multiple paths, the security of the system is also enhanced, preventing single-point attacks. The introduction of the random string further improves the unpredictability and security of the protocol, ensuring that each generated proof is unique and cannot be replayed.
[0075] The privacy protection system of the hybrid encryption strategy according to an embodiment of the present application comprises: A first unit is configured to receive the to-be-encrypted data sent by the user terminal and divide the to-be-encrypted data into a plurality of data blocks. The second unit is configured to randomly select a prime number, generate a main lattice matrix and an auxiliary lattice matrix, decompose the main lattice matrix into an upper triangular matrix and an orthogonal matrix based on orthogonalization processing and matrix norm, generate a homomorphic encryption key based on the orthogonal matrix, map the homomorphic encryption key to a Riemann manifold to obtain an orthogonal metric tensor, calculate encryption strength in combination with the auxiliary lattice matrix, iteratively optimize the upper triangular matrix to obtain an optimal key state, combine the homomorphic encryption key and the optimal key state to obtain a hybrid encryption key; The third unit is configured to reconstruct the data block into a data vector, and perform vector inner product operation on the data vector and the hybrid encryption key to obtain a ciphertext data block. The fourth unit is configured to divide the ciphertext data block into a plurality of data segments, calculate a hash value of each data segment as a leaf node, splice the hash values of adjacent leaf nodes and calculate a root node value layer by layer, randomly select a plurality of leaf nodes to generate a plurality of verification paths, calculate a local proof value of each verification path, and generate a zero-knowledge proof when the local proof values are all greater than a confidence threshold. The fifth unit is configured to return the encrypted data to a user terminal, wherein the encrypted data includes the ciphertext data block, the hybrid encryption key, the root node value and the zero-knowledge proof.
[0076] In a third aspect, an electronic device is provided, including: a processor; a memory for storing processor-executable instructions; The processor is configured to invoke the instructions stored in the memory to execute the method described above.
[0077] In a fourth aspect, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.
[0078] The present application can be a method, device, system and / or computer program product. The computer program product can include a computer readable storage medium having computer readable program instructions loaded thereon for implementing various aspects of the present application.
[0079] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A privacy protection method using a hybrid encryption strategy, characterized in that, include: Receive data to be encrypted sent by the user terminal and divide it into multiple data blocks; Randomly select prime numbers to generate a primary lattice basis matrix and an auxiliary lattice basis matrix. Based on orthogonalization and matrix norm, decompose the primary lattice basis matrix into an upper triangular matrix and an orthogonal matrix. A homomorphic encryption key is generated based on the orthogonal matrix, and mapped to a Riemannian manifold to obtain an orthogonal metric tensor. The encryption strength is calculated by combining the auxiliary lattice basis matrix. The upper triangular matrix is iteratively optimized to obtain the optimal key state. The homomorphic encryption key is combined with the optimal key state to obtain a hybrid encryption key. The data block is reconstructed into a data vector, and a vector inner product operation is performed with the hybrid encryption key to obtain the ciphertext data block. The encrypted data block is divided into multiple data segments. The hash value of each data segment is calculated as a leaf node. The hash values of adjacent leaf nodes are concatenated and calculated layer by layer to obtain the root node value. Multiple leaf nodes are randomly selected to generate multiple verification paths. Calculate the local proof value for each verification path. When all the local proof values are greater than the confidence threshold, generate a zero-knowledge proof. Encrypted data is returned to the user terminal, the encrypted data including the ciphertext data block, the hybrid encryption key, the root node value, and the zero-knowledge proof.
2. The method according to claim 1, characterized in that, Randomly select prime numbers to generate the principal lattice basis matrix and auxiliary lattice basis matrix. Based on orthogonalization and matrix norm, decompose the principal lattice basis matrix into an upper triangular matrix and an orthogonal matrix, including: Select a first prime number to generate an initial invertible matrix, calculate the determinant of the initial invertible matrix, and when the result of taking the determinant modulo the first prime number is not zero, use the initial invertible matrix as the primary lattice basis matrix; select a second prime number to generate a diagonal matrix, and multiply the primary lattice basis matrix with the diagonal matrix to obtain the auxiliary lattice basis matrix; The primary lattice basis matrix is orthogonalized to obtain an orthogonal matrix; an upper triangular matrix is calculated based on the orthogonal matrix and the primary lattice basis matrix; the norm difference between the product of the upper triangular matrix and the orthogonal matrix and the primary lattice basis matrix is calculated, and the primary lattice basis matrix decomposition is completed when the norm difference is less than the stability threshold parameter.
3. The method according to claim 1, characterized in that, Based on the orthogonal matrix, a homomorphic encryption key is generated, which is then mapped to a Riemannian manifold to obtain an orthogonal metric tensor. The encryption strength is then calculated by combining the auxiliary lattice basis matrix. The upper triangular matrix is iteratively optimized to obtain the optimal key state. The homomorphic encryption key is then combined with the optimal key state to obtain a hybrid encryption key, including: The homomorphic encryption key is obtained by performing an inner product operation between the row vectors of the orthogonal matrix and random integer coefficients. The homomorphic encryption key is then mapped onto a Riemannian manifold to obtain an orthogonal metric tensor. The encryption strength is obtained by taking the square root of the sum of the squares of all elements of the auxiliary lattice basis matrix and multiplying it with the orthogonal metric tensor. The diagonal elements of the upper triangular matrix are used as the initial key state. The difference between the Ricci curvature and the second derivative of the initial key state is used as the evolution rate. The evolution rate is accumulated to the initial key state to obtain the key state at the next time step. The accumulation operation is repeated until the evolution rate is less than the convergence threshold. The curvature energy is obtained by integrating all key states on the Riemannian manifold. The key state corresponding to the minimum curvature energy value is selected as the optimal key state, and then linearly combined with the homomorphic encryption key according to the encryption strength to generate a hybrid encryption key.
4. The method according to claim 3, characterized in that, Integrating over all key states on the Riemannian manifold yields the curvature energy. The key state corresponding to the minimum curvature energy is selected as the optimal key state, and linearly combined with the homomorphic encryption key according to the encryption strength to generate a hybrid encryption key, including: All key states are mapped to a multidimensional Riemannian manifold space using a mapping function; based on the mapping function, multiple local coordinate components are extracted from the key states, and the products of the multiple local coordinate components and their corresponding coordinate basis vectors are calculated and summed to obtain the local key; the inner product between adjacent coordinate basis vectors is calculated based on the local key to generate the Riemann curvature tensor. Calculate the square of the modulus of the Riemann curvature tensor, integrate the square of the modulus over the entire Riemann manifold to obtain the curvature energy value; select the key state corresponding to the minimum curvature energy value as the optimal key state; Divide the exponential decay value of the curvature energy value by the sum of the encryption strength and the exponential decay value of the curvature energy value to obtain the mixing coefficient; combine the optimal key state and the homomorphic encryption key linearly according to the mixing coefficient to output the hybrid encryption key.
5. The method according to claim 1, characterized in that, The encrypted data block is divided into multiple data segments. The hash value of each data segment is calculated as a leaf node. The hash values of adjacent leaf nodes are concatenated and the root node value is calculated layer by layer, including: Calculate the information entropy of the ciphertext data block, calculate the product of the information entropy and the basic fragment length, and divide the ciphertext data block into multiple data segments according to the product; The number of connected components, number of holes, mean, and standard deviation of each data segment are used as topological feature vectors. The data segments are concatenated with the corresponding topological feature vectors and a hash operation is performed to obtain the hash value of the leaf nodes. Calculate the Euclidean distance between the topological feature vectors corresponding to adjacent leaf nodes, use the negative exponent of the Euclidean distance as the topological similarity, divide the topological similarity by the sum of the topological similarities between the leaf node and its neighboring nodes to obtain the merging weight, multiply the hash values of adjacent leaf nodes by their corresponding merging weights and concatenate them, and perform a hash operation to obtain the hash value of the parent node. Repeat the concatenation and hashing operations until only one node remains, and use the hash value of that node as the root node value.
6. The method according to claim 1, characterized in that, Randomly select multiple leaf nodes to generate multiple verification paths; Calculate the local proof value for each verification path. When all local proof values are greater than a confidence threshold, generate a zero-knowledge proof, including: Starting from the root node, record the hash values of all nodes on the path to the target leaf node, and connect the nodes whose hash values are greater than the preset filtering threshold to generate a verification path. The hash values of adjacent nodes on the verification path are concatenated and concatenated to obtain a concatenated hash value; a depth weight coefficient is assigned to each node on the verification path, and the depth weight coefficient is multiplied by the concatenated hash value and summed to obtain the local proof value of the verification path; When the local proof value of each verification path is greater than the confidence threshold, a random string is generated; the node hash value of the verification path is mixed with the random string to calculate the commitment value; the commitment value, the random string, the node hash value of the verification path, and the local proof value are output as a zero-knowledge proof.
7. A privacy protection system with a hybrid encryption strategy, used to implement the method as described in any one of claims 1-6, characterized in that, include: The first unit is used to receive the data to be encrypted sent by the user terminal and divide it into multiple data blocks; The second unit is used to randomly select prime numbers to generate the primary lattice basis matrix and the auxiliary lattice basis matrix. Based on orthogonalization and matrix norm, the primary lattice basis matrix is decomposed into an upper triangular matrix and an orthogonal matrix. A homomorphic encryption key is generated based on the orthogonal matrix, and mapped to a Riemannian manifold to obtain an orthogonal metric tensor. The encryption strength is calculated by combining the auxiliary lattice basis matrix. The upper triangular matrix is iteratively optimized to obtain the optimal key state. The homomorphic encryption key is combined with the optimal key state to obtain a hybrid encryption key. The third unit is used to reconstruct the data block into a data vector and perform a vector inner product operation with the hybrid encryption key to obtain a ciphertext data block. The fourth unit is used to divide the encrypted data block into multiple data segments, calculate the hash value of each data segment as a leaf node, concatenate the hash values of adjacent leaf nodes and calculate the root node value layer by layer; randomly select multiple leaf nodes to generate multiple verification paths. Calculate the local proof value for each verification path. When all the local proof values are greater than the confidence threshold, generate a zero-knowledge proof. The fifth unit is used to return encrypted data to the user terminal. The encrypted data includes the ciphertext data block, the hybrid encryption key, the root node value, and the zero-knowledge proof.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
User data protection method for secure computer
CN118568130A
Privacy protection method and system based on big data security and privacy calculation
CN119128960A
Progressive privacy calculation method and system for virtual-real fusion scene of intelligent sweeper
CN119945808A
Non-interactive zero-knowledge proving method for universal mixed relationship
CN120200756A
WebRTC-based vehicle-mounted video stream secure transmission management method
CN120434052A