A secure storage method and system based on multi-dimension encryption

By using a multi-dimensional encryption method, tag vectors are generated using segment features and global features. Combined with the SHA-256 hash function and multi-dimensional parameters, the key stream is dynamically adjusted, which solves the problem of low encryption security in existing technologies and achieves higher data storage security.

CN121814320BActive Publication Date: 2026-05-15SICHUAN TOURISM UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN TOURISM UNIV
Filing Date
2026-03-09
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing segmented encrypted storage schemes based on fixed keys suffer from low encryption security. Attackers can directly decrypt all data segments through brute-force or side-channel attacks, causing the storage system to fail.

Method used

A multi-dimensional encryption method is adopted, which generates a tag vector by extracting segment features and global features, generates global and local perturbation key sequences by combining the SHA-256 hash function, and uses byte scrambling, diffusion strength and key shift parameters for dynamic encryption to form a multi-dimensional protection chain.

Benefits of technology

This improves encryption security, preventing attackers from deducing other key segments by cracking one key segment. This significantly increases the cost and complexity of attacks, thereby enhancing the security of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121814320B_ABST
    Figure CN121814320B_ABST
Patent Text Reader

Abstract

The application discloses a kind of security storage method and system based on multi-dimension encryption, belong to data security technical field.The application first converts original text into UTF-8 encoding and segmented processing, extracts the segment feature and global feature of each segment, generates label vector according to the proportion of two kinds of features;Determine three kinds of encryption parameters of byte scrambling, diffusion intensity and key shift amount based on label vector, complete segment scrambling by scrambling mapping function to obtain scrambling sequence;Global perturbation key sequence and local perturbation key sequence are generated by global feature and segment feature respectively using SHA-256 hash function, first and second master key stream are obtained after adjusting by key shift amount parameter;Finally, the scrambling sequence is encrypted by double master key stream, and diffusion enhancement is realized by combining diffusion intensity parameter, to obtain encrypted security storage sequence.The application effectively improves the encryption security of data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security technology, specifically to a secure storage method and system based on multi-dimensional encryption. Background Technology

[0002] In the digital age, data has become a core production factor. Raw text data (such as personal identification information, transaction records, and medical records) in key areas like government affairs, finance, and healthcare face numerous security threats during storage, including theft, tampering, and leakage. Secure data storage technology has become a core support for ensuring the integrity and privacy of information assets. Encryption technology, as a core means of secure storage, reduces security risks during storage and subsequent access by transforming raw data. Therefore, various storage solutions based on encryption algorithms are widely researched and applied.

[0003] In existing technologies, a typical secure storage method is a "segmented encryption storage scheme based on a fixed key." The core logic of this scheme is as follows: first, the original text is segmented into segments of a preset length; then, a single encryption algorithm (such as AES) is used to encrypt each segment separately based on a fixed generated key; finally, the encrypted segments are aggregated and stored. This scheme has found some application in small- to medium-scale data storage scenarios due to its simple implementation logic and high encryption efficiency.

[0004] However, the aforementioned existing technologies have significant technical flaws: the key and data characteristics are completely decoupled. This scheme uses a fixed key during encryption and applies the same encryption process to all data segments. Once an attacker obtains the fixed key through brute-force attacks, side-channel attacks, or other methods, they can directly decrypt all data segments, rendering the entire storage system completely insecure. Therefore, existing technologies suffer from low encryption security. Summary of the Invention

[0005] In view of the above-mentioned shortcomings in the prior art, the present invention provides a secure storage method and system based on multi-dimensional encryption, which solves the problem of low encryption security in the prior art.

[0006] To achieve the aforementioned objectives, the present invention employs the following technical solution: a secure storage method based on multi-dimensional encryption, comprising:

[0007] The original text is converted to UTF-8 encoding to obtain the text encoding. The text encoding is then segmented into segments of fixed length to obtain a set of segments.

[0008] Extract segment features and global features for each segment in the segmented set, and generate a label vector for each segment based on the ratio of segment features to global features;

[0009] Based on the tag vector, generate byte scrambling encryption parameters, diffusion strength encryption parameters, and key shift encryption parameters;

[0010] Based on the byte scrambling encryption parameters, a scrambling mapping function is constructed to scramble each segment, resulting in a scrambled sequence for each segment.

