An alternative digital encryption storage system and method
Data is encrypted by data blocking and replacement table methods, which solves the problems of key security and hardware performance, realizes efficient and secure data encryption, and enhances data integrity and traceability.
Patent Information
- Application Number
- CN202411414340.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-10-11
AI Technical Summary
In existing encryption technologies, key security issues lead to a high risk of data leakage, and the complex encryption and decryption calculation process requires high hardware performance, affecting timeliness and reliability.
The data to be encrypted is divided into multiple original data blocks using a data block module, and a data header is generated for each data block. The original data block is replaced with a replacement data block through a data replacement table to form an encrypted data block. The data header is used to record the replacement information for encryption, avoiding the use of keys.
It simplifies the encryption process, saves hardware performance, improves data security and processing efficiency, reduces the risk of key leakage, and enhances data integrity and traceability.
Smart Images

Figure CN119475370B_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 data encryption storage system and method. Background Art
[0002] Nowadays, with the rapid development of network communications and computer technology, almost all types of data are stored digitally. While the informatization of society has brought convenience, it has also been accompanied by the emergence of privacy issues. The leakage of personal information of individual users and business secrets between organizations can cause significant losses. Therefore, data confidentiality is one of the greatest challenges we face in protecting personal privacy and business secrets, and encryption technology is one of the effective means to maintain data security.
[0003] Currently, data is typically encrypted and stored using a fixed key. The key is a string of characters that is combined with the original data through a series of binary operations to generate new data. Since the new data is calculated and cannot be read, it fulfills the encryption purpose. The decryption process involves performing the reverse operation of encryption on the encrypted data and the key to recover the original key. Whether symmetric or asymmetric encryption, since the algorithm is public, the reliability of the encryption depends on the key. Once the key is leaked, the encrypted content can also be decrypted. Therefore, how to securely store the key is a major challenge. Using the same key for all data can also pose security issues. If the key is leaked, the entire data content is also compromised. The complex encryption and decryption calculation process places high demands on hardware performance, which can have a significant impact when timeliness is critical 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 for achieving one of the objectives 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 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 the 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, if 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. 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 a 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 length 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 also not limited here.
[0013] In the above data segmentation module, the data segmentation method includes:
[0014] A sequence table is obtained based on 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 benefits of the data segmentation method described above include: the sum of the values in the sequence table equals the data length of the original data. This design ensures data integrity and allows for flexible selection of data length units, whether bytes or bits, to adapt to different application scenarios and data types, enhancing the flexibility and versatility of the technology. The process of generating the sequence table effectively prepares for subsequent encryption operations. By specifying the size of each data block, the granularity of the data blocks can be more precisely controlled, optimizing data replacement or encryption performance. This also facilitates the implementation of more complex encryption strategies, such as using different data replacement tables for different data blocks. Because the sequence table is dynamically generated based on the actual length of the data to be encrypted, the method can process data of any length without requiring data length restrictions or preprocessing, improving the applicability and scalability of the technology. Dividing the original data using the sequence table simplifies the subsequent data processing process, allowing each data block to be processed independently, reducing data dependencies and interactions, and improving data processing efficiency and reliability. In summary, the technical benefits of this method are primarily reflected in the preprocessing and segmenting of the original data by generating the sequence table, which facilitates and supports subsequent encryption or processing operations, enhancing 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 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 is understandable that, during the first loop, the sequence list is empty, and therefore the sum of all 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 the data length information of the original data block and the replacement data block, as well as the data replacement table number used for the 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 addition 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 to 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 of 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 preset correspondence between the 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 it is only necessary to set the flag bit to a corresponding identification value, thereby increasing the flexibility of data replacement.
[0032] The technical effects of the above-mentioned 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, which reduces the computational complexity of searching and selecting the replacement table and improves 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; by pre-setting the correspondence or array between the data length and the replacement table number, the errors caused by manually selecting 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 data header includes fields such as a data replacement table number of a set length, the data length of the original data block of a set length, and the data length of the replacement data block of a set length. One original data block corresponds to one data header, and the set length can be determined based on actual conditions and is not limited by the present invention.
[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 encrypting 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, based on 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 subsequent replacement operations. Using the data replacement table number and the matched original data block in the data header, the system can intelligently search and find the corresponding replacement data block in the data replacement table. This mechanism realizes the intelligent and efficient data replacement process. Finally, the data header containing control information is seamlessly spliced with the found replacement data block 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 unauthorized third parties to parse or tamper with the encrypted data during transmission or storage. In summary, the data replacement module achieves efficient and accurate data encryption through automated data reading, precise original data matching, intelligent replacement data search, and seamless data splicing, thereby enhancing data security and protection level.
[0040] An alternative digital encryption storage method for achieving the second objective of the present invention includes:
[0041] Dividing the data to be encrypted into multiple original data blocks;
[0042] Generate a data header for each original data block; the data header is used to record replacement information for replacing 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, there is no key storage problem, which further improves security. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 Schematic diagram of the system of the present invention. DETAILED DESCRIPTION
[0047] The following detailed description is intended to explain the technical solutions of the present invention claims, so that those skilled in the art can understand the present claims. The scope of protection of the present invention is not limited to the specific implementation structures described below. Any implementation schemes created by those skilled in the art that incorporate the technical solutions of the present invention claims but differ from the following detailed descriptions are also within the scope of protection 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 the replacement information of the data replacement of 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 the 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. The data length of each replacement data block can be fixed or indefinite; 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 generated based on the length of the data to be encrypted. The sequence table represents the length of each original data block after division. The sum of the values in the sequence table equals the data length. For example, if the length of the data to be encrypted is 24, the generated sequence table is [8, 3, 6, 2, 5], indicating that the data to be encrypted is divided into 5 data blocks, with the lengths of each data block being 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 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] Assume 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 loop: 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; a positive integer between [1, 16) is generated, assuming 3 is generated; 3 is stored 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; a positive integer between [1, 13) is generated, assuming 6 is generated; 6 is stored 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; a positive integer between [1, 7) is generated, assuming 2 is generated; 2 is stored 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 from 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, the method of generating a data header for 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 based on 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 tables of the five original data blocks are numbered #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, a matching data pair is found from the data replacement table according to the original data block. Taking the first original data block [10001001] as an example, the data pair [10001001, 01101011] is found 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 header information generation of other original data blocks is not repeated here.
[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 preset correspondence between the 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 size of the serial numbers of the steps in the above embodiments does not 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 embodiments of the present invention.
[0087] Example 2
[0088] An alternative digital encryption storage method, comprising:
[0089] Dividing the data to be encrypted into multiple original data blocks;
[0090] Generate a data header for each original data block; the data header is used to record replacement information for replacing 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 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 of 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 preset correspondence between the 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 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.
[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, which implements any step of the replacement number encryption storage method when executed by a processor.
[0114] Example 4
[0115] A computer-readable storage medium stores a computer program, which 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 repeated here.
[0116] The computer-readable storage medium may be the data transmission device provided in any of the aforementioned embodiments or an internal storage unit of a computer device, such as a 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 media card (SMC), a secure digital (SD) card, a 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 that has been output.
[0118] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, 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 magnetic 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 flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, 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 flowcharts and / or block diagrams. 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 that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The 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 operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device 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 marking module: used to generate the data header of each original data block; The data header is used to record replacement information for replacing the original data block; Data replacement module: used to parse the replacement information of each data header, and replace each original data block with the replacement data block in the corresponding data replacement table according to the replacement information of each data header to obtain the 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; In the data segmentation module, the data segmentation methods include: Obtain a sequence table according to the data length of the data to be encrypted, wherein 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; Methods for generating values in a sequence table include: Obtain the sum of all 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.
2. The alternative digital encryption storage system according to claim 1, wherein: 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.
3. The alternative digital encryption storage system according to claim 2, wherein: 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 preset correspondence between the 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.
4. The alternative digital encryption storage system according to claim 1, wherein: 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.
5. The alternative digital encryption storage system according to claim 1 or 4, 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.
6. A method for storing alternative digital encryption according to the system of claim 1, characterized in that: include: Dividing the data to be encrypted into multiple original data blocks; Generate a data header for each original data block; The data header is used to record replacement information for replacing 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.
7. 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 according to claim 6 are implemented.
8. 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 6 are implemented.
Citation Information
Patent Citations
File encryption and decryption method
CN102402670A
ECB mode block encryption method and decryption method, control device and vehicle
CN113595717A