Substitution number encryption storage system and method
By dividing the data to be encrypted into multiple original data blocks and generating a data header containing replacement information, replacing the original data block with replacement data blocks, the problem of data leakage caused by key leakage is solved, the hardware performance requirements are reduced, and the improvement of the improvement of the data is improved. Data security and processing efficiency.
Patent Information
- Application Number
- CN202411414340.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-11
AI Technical Summary
In existing encrypted storage systems, the entire data content is also leaked after the key is leaked, and the encryption and decryption calculation process requires high hardware performance, especially when the timeliness requirements are high or the hardware performance is limited, it will have a great impact.
A data encryption storage system is proposed. Through the data blocking module, the data to be encrypted is divided into multiple original data blocks, and the data header of each original data block is generated, including the data replacement table number, the original data block length and the replacement Data block length. Based on this information, the original data block is replaced with the corresponding replacement data block to form an encrypted data block.
This method avoids data leakage caused by key leakage, reduces the requirements for hardware performance, and improves data security and processing efficiency.
Smart Images

Figure CN119475370A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data encryption storage, and in particular relates to an alternative digital encryption storage system and method. Background Art
[0002] Nowadays, with the rapid development of network communication and computer technology, almost all kinds of data have been stored digitally. While the informatization process of society has brought convenience, it is also accompanied by the emergence of privacy leakage problems. Once the private information of individual users and the commercial secrets between institutions are leaked, it will cause great losses. Therefore, data confidentiality is one of the biggest challenges we face in protecting personal privacy and commercial secrets, and encryption technology is one of the effective means to maintain data security.
[0003] Currently, fixed keys are generally used to encrypt and store data. The key is a string of characters. New data is obtained by performing a series of binary operations with the original data. Since the new data is calculated, it has no meaning of being readable, which achieves the purpose of encryption. The decryption process is to use the encrypted data and the key to perform the reverse operation of encryption to restore the original key. Regardless of symmetric encryption or asymmetric encryption, since the algorithms are public, the reliability of encryption depends on the key. Once the key is leaked, the encrypted content will also be cracked. Therefore, how to safely store the key is a major problem. Using the same key for the entire data will also cause security issues. Once the key is leaked, the entire data content will also be leaked. The complex encryption and decryption calculation process has high requirements for hardware performance, which will have a greater impact when timeliness requirements are high or hardware performance is limited. Summary of the invention
[0004] In order to make data storage more secure, the present invention proposes an alternative digital encryption storage system and method.
[0005] An alternative digital encryption storage system to achieve one of the purposes of the present invention comprises:
[0006] Data block module: used to divide the data to be encrypted into multiple original data blocks;
[0007] Data marking module: used to generate a data header for each original data block; the data header is used to record the replacement information for replacing the data in the original data block; the replacement information includes: the data replacement table number corresponding to each original data block, the data length of the original data block and the length of the corresponding replacement data block in the data replacement table;
[0008] Data replacement module: used to parse out the replacement information of each data header, and replace each original data block with a replacement data block in the corresponding data replacement table according to the replacement information of each data header to obtain an encrypted data block; each encrypted data block constitutes the final encrypted data; the data replacement table is used to record the matching relationship between each original data block and the replacement data block.
[0009] In the above data marking module, a data replacement table is used to represent a replacement rule corresponding to a certain data length of the original data block. For example, if the data length of the original data block is N bits, there are 2 possible combinations: n There are 2 data replacement tables corresponding to Nbit. n Data pairs, for example:
[0010] For example, when the length of the original data block is 3 bits, there are 8 data block combinations corresponding to the 3-bit length: 0b000, 0b001, 0b010, 0b011, 0b100, 0b101, 0b110, 0b111, and the corresponding data replacement table can be expressed as: [0b000, 0b101], [0b001, 0b110], [0b010, 0b111], [0b011, 0b100], [0b100, 0b000], [0b101, 0b001], [0b110, 0b011], [0b111, 0b010]; the data pairs in brackets are replacement rules. For example, the first data pair [0b000, 0b101] means that 0b001 in the original data block is replaced with 0b101.
[0011] It can be understood that there can be multiple data replacement tables corresponding to the 3-bit length, and the data pair is not unique; and the length of the replacement data block in the data pair can also be greater than the length of the original data block. Continuing with the above-mentioned 3-bit data pair as an example, the data pair can also be [0b000, 0b1010], that is, the 3-bit original data block 0b000 is replaced with the 4-bit replacement data block 0b1010; when there are multiple data replacement tables corresponding to a data length, when replacing the original data block, the number of the data replacement table can be added to the data header before each original data block.
[0012] The replacement data blocks in the data replacement table can be generated by a computer program, such as recursively generated using a random function, or can be pre-set, which is not limited here. The replacement relationship in the data pair can also be pre-combined or generated by a computer program, which is not limited here.
[0013] In the above data segmentation module, the data segmentation method includes:
[0014] A sequence table is obtained according to the data length of the data to be encrypted, and the sequence table is used to represent the data length of each original data block after division; the sum of the values in the sequence table is equal to the data length; the unit of the data length can be bytes or bits, which is not limited here.
[0015] The technical effects of the above data segmentation method include: the sum of the values in the sequence table is equal to the data length of the original data. This design ensures the integrity of the data and allows the unit of the data length to be flexibly selected. Whether it is bytes or bits, it can adapt to different application scenarios and data types, enhancing the flexibility and versatility of the technology; the process of generating the sequence table is actually a full preparation for subsequent encryption operations. By clarifying the size of each data block, the granularity of the data block can be more accurately controlled, and the data replacement or encryption performance can be optimized. It also helps to implement more complex encryption strategies, such as using different data replacement tables for different data blocks; since the sequence table is dynamically generated according to the actual length of the data to be encrypted, the method can process data of any length without limiting or preprocessing the data length, which improves the applicability and scalability of the technology. By dividing the original data through the sequence table, the process of subsequent data processing is simplified. Each data block can be processed independently, reducing the dependence and mutual influence between data, and improving the efficiency and reliability of data processing. In summary, the technical effect is mainly reflected in the preprocessing and division of the original data by generating a sequence table, which provides convenience and support for subsequent encryption or processing operations, and enhances the flexibility, versatility and scalability of the technology.
[0016] In the sequence table, the data length of each original data block can be the same or different.
[0017] The method for generating the values in the above sequence table includes:
[0018] Obtain the sum of all the values in the sequence table; obtain the difference between the data length of the data to be encrypted and the sum; generate a positive integer random value less than the difference; store the random value in the sequence table; repeat this step until the number of cycles is equal to the number of data blocks of the original data block minus 1;
[0019] The sum of all the values in the sequence table is obtained, and the difference between the data length of the data to be encrypted and the sum is stored in the sequence table.
[0020] It can be understood that, in the first cycle, the sequence list is empty, so the sum of all the values in the sequence list is 0.
[0021] In the data marking module, the method for generating a data header of each original data block includes:
[0022] Read the sequence table in sequence, and read the original data block of the data length corresponding to each value in the sequence table from the data to be encrypted;
[0023] Determine the data replacement table number according to the data length of the original data block;
[0024] Match the corresponding replacement data block from the data replacement table according to the data replacement table number;
[0025] Get the data length of the replacement data block;
[0026] The data replacement table number, the data length of the original data block, and the data length of the replacement data block constitute the data header of each original data block.
[0027] The technical effects of generating a data header for each original data block include: by adding a header containing a data replacement table number before the original data block, it is difficult for unauthorized users to directly interpret the original data, thereby enhancing data security; the data header contains data length information of the original data block and the replacement data block, as well as the data replacement table number used for transformation, which is crucial for data recovery and verification, and improves data traceability; this method realizes the automatic reading, replacement and header adding process of data blocks through the combined use of the sequence table and the data replacement table, optimizes the data processing process, and reduces the possibility of manual intervention and errors; since the data replacement table number is dynamically determined according to the value in the sequence table, this means that Different replacement tables can be selected for data transformation as needed, which increases the flexibility and dynamism of data processing; the replacement table number and data length information stored in the data header provide key clues for subsequent recovery and verification of the data, so that even if the data has been transformed, its original state can be restored or verified based on the header information; by ensuring that each data block undergoes a strict reading, replacement and header adding process, it helps to maintain the integrity and consistency of the data and prevent the data from being tampered with or damaged during transmission or storage; this method not only enhances the security and traceability of the data by adding a data header containing rich information in front of the original data block, but also optimizes the data processing process, supports dynamic transformation, and improves the data integrity protection capability.
[0028] In the above method, the method for determining the data replacement table number according to the data length of the original data block includes:
[0029] When a data length corresponds to only one data replacement table, the data replacement table number is determined according to the correspondence between the preset data length and the data replacement table number; when a data length corresponds to multiple data replacement tables, one of the data replacement table numbers is determined randomly.
[0030] Furthermore, it also includes: saving a flag bit, which is used to indicate the correspondence between the data length and the data replacement table; when the flag bit is a first identification value, it indicates that one data length corresponds to only one data replacement table; when the flag bit is a second identification value, it indicates that one data length corresponds to multiple data replacement tables.
[0031] By identifying the flag bit, the data replacement rule can be flexibly adjusted when the data replacement table changes, and the flag bit only needs to be set to a corresponding identification value, thereby increasing the flexibility of data replacement.
[0032] The technical effects of the above method for determining the data replacement table number include: providing a mechanism for dynamically selecting the data replacement table number based on the data length, so that different replacement rules or tables can be flexibly applied according to data of different lengths, thereby enhancing the flexibility and adaptability of data replacement; when the data length corresponds to only one replacement table, the replacement table number is quickly determined through a direct mapping relationship, reducing the amount of calculation for searching and selecting the replacement table, and improving data processing efficiency; for complex situations, that is, when the same data length corresponds to multiple replacement tables, by introducing an array and a random selection mechanism, it is allowed to select the replacement table randomly or based on a specific strategy under the same data length, which provides the possibility for future expansion and customized processing, and new replacement tables can be added or the selection strategy can be adjusted without modifying the basic logic; through the preset correspondence or array between the data length and the replacement table number, the errors caused by manual selection of the replacement table are reduced, and the accuracy and reliability of data processing are improved. Through the flexible replacement table selection mechanism, the flexibility, efficiency, scalability and accuracy of data processing are improved, which helps to achieve more complex and efficient data processing tasks.
[0033] The fields included in the data header include: a data replacement table number of a set length, a data length of an original data block of a set length, and a data length of a replacement data block of a set length. One original data block corresponds to one data header, and the set length can be determined according to actual conditions, and the present invention does not limit it.
[0034] In the data replacement module, the method for obtaining the encrypted data block includes:
[0035] Read the data replacement table number, the data length of the original data block, and the data length of the replacement data block according to the set length of each field in each data header;
[0036] Match the original data block according to the data length of the original data block;
[0037] According to the data replacement table number in the data header and the original data block, find the corresponding replacement data block from the data replacement table;
[0038] The data header is concatenated with the corresponding replacement data block to obtain an encrypted data block.
[0039] The technical effects of the above-mentioned method for composing the final encrypted data include: being able to automatically and accurately read key information, including the data replacement table number, the data length of the original data block and the replacement data block, according to the preset field length in the data header. This automated reading mechanism improves the accuracy and efficiency of data processing. Based on the read original data block length information, the system can accurately locate and match the original data block to be replaced from the original data set. This step ensures the accuracy and pertinence of the subsequent replacement operation; using the data replacement table number in the data header and the matched original data block, it can intelligently retrieve and find the corresponding replacement data block in the data replacement table. This mechanism realizes the intelligence and efficiency of the data replacement process; finally, the data header containing the control information is seamlessly spliced with the replacement data block found to form an encrypted encrypted data block. This process not only ensures the integrity of the encrypted data, but also makes it more difficult for the encrypted data to be parsed or tampered by unauthorized third parties during transmission or storage. In summary, the data replacement module achieves efficient and accurate data encryption effects through automated data reading, accurate original data matching, intelligent replacement data search and seamless data splicing, and enhances the security and protection level of the data.
[0040] An alternative digital encryption storage method for achieving the second purpose of the present invention includes:
[0041] Dividing the data to be encrypted into a plurality of original data blocks;
[0042] Generate a data header for each original data block; the data header is used to record replacement information for replacing data in the original data block;
[0043] Parse the replacement information of each data header, and replace each original data block with a replacement data block in the corresponding data replacement table according to the replacement information of each data header to obtain an encrypted data block; each encrypted data block constitutes the final encrypted data; the data replacement table is used to record the matching relationship between each original data block and the replacement data block.
[0044] The beneficial effects of the present invention include:
[0045] The present invention uses a data block replacement method to encrypt and store data. Since only simple data block replacement is used, the calculation process is simpler than encryption, saving performance. Since there is no key and no key storage problem, security is further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 Schematic diagram of the system of the present invention. DETAILED DESCRIPTION
[0047] The following specific implementations are used to explain the technical solutions of the claims of the present invention so that those skilled in the art can understand the claims. The protection scope of the present invention is not limited to the following specific implementation structures. The technical solutions of the claims of the present invention made by those skilled in the art but different from the following specific implementations are also within the protection scope of the present invention.
[0048] Example 1
[0049] An alternative digital encryption storage system, comprising:
[0050] Data block module: used to divide the data to be encrypted into multiple original data blocks; the number of specific data blocks can be customized or randomly generated;
[0051] Data marking module: used to generate a data header for each original data block; the data header is used to record replacement information for replacing the original data block;
[0052] Data replacement module: used to parse out the replacement information of each data header, and replace each original data block with a replacement data block in the corresponding data replacement table according to the replacement information of each data header to obtain an encrypted data block; each encrypted data block constitutes the final encrypted data; the data replacement table is used to record the matching relationship between each original data block and the replacement data block.
[0053] The above-mentioned data replacement table uses a random method or other methods to generate replacement data blocks, and the data length of each replacement data block can be fixed or uncertain; the replacement data block is an irregular character string; the data replacement table can be stored separately from the replacement data, such as the data replacement table is stored on a dedicated hardware device, and data decryption can be performed on the dedicated hardware device.
[0054] In some embodiments, in the data segmentation module, the data segmentation method includes:
[0055] A sequence table is obtained according to the data length of the data to be encrypted, and the sequence table is used to represent the data length of each original data block after division; the sum of the values in the sequence table is equal to the data length. For example, if the data length of the data to be encrypted is 24, the generated sequence table is [8, 3, 6, 2, 5], which means that the data to be encrypted is divided into 5 data blocks, and the length of each data block is 8, 3, 6, 2 and 5 respectively.
[0056] In some embodiments, a method for generating a value in a sequence table includes:
[0057] Obtain the sum of all the values in the sequence table; obtain the difference between the data length of the data to be encrypted and the sum; generate a positive integer random value less than the difference; store the random value in the sequence table; repeat this step until the number of cycles is equal to the number of data blocks of the original data block minus 1;
[0058] The sum of all the values in the sequence table is obtained, and the difference between the data length of the data to be encrypted and the sum is stored in the sequence table.
[0059] Assuming that the length of the data to be encrypted is 24 and the number of blocks is 5, the specific example is as follows;
[0060] First cycle: Initially, the sequence table is empty and the sum is 0; the difference is equal to the length of the data to be encrypted; a positive integer between [1, 24) is generated, assuming 8 is generated; 8 is stored in the sequence table, and the sequence table is updated to [8];
[0061] Second loop: the sum of all the data in the sequence table is 8; the difference is 24-8=16; generate a positive integer between [1, 16), assuming 3 is generated; store 3 in the sequence table, and the sequence table is updated to [8, 3];
[0062] The third loop: the sum of all the data in the sequence table is 11; the difference is 24-11=13; generate a positive integer between [1, 13), assuming that 6 is generated; store 6 in the sequence table, and the sequence table is updated to [8, 3, 6];
[0063] Fourth loop: the sum of all the data in the sequence table is 17; the difference is 24-17=7; generate a positive integer between [1, 7), assuming 2 is generated; store 2 in the sequence table, and the sequence table is updated to [8, 3, 6, 2];
[0064] At this time, the number of loops is 4, and the difference with the number of data blocks 5 is equal to 1. The sum of all the values in the sequence table is obtained, that is, 19. The difference 5 between the data length 24 of the data to be encrypted and the sum 19 is stored in the sequence table. The final sequence table is [8, 3, 6, 2, 5].
[0065] In some embodiments, in the data marking module, a method for generating a data header of each original data block includes:
[0066] Read the sequence table in sequence, and read the original data block of the data length corresponding to each value in the sequence table from the data to be encrypted;
[0067] Determine the data replacement table number according to the data length of the original data block;
[0068] Match the corresponding replacement data block from the data replacement table according to the data replacement table number;
[0069] Get the data length of the replacement data block;
[0070] The data replacement table number, the data length of the original data block, and the data length of the replacement data block constitute the data header of each original data block.
[0071] Take the sequence table [8, 3, 6, 2, 5], the original data to be encrypted is 0b100010010101001111010111, and take the first original data block as an example:
[0072] 1. Divide the original data to be encrypted according to the sequence table to obtain 5 original data blocks [10001001],
[010] , [100111],
[10] ,
[10111] ;
[0073] 2. Determine the data replacement table number according to the data length of the original data block; in one embodiment, it is assumed that one data length corresponds to one data replacement table, and the data length is the data replacement table number; therefore, the data replacement table numbers of the five original data blocks are #8, #3, #6, #2, and #5 respectively;
[0074] 3. Match the corresponding replacement data block from the data replacement table according to the data replacement table number; in one embodiment, find a matching data pair from the data replacement table according to the original data block. Taking the first original data block [10001001] as an example, find the data pair [10001001, 01101011] from the corresponding data replacement table; here, 011010 is the replacement data block;
[0075] 4. Get the data length of the replacement data block; the length of 011010 is 6;
[0076] 5. The data replacement table number, the data length of the original data block, and the data length of the replacement data block form the data header of each original data block. The header information of the first original data block is [8, 8, 6]; the generation of the header information of other original data blocks will not be repeated.
[0077] In some embodiments, the method for determining the data replacement table number according to the data length of the original data block includes:
[0078] When a data length corresponds to only one data replacement table, the data replacement table number is determined according to the correspondence between the preset data length and the data replacement table number;
[0079] When a data length corresponds to multiple data replacement tables, a random method is used to determine the number of one of the data replacement tables; for example, the data replacement table array corresponding to the data length of 4 is [3, 5, 10, 2, 18], a total of 5 data replacement tables; a number is selected from them in a random manner, and the random method can be to randomly select an integer random value of [1, array length] according to the length of the array, and select the number of the corresponding position from the array according to the random value; in this embodiment, the array length is 5, assuming that the random value generated from [1, 5] is 3, then the third value in the corresponding array is 10, and the data replacement table numbered 10 is selected.
[0080] In some embodiments, the fields included in the data header include: a data replacement table number of a set length, a data length of an original data block of a set length, and a data length of a replacement data block of a set length.
[0081] In some embodiments, in the data replacement module, the method for obtaining the encrypted data block includes:
[0082] Read the data replacement table number, the data length of the original data block, and the data length of the replacement data block according to the set length of each field in each data header;
[0083] Match the original data block according to the data length of the original data block;
[0084] According to the data replacement table number in the data header and the original data block, find the corresponding replacement data block from the data replacement table;
[0085] The data header is concatenated with the corresponding replacement data block to obtain an encrypted data block.
[0086] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0087] Example 2
[0088] An alternative digital encryption storage method, comprising:
[0089] Dividing the data to be encrypted into a plurality of original data blocks;
[0090] Generate a data header for each original data block; the data header is used to record replacement information for replacing data in the original data block;
[0091] Parse the replacement information of each data header, and replace each original data block with a replacement data block in the corresponding data replacement table according to the replacement information of each data header to obtain an encrypted data block; each encrypted data block constitutes the final encrypted data; the data replacement table is used to record the matching relationship between each original data block and the replacement data block.
[0092] In the above method, the data segmentation method includes:
[0093] A sequence table is obtained according to the data length of the data to be encrypted, and the sequence table is used to represent the data length of each original data block after division; the sum of the values in the sequence table is equal to the data length.
[0094] In the above method, the method for generating the values in the sequence table includes:
[0095] Obtain the sum of all the values in the sequence table; obtain the difference between the data length of the data to be encrypted and the sum; generate a positive integer random value less than the difference; store the random value in the sequence table; repeat this step until the number of cycles is equal to the number of data blocks of the original data block minus 1;
[0096] The sum of all the values in the sequence table is obtained, and the difference between the data length of the data to be encrypted and the sum is stored in the sequence table.
[0097] In the above method, the method of generating the data header of each original data block includes:
[0098] Read the sequence table in sequence, and read the original data block of the data length corresponding to each value in the sequence table from the data to be encrypted;
[0099] Determine the data replacement table number according to the data length of the original data block;
[0100] Match the corresponding replacement data block from the data replacement table according to the data replacement table number;
[0101] Get the data length of the replacement data block;
[0102] The data replacement table number, the data length of the original data block, and the data length of the replacement data block constitute the data header of each original data block.
[0103] In the above method, the method for determining the data replacement table number according to the data length of the original data block includes:
[0104] When a data length corresponds to only one data replacement table, the data replacement table number is determined according to the correspondence between the preset data length and the data replacement table number;
[0105] When a data length corresponds to multiple data replacement tables, the number of one of the data replacement tables is determined randomly.
[0106] In the above method, the fields contained in the data header include: a data replacement table number of a set length, a data length of an original data block of a set length, and a data length of a replacement data block of a set length.
[0107] In the above method, the method of obtaining the encrypted data block includes:
[0108] Read the data replacement table number, the data length of the original data block, and the data length of the replacement data block according to the set length of each field in each data header;
[0109] Match the original data block according to the data length of the original data block;
[0110] According to the data replacement table number in the data header and the original data block, find the corresponding replacement data block from the data replacement table;
[0111] The data header is concatenated with the corresponding replacement data block to obtain an encrypted data block.
[0112] Example 3
[0113] A computer program product comprises a computer program / instruction, wherein when the computer program / instruction is executed by a processor, any step of the replacement number encryption storage method is implemented.
[0114] Example 4
[0115] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the various steps of the method of the present invention are implemented, which will not be described in detail herein.
[0116] The computer-readable storage medium may be the data transmission device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smartmedia card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc., provided on the computer device.
[0117] Furthermore, the computer-readable storage medium may include both an internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data to be output or has been output.
[0118] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0122] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
Claims
1. An alternative digital encryption storage system, characterized in that: include: Data block module: used to divide the data to be encrypted into multiple original data blocks; Data labeling module: used to generate the data header of each original data block; The data header is used to record replacement information for replacing data in the original data block; Data replacement module: used to parse out the replacement information of each data header, and replace each original data block with a replacement data block in the corresponding data replacement table according to the replacement information of each data header, so as to obtain an encrypted data block; Each encrypted data block constitutes the final encrypted data; the data replacement table is used to record the matching relationship between each original data block and the replacement data block.
2. The alternative digital encryption storage system according to claim 1, characterized in that: In the data segmentation module, the data segmentation methods include: A sequence table is obtained according to the data length of the data to be encrypted, and the sequence table is used to represent the data length of each original data block after division; the sum of the values in the sequence table is equal to the data length.
3. The alternative digital encryption storage system according to claim 2, characterized in that: The methods for generating values in the sequence table include: Obtain the sum of all the values in the sequence table; obtain the difference between the data length of the data to be encrypted and the sum; generate a positive integer random value less than the difference; store the random value in the sequence table; repeat this step until the number of cycles is equal to the number of data blocks of the original data block minus 1; The sum of all the values in the sequence table is obtained, and the difference between the data length of the data to be encrypted and the sum is stored in the sequence table.
4. The alternative number encryption storage system according to claim 2 or 3, characterized in that: In the data marking module, the method for generating a data header of each original data block includes: Read the sequence table in sequence, and read the original data block of the data length corresponding to each value in the sequence table from the data to be encrypted; Determine the data replacement table number according to the data length of the original data block; Match the corresponding replacement data block from the data replacement table according to the data replacement table number; Get the data length of the replacement data block; The data replacement table number, the data length of the original data block, and the data length of the replacement data block constitute the data header of each original data block.
5. The alternative digital encryption storage system according to claim 4, characterized in that: The method for determining the data replacement table number according to the data length of the original data block includes: When a data length corresponds to only one data replacement table, the data replacement table number is determined according to the correspondence between the preset data length and the data replacement table number; When a data length corresponds to multiple data replacement tables, the number of one of the data replacement tables is determined randomly.
6. The alternative digital encryption storage system according to claim 1, characterized in that: The data header includes: a data replacement table number of a set length, a data length of an original data block of a set length, and a data length of a replacement data block of a set length.
7. The alternative digital encryption storage system according to claim 1 or 6, characterized in that: In the data replacement module, the method for obtaining the encrypted data block includes: Read the data replacement table number, the data length of the original data block, and the data length of the replacement data block according to the set length of each field in each data header; Match the original data block according to the data length of the original data block; According to the data replacement table number in the data header and the original data block, find the corresponding replacement data block from the data replacement table; The data header is concatenated with the corresponding replacement data block to obtain an encrypted data block.
8. A method for storing alternative digital encryption, characterized in that: include: Dividing the data to be encrypted into a plurality of original data blocks; Generate a data header for each original data block; the data header is used to record replacement information for replacing data in the original data block; Parse the replacement information of each data header, and replace each original data block with a replacement data block in the corresponding data replacement table according to the replacement information of each data header to obtain an encrypted data block; Each encrypted data block constitutes the final encrypted data; the data replacement table is used to record the matching relationship between each original data block and the replacement data block.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the alternative number encryption storage method as claimed in claim 8 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the alternative number encryption storage method according to claim 8 are implemented.
Citation Information
Patent Citations
File encryption and decryption method
CN102402670A
Meter encryption method
CN104065472A
ECB mode block encryption method and decryption method, control device and vehicle
CN113595717A
Data encryption method and device
CN114285562A
Backup method for data, backup processing system and computer program
JP2006260224A