[0011] Based on global features and segment features respectively, the SHA-256 hash function is used to generate global perturbation key sequences and local perturbation key sequences;

[0012] Based on the encryption parameters of the key shift amount, the positions of the global perturbation key sequence and the local perturbation key sequence are adjusted to obtain the first master key stream and the second master key stream;

[0013] Each scrambled sequence is encrypted using a first master key stream and a second master key stream, and diffusion enhancement is performed based on the diffusion strength encryption parameter to obtain an encrypted secure storage sequence.

[0014] Furthermore, the process of generating label vectors includes:

[0015] For each segment in the segment set, segment features are obtained, including character complexity, keyword density, and keyword length ratio.

[0016] The global features are obtained by taking the average of the features of each segment in the segment set. The global features include: the average character complexity, the average keyword density, and the average keyword length ratio.

[0017] The ratio of segment features to global features is used to obtain the proportional relationship vector;

[0018] Generate a label vector based on the range of each ratio in the ratio relationship vector.

[0019] Furthermore, the expression for generating the label vector is:

[0020] ,

[0021] in, For the first The label vector of the segment One element, For the first Segment proportional relationship vector The Middle A proportion, The first proportional threshold, This is the second proportional threshold.

[0022] Furthermore, the process of generating the byte scrambling encryption parameters includes: converting each bit in the tag vector into binary code, concatenating them, and finally converting them into decimal to obtain the tag value; multiplying the tag value by the segment index to obtain the byte scrambling encryption parameters.

[0023] The process of generating diffusion strength encryption parameters includes: adding each element in the tag vector and adding the initial value to obtain the enhancement value; multiplying the tag value and the enhancement value to obtain the diffusion strength encryption parameters.

[0024] The process of generating the key shift encryption parameters includes: converting each bit in the tag vector into binary code, inverting each bit, concatenating them, and finally converting them into decimal to obtain the tag one's complement value; multiplying the tag value by the tag one's complement value to obtain the key shift encryption parameters.

[0025] Furthermore, the expression for the scrambling mapping function is:

[0026] ,

[0027] in, The independent variable is The scrambling mapping sequence number obtained at that time. For serial number, For the first The byte scrambling encryption parameters of the segment. For the modulo operation, Number of bytes per segment;

[0028] The scrambled sequence is obtained:

[0029] ,

[0030] in, For the first The first segment in the scrambled sequence bytes, For the first The first segment of the original byte sequence One element, For from the first Obtain bytes from the original byte sequence.

[0031] Furthermore, the process of generating the global perturbation key sequence includes:

[0032] Concatenate the first master hash sequences of the k-th iteration and the (k-1)-th iteration to obtain the first master hash concatenation sequence;

[0033] The first master hash concatenation sequence is input into the SHA-256 hash function to generate the first master hash sequence for the (k+1)th iteration;

[0034] The global features are quantized into a byte sequence, and a 256-byte perturbation mask is generated to obtain the global perturbation mask;

[0035] The first master hash sequence generated in the last 8 iterations is concatenated and then XORed with the global perturbation mask to obtain the global perturbation key sequence.

[0036] Furthermore, the process of generating the locally perturbated key sequence includes:

[0037] The second master hash sequence of the k-th iteration and the (k-1)-th iteration are concatenated to obtain the second master hash concatenation sequence.

[0038] The second master hash concatenation sequence is input into the SHA-256 hash function to generate the second master hash sequence for the (k+1)th iteration;

[0039] The segment features are quantized into a byte sequence, and a 256-byte perturbation mask is generated to obtain the local perturbation mask;

[0040] The second master hash sequence generated in the last 8 iterations is concatenated and then XORed with the local perturbation mask to obtain the local perturbation key sequence.

[0041] Furthermore, the process of obtaining the first master key stream and the second master key stream includes:

[0042] Map the key shift amount encryption parameter to the cyclic shift length. ,in, This is the cyclic shift length. Encryption parameters for key shift amount, The length of the key sequence in bytes. This is the modulo operation;

[0043] Based on the cyclic shift length, the global perturbation key sequence is cyclically shifted to obtain the global key shift sequence;

