A privacy protection method and system of hybrid encryption strategy
By employing a hybrid encryption strategy, homomorphic encryption keys are generated using the main lattice basis matrix and Riemannian manifold. Combined with hash trees and zero-knowledge proofs, the problems of data security and privacy protection in the cloud computing environment are solved, achieving efficient data encryption and integrity verification.
Patent Information
- Application Number
- CN202511516099.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-10-23
AI Technical Summary
Existing technologies struggle to provide efficient and secure encryption methods for data security and privacy protection in cloud computing and distributed storage environments, particularly in terms of resistance to quantum computing and data integrity verification.
A hybrid encryption strategy is adopted. By generating a primary lattice basis matrix and an auxiliary lattice basis matrix, and combining orthogonalization processing and Riemannian manifold, a homomorphic encryption key is generated. A hash tree structure and zero-knowledge proof are constructed to realize the encryption and verification of data blocks.
It enhances encryption strength, prevents key cracking, ensures secure data transmission, supports efficient data integrity verification and privacy protection, and strengthens the system's credibility.
Smart Images

Figure CN121000522B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security, and particularly relates 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 ensure 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:
[0006] Receiving encrypted data sent by a user terminal, and dividing it into multiple data blocks;
[0007] 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;
[0008] Reconstructing the data blocks into a data vector, and performing a vector inner product operation on the data vector and the hybrid encryption key to obtain a ciphertext data block;
[0009] 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.
[0010] returning encrypted data to the user terminal, the encrypted data comprising the ciphertext data block, the hybrid encryption key, the root node value and the zero-knowledge proof.
[0011] randomly selecting a prime number, generating a main lattice basis matrix and an auxiliary lattice basis matrix, based on orthogonalization processing and matrix norm, decomposing the main lattice basis matrix into an upper triangular matrix and an orthogonal matrix, comprising:
[0012] selecting a first prime number, generating an initial invertible matrix, calculating the determinant value of the initial invertible matrix, when the result of the determinant value modulo the first prime number is not zero, taking the initial invertible matrix as the main lattice basis matrix; selecting a second prime number, generating a diagonal matrix, multiplying the main lattice basis matrix and the diagonal matrix to obtain the auxiliary lattice basis matrix;
[0013] performing orthogonalization processing on the main lattice basis matrix to obtain an orthogonal matrix; based on the orthogonal matrix and the main lattice basis matrix, calculating an upper triangular matrix; calculating 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, completing the main lattice basis matrix decomposition.
[0014] based on the orthogonal matrix, generating a homomorphic encryption key, mapping it to Riemann manifold to obtain an orthogonal metric tensor, combining the auxiliary lattice basis matrix to calculate the encryption strength; iteratively optimizing the upper triangular matrix to obtain the optimal key state, combining the homomorphic encryption key and the optimal key state to obtain the hybrid encryption key, comprising:
[0015] performing inner product operation on the row vectors of the orthogonal matrix and random integer coefficients to obtain a homomorphic encryption key, mapping the homomorphic encryption key to Riemann manifold to obtain an orthogonal metric tensor; square sum of all elements of the auxiliary lattice basis matrix and square root, and multiply by the orthogonal metric tensor to obtain the encryption strength;
[0016] taking the diagonal elements of the upper triangular matrix as the initial key state, taking the difference between the initial key state and the second derivative of its Ricci curvature as the evolution speed; adding the evolution speed to the initial key state to obtain the key state at the next time, repeating the accumulation operation until the evolution speed is less than the convergence threshold;
[0017] integrating all key states on Riemann manifold to obtain curvature energy, selecting the key state corresponding to the minimum curvature energy value as the optimal key state, and linearly combining the homomorphic encryption key according to the encryption strength to generate a hybrid encryption key.
[0018] Integrating all key states on a Riemannian manifold obtains curvature energy, selecting the key state corresponding to the minimum curvature energy value as the optimal key state, and linearly combining the homomorphic encryption key with the optimal key state according to the encryption strength to generate a hybrid encryption key, comprising:
[0019] Mapping all key states to a multi-dimensional Riemannian manifold space through a mapping function; based on the mapping function, extracting a plurality of local coordinate components from the key states, respectively calculating the product of the plurality of local coordinate components and the corresponding coordinate basis vectors and summing them 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;
[0020] Calculating the modulus square of the Riemann curvature tensor, and integrating the modulus square on the entire Riemannian manifold to obtain a curvature energy value; selecting the key state corresponding to the minimum curvature energy value as the optimal key state;
[0021] Dividing the encryption strength by the exponential decay value of the curvature energy value, and the sum of the encryption strength and the exponential decay value of the curvature energy value obtains a hybrid coefficient; linearly combining the optimal key state and the homomorphic encryption key according to the hybrid coefficient to output a hybrid encryption key.
[0022] Divide the ciphertext data block into a plurality of 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 and layer by layer, comprising:
[0023] 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 a plurality of data segments according to the product;
[0024] The number of connected components, the number of cavities, the mean and the standard deviation of each data segment are taken as the topological feature vector, and the data segment and the corresponding topological feature vector are spliced and hashed to obtain the hash value of the leaf node;
[0025] 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 the merging weight, multiply the hash values of adjacent leaf nodes by the corresponding merging weights respectively and concatenate to perform hash operation to obtain the hash value of the parent node;
[0026] Repeat the splicing and hash operation until only one node is left, and take the hash value of the node as the root node value.
[0027] Randomly select multiple leaf nodes to generate multiple verification paths; calculate the local proof value of each verification path, and when the local proof value is greater than a confidence threshold, generate a zero-knowledge proof, comprising:
[0028] Starting from the root node, record all node hash values on the path leading to the target leaf node, and connect the nodes with a node hash value greater than a preset screening threshold to generate a verification path;
[0029] Cascade the hash values of adjacent nodes on the verification path to obtain a cascade hash value; assign a depth weight coefficient to each node on the verification path, multiply the depth weight coefficient by the cascade hash value, and sum to obtain the local proof value of the verification path;
[0030] 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 a zero-knowledge proof.
[0031] In a second aspect of the embodiments of the application, a privacy protection system with a hybrid encryption strategy is provided, comprising:
[0032] A first unit is configured to receive data to be encrypted sent by a user terminal and divide the data into multiple data blocks;
[0033] 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 the 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;
[0034] A third unit is configured to reconstruct the data blocks into a data vector, and perform a vector inner product operation on the data vector and the hybrid encryption key to obtain a ciphertext data block;
[0035] A fourth unit is configured to 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 when the local proof value is greater than a confidence threshold, generate a zero-knowledge proof;
[0036] A fifth unit configured to return encrypted data to the user terminal, the encrypted data comprising the ciphertext data block, the hybrid encryption key, the root node value and the zero-knowledge proof.
[0037] A third aspect of the embodiments of the present application,
[0038] An electronic device is provided, comprising:
[0039] A processor;
[0040] A memory for storing processor-executable instructions;
[0041] The processor is configured to invoke the instructions stored in the memory to perform the method described above.
[0042] A fourth aspect of the embodiments of the present application,
[0043] 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.
[0044] The beneficial effects of the present application are as follows:
[0045] The present application divides the data into multiple data blocks and adopts a hybrid encryption strategy combining a main lattice matrix and an auxiliary lattice matrix, thereby realizing a more efficient data protection mechanism, significantly improving the encryption strength, effectively preventing the key from being cracked, and ensuring the safety of data transmission.
[0046] The present application maps the homomorphic encryption key to the Riemann manifold and combines the upper triangular matrix iterative optimization, thereby realizing the dynamic adjustment of the key state, enhancing the anti-attack ability of the encryption algorithm, while maintaining the computing efficiency, so that the encryption process is both safe and efficient.
[0047] The present application constructs a hash tree structure of data segments and generates a zero-knowledge proof, thereby realizing the verification of data integrity without revealing the original data content, enhancing the privacy protection ability, while supporting the efficient verification of data authenticity by a third party, and improving the overall credibility of the system. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 A flowchart of a privacy protection method of a hybrid encryption strategy according to an embodiment of the present application;
[0049] Figure 2 A flowchart of a key state optimization method based on Riemann manifold. DETAILED DESCRIPTION
[0050] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0051] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and some embodiments can not be described again for the same or similar concepts or processes.
[0052] Figure 1 A flowchart of a privacy protection method of a hybrid encryption strategy according to an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 1
[0053] Receiving the to-be-encrypted data sent by the user terminal and dividing the data into multiple data blocks;
[0054] 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 the key to a Riemann manifold to obtain an orthogonal metric tensor, calculating the encryption strength in combination with the auxiliary lattice basis matrix, and iteratively optimizing the upper triangular matrix to obtain an optimal key state, combining the homomorphic encryption key and the optimal key state to obtain a hybrid encryption key;
[0055] Reconstructing the data blocks into a data vector, performing vector inner product operation on the data vector and the hybrid encryption key to obtain a ciphertext data block;
[0056] 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.
[0057] Returning the encrypted data to the user terminal, wherein the encrypted data includes the ciphertext data block, the hybrid encryption key, the root node value and the zero-knowledge proof.
[0058] In an optional embodiment, 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, includes:
[0059] selecting a first prime number, generating an initial invertible matrix, calculating a determinant value of the initial invertible matrix, when the determinant value is not zero after the result of the determinant value modulo the first prime number, taking the initial invertible matrix as a main lattice basis matrix; selecting a second prime number, generating a diagonal matrix, multiplying the main lattice basis matrix and the diagonal matrix to obtain an auxiliary lattice basis matrix;
[0060] performing an orthogonalization process on the main lattice basis matrix to obtain an orthogonal matrix; based on the orthogonal matrix and the main lattice basis matrix, calculating an upper triangular matrix; calculating a norm difference value between 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, completing the main lattice basis matrix decomposition.
[0061] The application provides a method for randomly selecting a prime number, generating a main lattice basis matrix and an auxiliary lattice basis matrix, and decomposing the main lattice basis matrix into an upper triangular matrix and an orthogonal matrix based on an orthogonalization process and a matrix norm.
[0062] 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 3*3 matrix, as shown in the following: 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) = 4*5*6 + 2*2*1 + 1*3*4 - 1*5*1 - 4*2*6 - 3*4*2 = 120 + 4 + 12 - 5 - 48 - 24 = 59.
[0063] It is judged 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]].
[0064] 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]].
[0065] The primary lattice basis matrix B is multiplied by a diagonal matrix D to obtain a secondary lattice basis matrix C. In this example, C = B x D = [[4 x 23, 2 x 23, 1 x 23], [3 x 23, 5 x 23, 2 x 23], [1 x 23, 4 x 23, 6 x 23]] = [[92, 46, 23], [69, 115, 46], [23, 92, 138]].
[0066] An orthogonalization process is performed on the primary lattice basis matrix B to obtain an orthogonal matrix Q. The orthogonalization process can employ the Gram-Schmidt orthogonalization method. In this method, the column vectors of the primary lattice basis matrix B are taken and each column vector is projected onto the orthogonal complement of the space of already orthogonalized column vectors by iterative calculation. Each orthogonal vector is normalized to obtain a unit orthogonal vector. Through the orthogonalization process, the orthogonal matrix Q is obtained. Assume 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 primary lattice basis matrix B, an upper triangular matrix R is calculated. The upper triangular matrix R can be calculated by R = Q T x B, where Q T represents the transpose matrix of Q.
[0067] In this example, R = Q T x B = [[0.8, 0.6, 0], [-0.6, 0.8, 0], [0, 0, 1]] x [[4, 2, 1], [3, 5, 2], [1, 4, 6]] = [[5, 5, 2.2], [0, 3.75, 1.8], [1, 4, 6]]. The product of the upper triangular matrix R and the orthogonal matrix Q is calculated to obtain a matrix P = Q x R. In this example, P = Q x R = [[0.8, -0.6, 0], [0.6, 0.8, 0], [0, 0, 1]] x [[5, 5, 2.2], [0, 3.75, 1.8], [1, 4, 6]] = [[4, 2, 1], [3, 5, 2], [1, 4, 6]].
[0068] The norm difference between the matrix P and the base 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. It is determined whether the norm difference is less than a preset stability threshold parameter ε. Assuming ε = 0.001, since the norm difference is 0, which is less than ε, the base matrix decomposition is completed. At this time, the base matrix B has been decomposed into B = Q x R, where Q is an orthogonal matrix and R is an upper triangular matrix.
[0069] 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 also 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.
[0070] The method provided by the present application can effectively generate the main lattice basis matrix and the auxiliary lattice basis matrix, and decompose the main lattice basis matrix 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.
[0071] In an optional implementation, a homomorphic encryption key is generated based on the orthogonal matrix, which is mapped to a Riemann manifold to obtain an orthogonal metric tensor, and the encryption strength is calculated in combination with the auxiliary lattice basis matrix; the upper triangular matrix is iteratively optimized to obtain an optimal key state, and the homomorphic encryption key and the optimal key state are combined to obtain a hybrid encryption key, including:
[0072] The row vectors of the orthogonal matrix are subjected to an inner product operation with random integer coefficients to obtain a homomorphic encryption key, which is mapped to a Riemann 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;
[0073] The diagonal elements of the upper triangular matrix are taken as an initial key state, and the difference between the Ricci curvature of the initial key state and the second derivative thereof is taken as an evolution speed; the evolution speed is accumulated to the initial key state to obtain a key state at the next time, and the accumulation operation is repeatedly performed until the evolution speed is less than a convergence threshold value;
[0074] The curvature energy of all key states is integrated on the Riemann manifold, and the key state corresponding to the minimum curvature energy value is selected as the optimal key state, and the homomorphic encryption key is linearly combined with the optimal key state according to the encryption strength to generate a hybrid encryption key.
[0075] This embodiment provides a method for generating hybrid encryption keys based on orthogonal matrices. Through Riemannian manifold mapping and key state optimization, it achieves high-strength encryption protection.
[0076] In this implementation, the orthogonal matrix is assumed to be an 8×8 matrix, whose row vectors are orthogonal to each other and have a length of 1. Specifically, 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.
[0077] Generate a set of 8 random integer coefficients, such as c = (15, 23, 7, 18, 29, 12, 9, 25). Perform an inner product operation between each row vector of the orthogonal matrix and this set of random integer coefficients c to obtain the homomorphic encryption key k. Specifically, for the i-th row vector of the orthogonal matrix and the integer coefficient vector c, calculate their inner product to obtain the i-th element of the key k. For example, k1 = 0.35×15 + 0.28×23 + (-0.42)×7 + 0.31×18 + 0.52×29 + (-0.29)×12 + 0.18×9 + 0.33×25 = 25.492. Continue in this manner to obtain the complete homomorphic encryption key k.
[0078] 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 .
[0079] 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 .
[0080] 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).
[0081] Continue calculating the evolution velocity v1 corresponding to ψ1, and perform an accumulation operation to obtain ψ2, iterating in this way. Assume that after 50 iterations, the maximum absolute value of the evolution velocity drops below 0.001 (less than the preset convergence threshold of 0.001), and the iteration stops. At this point, the key state sequence is {ψ0, ψ1, ..., ψ...} 50}
[0082] Integrating over all key states on the Riemannian manifold, the curvature energy E is calculated. i =∫R(ψ i )dV, where R(ψ) i Let dV be the scalar curvature corresponding to the i-th state, and dV be the volume element. For example, we can calculate E0 = 387.6, E1 = 375.2, ..., E 50 =128.9. Choose the state with the minimum curvature energy, i.e., E. 50 The corresponding ψ 50 As the optimal key state ψopt = (2.832, 2.951, 2.104, 2.367, 3.526, 1.912, 3.081, 3.221).
[0083] The homomorphic encryption key k is combined with the optimal key state ψ opt According to the encryption strength S, a linear combination is generated to generate a hybrid encryption key h. The specific combination method is h = a x k + (1-a) x S x ψ opt , where a is a weight parameter, and is set to 0.6. For example, h1=0.6x25.492+(1-0.6)x2.48x10 8 x2.832=2.81x10 8 . Similarly, the complete hybrid encryption key h is calculated.
[0084] The hybrid encryption key h generated by this method combines the advantages of homomorphic encryption keys and geometrically optimized key states, 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.
[0085] Figure 2 The flowchart of the key state optimization method based on Riemannian manifold. In an optional embodiment, the curvature energy is obtained by integrating all key states on the Riemannian manifold, and the key state corresponding to the minimum curvature energy value is selected as the optimal key state. Linear combination is performed according to the encryption strength between the optimal key state and the homomorphic encryption key to generate a hybrid encryption key, comprising:
[0086] Map all key states to a multi-dimensional Riemannian manifold space through a mapping function; based on the mapping function, extract a plurality of local coordinate components from the key state, respectively calculate the sum of the products of the plurality of local coordinate components and the corresponding coordinate basis vectors 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;
[0087] Calculate the modulus square of the Riemann curvature tensor, and integrate the modulus square on the entire Riemannian manifold to obtain a curvature energy value; select the key state corresponding to the minimum curvature energy value as the optimal key state;
[0088] 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 a hybrid coefficient; linearly combine the optimal key state and the homomorphic encryption key according to the hybrid coefficient to output a hybrid encryption key.
[0089] The application provides a method for optimizing key states on a Riemannian manifold, and generates a hybrid encryption key by calculating the minimum value of 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 hybrid encryption key.
[0090] In a specific implementation, in order to map the key state to the Riemannian manifold space, a nonlinear mapping function is used. Take a 256-bit key state as an example, which 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 the Riemannian manifold space by a proper 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 having 32 bits, and applies a nonlinear transformation 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 on 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).
[0091] 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.
[0092] 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 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.
[0093] 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.
[0094] The modulus square of the Riemann curvature tensor is calculated, which is the sum of the squares of all curvature components. 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, and then 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.
[0095] 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 of 0.02 corresponding to the key state "1101...0110". The system selects this key state as the optimal key state.
[0096] 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 α is calculated as 0.9802 / (0.8 + 0.9802) = 0.5507.
[0097] 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 = α·K1 + (1-α)·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 α and select the corresponding bit of K2 with probability (1-α). For example, for the first bit, if the random number 0.63 > α (0.5507), select the first bit "0" of K2; for the second bit, if the random number 0.48 < α, 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.
[0098] 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.
[0099] In an optional implementation, 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, including:
[0100] 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;
[0101] 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;
[0102] 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;
[0103] 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.
[0104] 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.
[0105] 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 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 occurrences of each byte value (0-255) is counted, the probability of occurrence 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.
[0106] The information entropy value is multiplied by a preset base fragment length to obtain an actual fragment size. The base fragment length can be set to 16 bytes, so the actual fragment size is 16 x 7.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 fragments, of which the first 8 fragments are each 126 bytes, and the last fragment is 1024 - 126 x 8 = 16 bytes.
[0107] For each data fragment, its topological features need to be extracted. The data fragment is regarded as a two-dimensional matrix, for example, the 126-byte data fragment is arranged into a 9 x 14 matrix. The matrix is binarized by setting a threshold (such as the median) to obtain a binary image. The number of connected components is counted, for example, the number of connected components is 12. The number of holes in the image, i.e. the number of background regions completely surrounded by connected regions, is calculated, which is assumed to be 5. At the same time, the mean and standard deviation of the original data fragment are calculated, for example, the mean is 127.3 and the standard deviation is 58.9. In this way, the topological feature vector of the data fragment is [12, 5, 127.3, 58.9].
[0108] After concatenating the data fragment with its corresponding topological feature vector, the SHA-256 hash algorithm is executed to obtain the leaf node hash value corresponding to the data fragment. For example, the hash value calculated for the first data fragment is "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069".
[0109] To construct the non-leaf nodes of the hash tree, the topological similarity of adjacent leaf nodes needs to be calculated. Taking the first data fragment (feature vector [12, 5, 127.3, 58.9]) and the second data fragment (feature vector [14, 7, 138.2, 62.5]) as an example, the Euclidean distance between them is calculated: according to the sum of the squares of the differences between the two feature vectors and then taking the square root, the Euclidean distance is approximately 12.6, and the negative exponential transformation is performed, i.e. e (-12.6) ≈0.000003, which is the topological similarity of the two data fragments.
[0110] To determine the merging weight, the sum of the topological similarity of each leaf node and its adjacent node is calculated. For example, the sum of the topological similarity of the first node and its adjacent node (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, and the merging weight of the second node corresponding to the first node is 0.000003 ÷ 0.000008 = 0.375.
[0111] The hash values of the first and second leaf nodes are multiplied by their corresponding merging weights (in actual implementation, the hash values can be converted to numerical values before multiplication) and then concatenated, and SHA-256 hash operation is performed on the concatenated result to obtain the parent node hash value. Repeat this process, select two adjacent nodes to merge each time, until only one node is left, and the hash value of this node is the root node value.
[0112] 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 16 × 8.1 = 129.6 bytes, rounded up to 130 bytes. After dividing the data block into 16 segments, extract the topological features of each segment, calculate the hash value, and construct the hash tree 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.
[0113] 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.
[0114] 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:
[0115] 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;
[0116] Cascade the hash values of adjacent nodes on the verification path to obtain a cascade hash value; assign a depth weight coefficient to each node on the verification path, multiply the depth weight coefficient by the cascade hash value, and sum to obtain the local proof value of the verification path;
[0117] When the local proof value of each of the verification paths 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.
[0118] In a method based on zero-knowledge proof, an efficient and secure verification mechanism is realized by randomly selecting multiple leaf nodes and generating multiple verification paths. The method constructs a Merkle tree, 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 to the target leaf node, and filters out the nodes with hash values greater than the preset threshold to form the verification path.
[0119] In the specific implementation process, it is assumed that the depth of the Merkle tree is 8, and there are a total of 256 leaf nodes, and 3 leaf nodes are randomly selected, which are 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, 0x9876543210abcdef0123456789abcdef. Among them, the first and third nodes with hash values greater than the filtering threshold, so the verification path contains these two nodes.
[0120] 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. In order to calculate the local proof value, the system allocates a depth weight coefficient to each node, and the weight decreases with the increase of the 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.
[0121] 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 up to obtain the local proof value as 0.8704. Similarly, the local proof values of the 125th and 219th leaf nodes are calculated to be 0.9152 and 0.8832, respectively.
[0122] The preset confidence threshold is 0.85, and it is checked whether the local proof values of all verification paths 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 respectively, all of which are greater than the confidence threshold 0.85, so the system can generate zero-knowledge proof.
[0123] When generating zero-knowledge proof, a 128-bit random string such as 0xe5c42a8b7f3d691024c8d5eb3fa79c62 needs to be generated. The node hash values of each verification path are mixed and calculated with the random string to generate a commitment value. Specifically, the node hash values of the verification path are XORed with the random string, and the SHA-256 hash value of the result is calculated to obtain the commitment value 0x2c7d8fe94b9a1a57e8ccb5f5e138c952e7c12c8dfa8c1a0f8a9b6f3e1d2a4c5b.
[0124] The zero-knowledge proof is output, including the following contents: commitment value 0x2c7d8fe94b9a1a57e8ccb5f5e138c952e7c12c8dfa8c1a0f8a9b6f3e1d2a4c5b, random string 0xe5c42a8b7f3d691024c8d5eb3fa79c62, node hash value set of the verification path (including all filtered node hash values on the three paths) and the corresponding local proof values 0.8704, 0.9152 and 0.8832.
[0125] 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 value and 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 value 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.
[0126] 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.
[0127] The privacy protection system of the embodiment of the present application comprises:
[0128] The first unit is configured to receive data to be encrypted sent by a user terminal, divide the data into a plurality of data blocks;
[0129] 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, 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.
[0130] The third unit is configured to reconstruct the data blocks into data vectors, perform vector inner product operation on the data vectors and the hybrid encryption key to obtain ciphertext data blocks.
[0131] The fourth unit is configured to divide the ciphertext data blocks into a plurality of data segments, calculate a hash value of each data segment as a leaf node, splice hash values of adjacent leaf nodes and calculate root node values layer by layer, randomly select a plurality of leaf nodes to generate a plurality of verification paths, calculate local proof values of each verification path, and generate zero-knowledge proof when the local proof values are all greater than a confidence threshold.
[0132] The fifth unit is configured to return encrypted data to the user terminal, wherein the encrypted data includes the ciphertext data blocks, the hybrid encryption key, the root node values and the zero-knowledge proof.
[0133] In a third aspect of the embodiments of the present application, an electronic device is provided, comprising:
[0134] a processor;
[0135] a memory for storing processor-executable instructions;
[0136] The processor is configured to invoke the instructions stored in the memory to execute the method described above.
[0137] In a fourth aspect of the embodiments of the present 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.
[0138] 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 performing various aspects of the present application.
[0139] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents; 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 of hybrid encryption strategy, characterized in that, The method comprises the following steps: Receiving the data to be encrypted sent by the user terminal, and dividing the data into multiple data blocks; Randomly selecting a prime number, generating a main lattice matrix and an auxiliary lattice matrix, decomposing the main lattice 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 matrix; Iteratively optimizing the upper triangular matrix to obtain an optimal key state, combining the homomorphic encryption key and the optimal key state to obtain a hybrid encryption key, comprising: Performing an inner product operation on the row vectors of the orthogonal matrix and random integer coefficients to obtain a homomorphic encryption key, mapping the homomorphic encryption key to a Riemann manifold to obtain an orthogonal metric tensor; square all elements of the auxiliary lattice matrix, take the square root, and multiply by the orthogonal metric tensor to obtain the encryption strength; Taking the diagonal elements of the upper triangular matrix as the initial key state, taking the difference between the initial key state and the second derivative of its Ricci curvature as the evolution speed; add the evolution speed to the initial key state to obtain the key state at the next time, and repeat the accumulation operation until the evolution speed is less than the convergence threshold; Integrate all key states on the Riemann manifold to obtain the 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, comprising: Map all key states to a multi-dimensional Riemann manifold space through a mapping function; based on the mapping function, extract multiple local coordinate components from the key state, respectively calculate the product of the multiple local coordinate components and the 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 modulus square of the Riemann curvature tensor, integrate the modulus square on 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 curvature energy value by the sum of 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 hybrid encryption key; Reconstruct the data blocks into a data vector, and perform a vector inner product operation on the data vector and 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 a zero-knowledge proof when the local proof value is greater than a confidence threshold; Return the 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.
2. The method of claim 1, wherein, 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, comprising: Selecting a first prime number, generating an initial invertible matrix, calculating the determinant value of the initial invertible matrix, when the result of the determinant value modulo the first prime number is not zero, the initial invertible matrix is taken as the main lattice basis matrix; selecting a second prime number, generating a diagonal matrix, multiplying the main lattice basis matrix and the diagonal matrix to obtain an auxiliary lattice basis matrix; Performing orthogonalization processing on the main lattice basis matrix to obtain an orthogonal matrix; based on the orthogonal matrix and the main lattice basis matrix, calculating an upper triangular matrix; calculating 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, completing the main lattice basis matrix decomposition.
3. The method of claim 1, wherein, 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: Calculating the information entropy of the ciphertext data block, calculating the product of the information entropy and the basic fragmentation length, dividing the ciphertext data block 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 the topological feature vector, the data segment and the corresponding topological feature vector are spliced and 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 the topological similarity, the topological similarity is divided by the sum of the topological similarities of the leaf node and its neighborhood nodes to obtain the merging weight, the hash values of adjacent leaf nodes are multiplied by the corresponding merging weights respectively and spliced, and hash operation is performed to obtain the hash value of the parent node; Repeat the splicing and hash operation until only one node is left, and the hash value of the node is taken as the root node value.
4. The method of claim 1, wherein, Randomly select multiple leaf nodes to generate multiple verification paths; Calculate the local proof value of each verification path, when the local proof value is greater than the confidence threshold, generate a zero-knowledge proof, comprising: Starting from the root node, record all node hash values on the path leading to the target leaf node, connect the nodes with node hash values greater than a preset screening threshold to generate a verification path; Cascade splicing the hash values of adjacent nodes on the verification path to obtain a cascade hash value; assign a depth weight coefficient to each node on the verification path, multiply the depth weight coefficient and the cascade hash value and sum 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 and the random string are mixed to calculate 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.
5. A privacy preserving system of hybrid encryption strategies for implementing the method of any one of claims 1-4, characterized in that, Comprising: The first unit is used for receiving the encrypted data sent by the user terminal, and dividing it into multiple 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, and generate a homomorphic encryption key based on the orthogonal matrix. The homomorphic encryption key is mapped to a Riemann manifold to obtain an orthogonal metric tensor, and the encryption strength is calculated in combination with the auxiliary lattice matrix. The upper triangular matrix is iteratively optimized to obtain an optimal key state, the homomorphic encryption key and the optimal key state are combined to obtain a hybrid encryption key, and the data block is reconstructed into a data vector. The third unit is configured to perform a 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, and generate a plurality of verification paths. The local proof value of each verification path is calculated, and when the local proof values are all greater than a confidence threshold, a zero-knowledge proof is generated. The fifth unit is configured to return 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.
6. An electronic device, comprising: It includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any one of claims 1 to 4.
7. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions are executed by the processor to implement the method of any one of claims 1 to 4.
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