[0044] The first master key stream is obtained by XORing the global key shift sequence with the local perturbation key sequence.

[0045] Based on the cyclic shift length, the local perturbation key sequence is cyclically shifted to obtain the local key shift sequence;

[0046] The second master key stream is obtained by XORing the global perturbation key sequence with the local key shift sequence.

[0047] Furthermore, the process of obtaining the encrypted secure storage sequence includes:

[0048] The first master key stream is XORed with the scrambled sequence of the corresponding segment to obtain the first initial encryption sequence;

[0049] The second master key stream is XORed with the first initial encryption sequence to obtain the second initial encryption sequence.

[0050] The second initial encryption sequence is XORed with the diffusion strength encryption parameter after broadcasting to obtain the encrypted secure storage sequence.

[0051] A secure storage system based on multi-dimensional encryption includes: a segmentation unit, a tag generation unit, a multi-dimensional encryption parameter generation unit, a scrambling unit, a key generation unit, a master key stream generation unit, and an encryption unit;

[0052] The segmentation unit is used to convert the original text into UTF-8 encoding, obtain the text encoding, and then segment the text encoding into segments of fixed length to obtain a set of segments;

[0053] The label generation unit is used to extract segment features and global features for each segment in the segment set, and generate a label vector for each segment based on the ratio of segment features to global features.

[0054] The multidimensional encryption parameter generation unit is used to generate byte scrambling encryption parameters, diffusion strength encryption parameters, and key shift amount encryption parameters based on the tag vector;

[0055] The scrambling unit is used to construct a scrambling mapping function based on the byte scrambling encryption parameters, perform scrambling operations on each segment, and obtain the scrambling sequence of each segment;

[0056] The key generation unit is used to generate a global perturbation key sequence and a local perturbation key sequence respectively based on global features and segment features using the SHA-256 hash function;

[0057] The master key stream generation unit is used to adjust the positions of the global perturbation key sequence and the local perturbation key sequence according to the key shift encryption parameter to obtain the first master key stream and the second master key stream;

[0058] The encryption unit is used to encrypt each scrambled sequence using the first master key stream and the second master key stream, and to perform diffusion enhancement based on the diffusion strength encryption parameter to obtain an encrypted secure storage sequence.

[0059] The beneficial effects of this invention are as follows:

[0060] 1. This invention abandons fixed keys. Based on the segment characteristics and global characteristics of each segment, it generates a global + local double-perturbation key sequence using SHA-256, and dynamically adjusts the master key stream through key shift parameters. This strongly binds the key to the data content, ensuring that each segment key is unique and unpredictable. Even if a segment key is abnormally obtained, attackers cannot deduce the keys of other segments, isolating the risk within a single segment and improving encryption security.

[0061] 2. This invention introduces three independent parameters: byte scrambling, diffusion strength, and key shift amount. These correspond to the three core encryption stages: scrambling mapping, diffusion enhancement, and key stream adjustment, forming a multi-dimensional protection chain. Attackers must simultaneously crack the scrambling rules, diffusion parameters, key stream, and dual keys. The attack cost and complexity increase exponentially, resulting in significantly better security than single fixed-process encryption. Attached Figure Description

[0062] Figure 1 This is a flowchart of a secure storage method based on multi-dimensional encryption. Detailed Implementation

[0063] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0064] Example 1, as Figure 1 As shown, a secure storage method based on multi-dimensional encryption includes:

[0065] The original text is converted to UTF-8 encoding to obtain the text encoding. The text encoding is then segmented into segments of fixed length to obtain a set of segments.

[0066] Extract segment features and global features for each segment in the segmented set, and generate a label vector for each segment based on the ratio of segment features to global features;

[0067] Based on the tag vector, generate byte scrambling encryption parameters, diffusion strength encryption parameters, and key shift encryption parameters;

[0068] Based on the byte scrambling encryption parameters, a scrambling mapping function is constructed to scramble each segment, resulting in a scrambled sequence for each segment.

[0069] Based on global features and segment features respectively, the SHA-256 hash function is used to generate global perturbation key sequences and local perturbation key sequences;

[0070] Based on the encryption parameters of the key shift amount, the positions of the global perturbation key sequence and the local perturbation key sequence are adjusted to obtain the first master key stream and the second master key stream;

[0071] Each scrambled sequence is encrypted using a first master key stream and a second master key stream, and diffusion enhancement is performed based on the diffusion strength encryption parameter to obtain an encrypted secure storage sequence.

[0072] In this embodiment, when performing text encoding segmentation, the segment length is 256 bytes, and segments with insufficient length are padded with 0.

[0073] In this embodiment, the process of generating the label vector includes:

[0074] For each segment in the segment set, segment features are obtained, including character complexity, keyword density, and keyword length ratio.

[0075] The global features are obtained by taking the average of the features of each segment in the segment set. The global features include: the average character complexity, the average keyword density, and the average keyword length ratio.

[0076] The ratio of segment features to global features is used to obtain the ratio vector:

[0077] ,

[0078] in, For the first The proportional relationship vector of the segments, For the first The character complexity of a segment. For the first Keyword density of the paragraph For the first The ratio of keyword length in a paragraph The average complexity of characters. This represents the average keyword density. The average of keyword length ratios is used. When the denominator is 0, the corresponding denominator is replaced with a preset minimum positive number.

[0079] Generate a label vector based on the range of each ratio in the ratio relationship vector.

[0080] In this embodiment, the process of obtaining character complexity includes: taking the intersection of each segment in the segment set with the set of non-alphanumeric characters, and using the ratio of the number of bytes corresponding to each character in the intersection to the number of bytes in a single segment as the character complexity.

[0081] ,

[0082] in, For the segmented set, the first The character complexity of a segment. For the segmented set, the first part, It is a set of non-alphanumeric characters. Number of bytes per segment To find the intersection, To count the number of bytes, ;

[0083] The process of obtaining keyword density includes: counting the number of times a preset keyword appears in each paragraph, and taking the ratio of the number of occurrences to the number of words in each paragraph as the keyword density;

[0084] The process of obtaining the keyword length ratio includes: counting the total byte length of the preset keywords in each paragraph, and taking the ratio of the total byte length of the preset keywords to the number of bytes in a single paragraph as the keyword length ratio.

[0085] In this embodiment, the expression for generating the tag vector is:

[0086] ,

[0087] in, For the first The label vector of the segment One element, For the first Segment proportional relationship vector The Middle A proportion, The first proportional threshold, This is the second proportional threshold.

[0088] In this embodiment, the first proportional threshold is set to 0.8 and the second proportional threshold is set to 1.2. The specific threshold range can be adjusted according to requirements.

[0089] This invention generates segment features for each segment, associates the content of each segment with the features, and takes the average of the segment features to obtain global features. It then associates these global features with all text content and generates a tag vector based on the ratio of the segment features to the global features, so that each segment has an independent tag vector.

[0090] In this embodiment, the process of generating byte scrambling encryption parameters includes: converting each bit of the tag vector into binary code, concatenating them, and finally converting them into decimal to obtain the tag value; and then combining the tag value with the segment index. Multiplying them gives the byte scrambling encryption parameters. For example, in the tag vector {-1,0,1}, -1 maps to 11, 0 maps to 00, and 1 maps to 01. Each bit is converted to binary and concatenated to get 110001. Then, it is converted to decimal, and the tag value is 49.

[0091] The process of generating diffusion strength encryption parameters includes: adding each element in the tag vector and adding an initial value to obtain an enhancement value; multiplying the tag value by the enhancement value to obtain the diffusion strength encryption parameters. The initial value is a constant to avoid tag values ​​of 0.

[0092] The process of generating the key shift encryption parameters includes: converting each bit in the tag vector into binary code, inverting each bit, concatenating them, and finally converting them into decimal to obtain the tag one's complement value; multiplying the tag value by the tag one's complement value to obtain the key shift encryption parameters. For example, the tag vector {-1,0,1}, after inverting each bit and concatenating them, yields 001110, and the tag one's complement value is 14.

[0093] This invention generates an independent tag vector for each segment, and based on this tag vector, generates byte scrambling encryption parameters, diffusion strength encryption parameters, and key shift encryption parameters respectively. This allows different text segments to correspond to different control parameters during the encryption process, avoiding the use of the same encryption rules and parameters for each segment, thereby improving the diversity and unpredictability of segmented encryption.

[0094] This invention performs binary encoding, inverse code processing, concatenation, and numerical mapping on the tag vector, and generates various encryption parameters by combining segment index and enhanced value. It introduces multi-layer mapping relationships and nonlinear operations, making the encryption parameter generation process more complex, improving the discreteness of the parameter space, and thus enhancing the security of the encryption process.

[0095] In this embodiment, the expression for the scrambling mapping function is:

[0096] ,

[0097] in, The independent variable is The scrambling mapping sequence number obtained at that time. For serial number, For the first The byte scrambling encryption parameters of the segment. For the modulo operation, Number of bytes per segment ;

[0098] The scrambled sequence is obtained:

[0099] ,

[0100] in, For the first The first segment in the scrambled sequence bytes, For the first The first segment of the original byte sequence One element, For from the first To retrieve the byte at a specific position from a segment of the original byte sequence.

[0101] This invention incorporates the byte scrambling encryption parameters of each segment into the scrambling mapping function, thereby giving each segment different scrambling parameters. The scrambling rules for different segments are completely independent, determined by the tag vector and segment index of each segment. This completely breaks the positional distribution pattern of the original byte sequence, making it impossible for attackers to deduce the characteristics of the original data by statistically analyzing the frequency of characters / bytes, thus effectively resisting statistical analysis attacks.

[0102] In this embodiment, the process of generating the global perturbation key sequence includes:

[0103] Concatenate the first master hash sequences of the k-th iteration and the (k-1)-th iteration to obtain the first master hash concatenation sequence;

[0104] Input the first master hash concatenation sequence into the SHA-256 hash function to generate the first master hash sequence for the (k+1)th iteration:

[0105] ,

[0106] in, This is the first master hash sequence in the (k+1)th iteration. This is the first master hash sequence in the k-th iteration. This is the first master hash sequence in the (k-1)th iteration. For splicing, For hash functions;

[0107] The global features are quantized into a byte sequence, and a 256-byte perturbation mask is generated to obtain the global perturbation mask;

[0108] The first master hash sequence generated in the last 8 iterations is concatenated and then XORed with the global perturbation mask to obtain the global perturbation key sequence.

[0109] In this embodiment, the number of hash iterations is a preset number, and the preset number is at least 8. Each main hash sequence is 32 bytes long, and the first main hash sequence generated by the last 8 iterations is concatenated to obtain 256 bytes.

[0110] Global features are quantized into a byte sequence of length 256:

[0111] ,

[0112] A byte sequence quantized for global features, with a length of 256; The average complexity of characters. This represents the average keyword density. The ratio of keyword length to mean. For quantitative operations;

[0113] The formula for generating a 256-byte perturbation mask is:

[0114] ,

[0115] in, The first in the global perturbation mask bytes, for The Middle bytes, For the modulo operation, For byte numbering, This is an XOR operation.

[0116] In this embodiment, the quantization operation is to convert all three values ​​into 8-byte binary data, repeat and pad these 24-byte binary data with zeros, and finally obtain 256 bytes.

[0117] In this embodiment, the process of generating the local perturbation key sequence includes:

[0118] The second master hash sequence of the k-th iteration and the (k-1)-th iteration are concatenated to obtain the second master hash concatenation sequence.

[0119] The second master hash concatenation sequence is input into the SHA-256 hash function to generate the second master hash sequence for the (k+1)th iteration:

[0120] ,

[0121] in, This is the second master hash sequence in the (k+1)th iteration. This is the second master hash sequence in the k-th iteration. This is the second master hash sequence in the (k-1)th iteration. For splicing, For hash functions;

[0122] The segment features are quantized into a byte sequence, and a 256-byte perturbation mask is generated to obtain the local perturbation mask;

[0123] The second master hash sequence generated in the last 8 iterations is concatenated and then XORed with the local perturbation mask to obtain the local perturbation key sequence.

[0124] The segment feature is quantized into a byte sequence of length 256:

[0125] ,

[0126] The byte sequence quantized for segment features has a length of 256; For the first The character complexity of a segment. For the first Keyword density of the paragraph For the first The ratio of keyword length in a paragraph For quantitative operations.

[0127] The formula for generating a 256-byte perturbation mask is:

[0128] ,

[0129] in, For the local perturbation mask, the first bytes, for The Middle bytes, For the modulo operation, The byte number.

[0130] This invention employs a chain-like generation method, concatenating the hash sequences from the first two iterations before hashing again. This ensures that each iteration's hash sequence depends on historical states, forming a "state-dependent" hash chain. Leveraging the collision resistance and avalanche effect of the SHA-256 hash function, even minor changes to the initial hash sequence will result in drastically different subsequent iterations, significantly reducing the probability of attackers forging or deducing hash sequences. A 256-byte perturbation mask is generated based on global feature quantization bytes. Each byte of the mask is obtained by XORing the global feature / segment feature with the byte number: through... The cyclic value selection method ensures that global / segment feature values ​​are evenly applied to the 256-byte mask, avoiding the dominance of a single feature in mask generation. Finally, the key is generated by XORing the mask with the iterative hash sequence, ensuring that the key is strongly correlated with the global / local attributes of the dataset, and completely eliminating the shortcomings of traditional fixed keys.

[0131] In this embodiment, the process of obtaining the first master key stream and the second master key stream includes:

[0132] Map the key shift amount encryption parameter to the cyclic shift length. ,in, This is the cyclic shift length. Encryption parameters for key shift amount, The length of the key sequence in bytes. , This is the modulo operation;

[0133] Based on the cyclic shift length, the global perturbation key sequence is cyclically shifted to obtain the global key shift sequence;

[0134] The first master key stream is obtained by XORing the global key shift sequence with the local perturbation key sequence.

[0135] Based on the cyclic shift length, the local perturbation key sequence is cyclically shifted to obtain the local key shift sequence;

[0136] The second master key stream is obtained by XORing the global perturbation key sequence with the local key shift sequence.

[0137] This invention dynamically scrambles the byte distribution of the global and local perturbation key sequences through parameterized cyclic shift operations, breaking the fixed structure of the original key sequence and significantly reducing the possibility of attackers deducing key patterns through statistical analysis. Simultaneously, the modulo operation ensures that the shift length remains within a reasonable range, avoiding invalid shifts due to excessively large parameters and guaranteeing the stability of the key stream transformation.

[0138] The first master key stream is generated by XORing a global key shift sequence with a local perturbation key sequence, and the second master key stream is generated by XORing a global perturbation key sequence with a local key shift sequence. The two paths employ a cross-combination pattern of "shift + original". This allows the two master key streams to share both global and local characteristics while possessing independent generation logic. For an attacker to break the encryption, they must simultaneously reconstruct the generation paths of both master key streams, exponentially increasing the attack difficulty.

[0139] In this embodiment, the process of obtaining the encrypted secure storage sequence includes:

[0140] The first master key stream is XORed with the scrambled sequence of the corresponding segment to obtain the first initial encryption sequence;

[0141] The second master key stream is XORed with the first initial encryption sequence to obtain the second initial encryption sequence.

[0142] The second initial encryption sequence is XORed with the diffusion strength encryption parameter after broadcasting to obtain the encrypted secure storage sequence.

[0143] In this embodiment, "broadcast operation" refers to converting the diffusion strength encryption parameters into a fixed-length binary byte sequence, and then expanding it into a byte sequence with the same length as the second initial encryption sequence through broadcast operation.

[0144] The progressive XOR operation of the two-layer master key streams masks the correlation between ciphertext and plaintext layer by layer through the link of "scrambled sequence → first-level XOR → second-level XOR". The two master key streams originate from the differentiated combination of global and local perturbation keys, which greatly improves the ability to resist brute-force and differential attacks. The diffusion strength parameter is applied to each byte of the second initial encryption sequence after broadcast operation, further amplifying the avalanche effect of encryption, breaking the statistical correlation of ciphertext, and effectively resisting statistical analysis attacks.

[0145] Example 2: A secure storage system based on multi-dimensional encryption, comprising: a segmentation unit, a tag generation unit, a multi-dimensional encryption parameter generation unit, a scrambling unit, a key generation unit, a master key stream generation unit, and an encryption unit;

[0146] The segmentation unit is used to convert the original text into UTF-8 encoding, obtain the text encoding, and then segment the text encoding into segments of fixed length to obtain a set of segments;

[0147] The label generation unit is used to extract segment features and global features for each segment in the segment set, and generate a label vector for each segment based on the ratio of segment features to global features.

[0148] The multidimensional encryption parameter generation unit is used to generate byte scrambling encryption parameters, diffusion strength encryption parameters, and key shift amount encryption parameters based on the tag vector;

[0149] The scrambling unit is used to construct a scrambling mapping function based on the byte scrambling encryption parameters, perform scrambling operations on each segment, and obtain the scrambling sequence of each segment;

[0150] The key generation unit is used to generate a global perturbation key sequence and a local perturbation key sequence respectively based on global features and segment features using the SHA-256 hash function;

[0151] The master key stream generation unit is used to adjust the positions of the global perturbation key sequence and the local perturbation key sequence according to the key shift encryption parameter to obtain the first master key stream and the second master key stream;

[0152] The encryption unit is used to encrypt each scrambled sequence using the first master key stream and the second master key stream, and to perform diffusion enhancement based on the diffusion strength encryption parameter to obtain an encrypted secure storage sequence.

[0153] The specific implementation method of Example 2 is the same as that of Example 1.

[0154] This invention abandons fixed keys and, based on the segment characteristics and global characteristics of each segment, generates a global + local double-perturbation key sequence using SHA-256. The master key stream is then dynamically adjusted using key shift parameters, strongly binding the key to the data content. Each key segment is unique and unpredictable. Even if a key segment is abnormally obtained, attackers cannot deduce the keys for other segments, isolating the risk within a single segment and improving encryption security.

[0155] This invention introduces three independent parameters: byte scrambling, diffusion strength, and key shift amount. These correspond to the three core encryption stages: scrambling mapping, diffusion enhancement, and key stream adjustment, forming a multi-dimensional protection chain. Attackers must simultaneously crack the scrambling rules, diffusion parameters, key stream, and dual keys, resulting in a geometric increase in attack cost and complexity. The security of this invention is significantly superior to single-fixed-process encryption.

[0156] The above are merely preferred embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A secure storage method based on multi-dimensional encryption, characterized in that, include: The original text is converted to UTF-8 encoding to obtain the text encoding. The text encoding is then segmented into segments of fixed length to obtain a set of segments. Extract segment features and global features for each segment in the segmented set, and generate a label vector for each segment based on the ratio of segment features to global features; Based on the tag vector, generate byte scrambling encryption parameters, diffusion strength encryption parameters, and key shift encryption parameters; Based on the byte scrambling encryption parameters, a scrambling mapping function is constructed to scramble each segment, resulting in a scrambled sequence for each segment. Based on global features and segment features respectively, the SHA-256 hash function is used to generate global perturbation key sequences and local perturbation key sequences; Based on the encryption parameters of the key shift amount, the positions of the global perturbation key sequence and the local perturbation key sequence are adjusted to obtain the first master key stream and the second master key stream; Each scrambled sequence is encrypted using a first master key stream and a second master key stream, and diffusion enhancement is performed based on the diffusion strength encryption parameter to obtain an encrypted secure storage sequence. The process of generating label vectors includes: For each segment in the segment set, segment features are obtained, including character complexity, keyword density, and keyword length ratio. The global features are obtained by taking the average of the features of each segment in the segment set. The global features include: the average character complexity, the average keyword density, and the average keyword length ratio. The ratio of segment features to global features is used to obtain the proportional relationship vector; Generate a label vector based on the range of each ratio in the ratio relationship vector; The expression for generating the tag vector is: , in, For the first The label vector of the segment One element, For the first Segment proportional relationship vector The Middle A proportion, The first proportional threshold, This is the second proportional threshold; The process of generating byte scrambling encryption parameters includes: converting each bit in the tag vector into binary code, concatenating them, and finally converting them into decimal to obtain the tag value; multiplying the tag value by the segment index to obtain the byte scrambling encryption parameters. The process of generating diffusion strength encryption parameters includes: adding each element in the tag vector and adding the initial value to obtain the enhancement value; multiplying the tag value and the enhancement value to obtain the diffusion strength encryption parameters. The process of generating the key shift encryption parameters includes: converting each bit in the tag vector into binary code, inverting each bit, concatenating them, and finally converting them into decimal to obtain the tag one's complement value; multiplying the tag value by the tag one's complement value to obtain the key shift encryption parameters. The expression for the scramble mapping function is: , in, The independent variable is The scrambling mapping sequence number obtained at that time. For serial number, For the first The byte scrambling encryption parameters of the segment. For the modulo operation, This refers to the number of bytes per segment. The scrambled sequence is obtained: , in, For the first The first segment in the scrambled sequence bytes, For the first The first segment of the original byte sequence One element, For from the first Obtain bytes from the original byte sequence; The process of generating a global perturbation key sequence includes: Concatenate the first master hash sequences of the k-th iteration and the (k-1)-th iteration to obtain the first master hash concatenation sequence; The first master hash concatenation sequence is input into the SHA-256 hash function to generate the first master hash sequence for the (k+1)th iteration; The global features are quantized into a byte sequence, and a 256-byte perturbation mask is generated to obtain the global perturbation mask; The first master hash sequence generated in the last 8 iterations is concatenated and then XORed with the global perturbation mask to obtain the global perturbation key sequence. The process of generating a locally perturbated key sequence includes: The second master hash sequence of the k-th iteration and the (k-1)-th iteration are concatenated to obtain the second master hash concatenation sequence. The second master hash concatenation sequence is input into the SHA-256 hash function to generate the second master hash sequence for the (k+1)th iteration; The segment features are quantized into a byte sequence, and a 256-byte perturbation mask is generated to obtain the local perturbation mask; The second master hash sequence generated in the last 8 iterations is concatenated and then XORed with the local perturbation mask to obtain the local perturbation key sequence. The process of obtaining the first master key stream and the second master key stream includes: Map the key shift amount encryption parameter to the cyclic shift length. ,in, This is the cyclic shift length. For the first Encryption parameters for the key shift amount of the segment. The length of the key sequence in bytes. This is the modulo operation; Based on the cyclic shift length, the global perturbation key sequence is cyclically shifted to obtain the global key shift sequence; The first master key stream is obtained by XORing the global key shift sequence with the local perturbation key sequence. Based on the cyclic shift length, the local perturbation key sequence is cyclically shifted to obtain the local key shift sequence; The second master key stream is obtained by XORing the global perturbation key sequence with the local key shift sequence. The process of obtaining a cryptographically secure storage sequence includes: The first master key stream is XORed with the scrambled sequence of the corresponding segment to obtain the first initial encryption sequence; The second master key stream is XORed with the first initial encryption sequence to obtain the second initial encryption sequence. The second initial encryption sequence is XORed with the diffusion strength encryption parameter after broadcasting to obtain the encrypted secure storage sequence.

2. A secure storage system based on multi-dimensional encryption, implemented based on the secure storage method based on multi-dimensional encryption as described in claim 1, characterized in that, include: The unit consists of a segmentation unit, a tag generation unit, a multi-dimensional encryption parameter generation unit, a scrambling unit, a key generation unit, a master key stream generation unit, and an encryption unit. The segmentation unit is used to convert the original text into UTF-8 encoding, obtain the text encoding, and then segment the text encoding into segments of fixed length to obtain a set of segments; The label generation unit is used to extract segment features and global features for each segment in the segment set, and generate a label vector for each segment based on the ratio of segment features to global features. The multidimensional encryption parameter generation unit is used to generate byte scrambling encryption parameters, diffusion strength encryption parameters, and key shift amount encryption parameters based on the tag vector; The scrambling unit is used to construct a scrambling mapping function based on the byte scrambling encryption parameters, perform scrambling operations on each segment, and obtain the scrambling sequence of each segment; The key generation unit is used to generate a global perturbation key sequence and a local perturbation key sequence respectively based on global features and segment features using the SHA-256 hash function; The master key stream generation unit is used to adjust the positions of the global perturbation key sequence and the local perturbation key sequence according to the key shift encryption parameter to obtain the first master key stream and the second master key stream; The encryption unit is used to encrypt each scrambled sequence using the first master key stream and the second master key stream, and to perform diffusion enhancement based on the diffusion strength encryption parameter to obtain an encrypted secure storage sequence.