A multi-channel data encryption method, device and equipment

By segmenting the encrypted data and multi-channel parallel encryption processing, the problems of slow data encryption speed and low efficiency in the prior art are solved, and more efficient data encryption is achieved.

CN119577816BActive Publication Date: 2025-05-23TAIXINGDA (BEIJING) SYST TECH CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510138718.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-23
Estimated Expiration
2045-02-08

AI Technical Summary

Technical Problem

When existing data encryption technologies cope with large-scale data processing, they have slow encryption speed and low data encryption efficiency, which limits the application scope and effectiveness of data encryption technology.

Method used

By dividing the data to be encrypted, multiple data blocks are obtained, and these data blocks are placed in multiple channels for parallel encryption processing, and finally the encrypted data blocks are merged into ciphertext data.

Benefits of technology

The adoption of multi-channel parallel encryption processing improves the speed and efficiency of data encryption, and solves the problems of slow encryption speed and low efficiency in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577816B_ABST
    Figure CN119577816B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-channel data encryption method, device and equipment, which belongs to the field of computer information processing technology and solves the problems of slow encryption speed and low data processing efficiency of existing encryption methods. The method includes: obtaining data to be encrypted; segmenting the data to be encrypted to obtain multiple data blocks; placing the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks; merging the multiple encrypted data blocks to obtain ciphertext data. The scheme improves the encryption speed of data by using multiple channels to perform parallel encryption processing on data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer information processing, and in particular to a multi-channel data encryption method, device and equipment. Background Art

[0002] With the rapid development of digital information, data protection has become a key link that cannot be ignored in all walks of life. With the widespread application of technologies such as cloud computing, the Internet of Things, and big data, data security and privacy protection are facing unprecedented challenges. As one of the core means of protecting data security, the efficiency and speed of data encryption are directly related to the real-time nature of data processing and the overall performance of the system. However, when dealing with large-scale data processing, existing data encryption technologies generally have the problems of slow encryption speed and low data encryption efficiency, which to a certain extent limits the application scope and effect of data encryption technology. Summary of the invention

[0003] The present invention provides a multi-channel data encryption method, device and equipment, which solve the problems of slow encryption speed and low data processing efficiency of existing encryption methods.

[0004] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0005] An embodiment of the present invention provides a multi-channel data encryption method, comprising:

[0006] Obtain the data to be encrypted;

[0007] Segmenting the data to be encrypted to obtain multiple data blocks;

[0008] Putting the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks;

[0009] The multiple encrypted data blocks are merged to obtain ciphertext data.

[0010] Optionally, the data to be encrypted is segmented to obtain multiple data blocks, including:

[0011] The data to be encrypted is segmented according to a preset threshold value to obtain a plurality of data blocks, wherein the storage space occupied by the plurality of data blocks is equal in size.

[0012] Optionally, the multiple data blocks are placed in multiple channels for encryption processing to obtain multiple encrypted data blocks, including:

[0013] Obtaining the number of the multiple channels;

[0014] According to the number of the multiple channels, the multiple data blocks are grouped to obtain multiple data block groups, wherein the number of data blocks in each data block group is equal to the number of the multiple channels;

[0015] The multiple data blocks are grouped and put into multiple channels for encryption processing to obtain multiple encrypted data blocks, wherein one data block is grouped and encrypted into the multiple channels at a time, and each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block.

[0016] Optionally, each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block, including:

[0017] Obtaining first key data;

[0018] Extracting the first key data block to obtain second key data;

[0019] Performing a permutation shift process on the second key data to obtain third key data;

[0020] The data block is processed according to the third key data to obtain an encrypted data block.

[0021] Optionally, performing a permutation shift process on the second key data to obtain third key data includes:

[0022] The second key data is divided according to the order of storage addresses to obtain first subkey data and second subkey data, wherein the first subkey data and the second subkey data are equal in size;

[0023] Exchanging the storage addresses of the first subkey data and the second subkey data, and merging them in a front-to-back order of the storage addresses to obtain third subkey data;

[0024] The third subkey data is shifted according to a preset value to obtain the third key data.

[0025] Optionally, the data block is processed according to the third key data to obtain an encrypted data block, including:

[0026] The data block is divided according to the order of storage addresses to obtain a first sub-data block and a second sub-data block, wherein the first sub-data block and the second sub-data block are equal in size;

[0027] According to the third key data, the first sub-data block and the second sub-data block are iteratively encrypted to obtain an encrypted data block.

[0028] Optionally, performing iterative encryption processing on the first sub-data block and the second sub-data block according to the third key data to obtain an encrypted data block includes:

[0029] according to:

[0030] , get the encrypted data block;

[0031] Among them, a 1 is the first sub-data block, a 2 is the second sub-data block, M is the encrypted data block, k is the third key data, ⊕ is the XOR operator, L i is the first process variable, R i is the second process variable, 0≤i≤n, n is the number of cycles, f (R i-1 ,k) is the encryption function.

[0032] The embodiment of the present invention further provides a multi-channel data encryption device, comprising:

[0033] An acquisition module, used for acquiring data to be encrypted;

[0034] A processing module, configured to divide the data to be encrypted to obtain a plurality of data blocks; and put the plurality of data blocks into a plurality of channels for encryption processing to obtain a plurality of encrypted data blocks;

[0035] The generating module is used to merge the multiple encrypted data blocks to obtain ciphertext data.

[0036] An embodiment of the present invention further provides a computing device, comprising: a processor and a memory storing a computer program, wherein the computer program executes the above method when executed by the processor.

[0037] An embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the above method.

[0038] The technical solution of the present invention includes at least the following effects:

[0039] The above scheme of the present invention obtains the data to be encrypted; divides the data to be encrypted to obtain multiple data blocks; puts the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks; and merges the multiple encrypted data blocks to obtain ciphertext data. The scheme improves the encryption speed of data by using multiple channels to perform parallel encryption processing on data. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flow chart of a multi-channel data encryption method provided by an embodiment of the present invention;

[0041] Figure 2 is a flow chart of the encryption process of the multi-channel data encryption method provided by an embodiment of the present invention;

[0042] Figure 3 is a structural diagram of a multi-channel data encryption device provided by an embodiment of the present invention;

[0043] Figure 4 It is a schematic diagram of the structure of a computing device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0045] like Figure 1 As shown, an embodiment of the present invention provides a multi-channel data encryption method, comprising:

[0046] Step 11, obtaining the data to be encrypted;

[0047] Step 12, dividing the data to be encrypted into multiple data blocks;

[0048] Step 13, putting the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks;

[0049] Step 14: merge the multiple encrypted data blocks to obtain ciphertext data.

[0050] In this embodiment, it is first necessary to obtain the original data to be encrypted from an input source, such as user input, file reading, network transmission, etc.; these data can be any form of digital information such as text, image, audio, video, etc.;

[0051] Since direct encryption of large data may lead to low processing efficiency or exceed the processing capacity of the encryption algorithm, the data to be encrypted is usually divided into multiple smaller data blocks; the size of the data block can be optimized according to the size of the data to be encrypted, the requirements of the encryption algorithm, and the system performance; for example, the data can be divided into fixed sizes (such as 64 bits, 128 bits, etc.), and the divided data blocks will be easier to manage and encrypt, and also facilitate subsequent parallel processing or distributed encryption;

[0052] Each divided data block will be sent to a different encryption channel for encryption processing; the encryption channel can be a hardware encryption module, a software encryption process or an encryption service provided by a cloud service; each channel can use the same or different encryption algorithms to increase the difficulty of cracking. For example, one channel can use a symmetric encryption algorithm to encrypt data, while another channel can use an asymmetric encryption algorithm to encrypt the key; this multi-channel encryption strategy not only improves the efficiency and security of encryption, but also ensures that even if part of the encrypted data is cracked, the other data remains safe;

[0053] After the encryption process is completed, all encrypted data blocks will be merged into a complete ciphertext data; this merging process may include simple splicing, data reorganization or adding additional metadata such as checksums, timestamps, etc. to ensure the integrity and verifiability of the data; the merged ciphertext data will be the final output of the encryption process and can be stored in a secure location and transmitted to the recipient over the network.

[0054] In an optional embodiment of the present invention, step 12 may include:

[0055] Step 121, segmenting the data to be encrypted according to a preset threshold to obtain a plurality of data blocks, wherein the storage space occupied by the plurality of data blocks is equal in size.

[0056] In this embodiment, first, a preset threshold is set according to the requirements of system processing performance; then, according to the preset threshold, the data to be encrypted is segmented and processed to obtain multiple data blocks, wherein the size of each data block is equal to the preset threshold; as a preferred scheme, in this embodiment, the preset threshold is set to 64 bits, that is, the size of each data block is 64 bits; at the same time, the storage address sequence of each data block is also consistent with its position in the data to be encrypted, and when the data blocks are read in the order of storage addresses and merged, the data to be encrypted can be obtained again.

[0057] In an optional embodiment of the present invention, step 13 may include:

[0058] Step 131, obtaining the number of the plurality of channels;

[0059] Step 132, grouping the plurality of data blocks according to the number of the plurality of channels to obtain a plurality of data block groups, wherein the number of data blocks in each data block group is equal to the number of the plurality of channels;

[0060] Step 133, grouping the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks, wherein one data block group is placed into the multiple channels for encryption processing at a time, and each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block.

[0061] In this embodiment, it is first necessary to determine how many encryption channels are available for processing data; these channels can be physical encryption hardware modules or software-level encryption processes; the methods for obtaining the number of channels include: (1) querying configuration information, i.e., reading the preset number of channels from the system configuration file; (2) dynamic detection, i.e., real-time detection of currently available encryption resources and dynamic determination of the number of available channels; (3) user input, i.e., in some cases, the user is required to manually specify the number of channels; the purpose of obtaining the number of channels is to be able to reasonably allocate data blocks to these channels in the future, so as to optimize the speed and efficiency of encryption processing;

[0062] After obtaining the number of channels, the data blocks need to be reasonably allocated to these channels; for example, when the number of data blocks is 1024 and the number of channels is 8, the data blocks can be divided into 128 groups in order, and each data block group includes the same number of data blocks as the number of channels, that is, 8 data blocks; at the same time, in each data block group, the order of each data block is also consistent with its position in the data to be encrypted;

[0063] When the multiple data blocks are grouped and put into multiple channels, they are put into the multiple channels in sequence for encryption processing according to the order of the groups. Since each data block group includes the same number of data blocks as the multiple channels, the multiple channels can complete the data encryption task of one data block group at a time. At the same time, each channel uses the same preset encryption algorithm to encrypt the assigned data blocks. Here, "same" means that the type and parameter settings of the encryption algorithm are the same, but the actual encryption operation of each channel is parallel, that is, the multiple channels process their own data blocks at the same time.

[0064] After encryption is completed, the encrypted data blocks output by each channel are collected and reassembled into an encrypted data set, that is, multiple encrypted data blocks are obtained.

[0065] In an optional embodiment of the present invention, in step 133, each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block, including:

[0066] Step 1331, obtaining first key data;

[0067] Step 1332, extracting the first key data block to obtain second key data;

[0068] Step 1333, performing a permutation shift process on the second key data to obtain third key data;

[0069] Step 1334: Process the data block according to the third key data to obtain an encrypted data block.

[0070] In this embodiment, the first key data is generated by the user's setting or input; the key data is stored in binary format, but may also be represented in a hexadecimal, Base64 or other encoding form for easy transmission and storage; as a preferred embodiment, in this embodiment, the size of the first key data is 64 bits, wherein the last 8 bits of the data are check bits;

[0071] The first key data block is extracted, that is, the 8-bit check bit is removed to obtain the second key data, the size of which is 56 bits. Through the above processing, the complexity and security of the key can be enhanced;

[0072] After obtaining the second key data, the second key data is subjected to permutation shift processing, including rearranging the elements of the key data to disrupt their original order, and shifting the elements of the key data to the left or right by a certain number of bits to generate a new key form, thereby obtaining the third key data, which is the final key form of the encryption algorithm.

[0073] The data block is encrypted using the third key data and the selected encryption algorithm and mode; the encryption process includes multiple rounds of iterations, key expansion, data block segmentation and merging, etc.; after encryption, an encrypted data block is obtained; multiple encrypted data blocks are merged in the order of processing to obtain ciphertext data, which is an encrypted form of the original data block and can be used for secure transmission or storage.

[0074] In an optional embodiment of the present invention, in step 1333, performing a permutation shift process on the second key data to obtain third key data includes:

[0075] Step 13331, splitting the second key data in a forward and backward order of the storage addresses to obtain first subkey data and second subkey data, wherein the first subkey data and the second subkey data are equal in size;

[0076] Step 13332, swapping the storage addresses of the first subkey data and the second subkey data, and merging them in a sequence of the storage addresses to obtain third subkey data;

[0077] The third subkey data is shifted according to a preset value to obtain the third key data.

[0078] Step 13333, in this embodiment, firstly, the second key data is segmented in the order of storage addresses to obtain first subkey data and second subkey data; the storage addresses of the first subkey data and the second subkey data are exchanged, that is, they are merged in the order of storage addresses to obtain third subkey data; for example, the second key data can be represented by c, where the size of c is 56 bits, c={a, b}, a is the first subkey data, b is the second subkey data, and the sizes of a and b are both 28 bits. After the above processing, the third subkey data obtained can be represented by d, where d={b, a};

[0079] After obtaining the third subkey data, the third subkey data is shifted according to a preset value and a preset direction, that is, the elements in d are shifted leftward or rightward. For example, if d={1, 2, 3, …, 9, 0}, the result of shifting leftward once is d={2, 3, 4, …, 0, 1}, and the result of shifting leftward twice is d={3, 4, 5, …, 1, 2};

[0080] The shifted data is extracted according to a preset size to obtain the third key data. For example, if the size of the shifted data is 56 bits, the first 48 bits of data can be extracted to obtain the third key data.

[0081] In an optional embodiment of the present invention, in step 1334, the data block is processed according to the third key data to obtain an encrypted data block, including:

[0082] Step 13341, dividing the data block according to the order of storage addresses to obtain a first sub-data block and a second sub-data block, wherein the first sub-data block and the second sub-data block are equal in size;

[0083] Step 13342: Perform iterative encryption processing on the first sub-data block and the second sub-data block according to the third key data to obtain an encrypted data block.

[0084] In this embodiment, the data block is segmented in the order of the storage address to obtain a first sub-data block and a second sub-data block; for example, the size of the data block is 64 bits, and the data block can be divided into two sub-data blocks of the same size, each of which is 32 bits in size; according to the third key data, the two sub-data blocks of the same size are iteratively encrypted for multiple times to obtain encrypted data blocks; the same key, i.e., the third key data, is used in each iteration; iterative encryption can increase the difficulty of cracking data, thereby improving data security, and in each encryption round, the data block will be transformed according to the key until all predetermined encryption rounds are completed; after iterative encryption, the first sub-data block and the second sub-data block are respectively encrypted into encrypted sub-data blocks.

[0085] In an optional embodiment of the present invention, in step 13342, the first sub-data block and the second sub-data block are iteratively encrypted according to the third key data to obtain an encrypted data block, including:

[0086] according to:

[0087] , get the encrypted data block;

[0088] Among them, a 1 is the first sub-data block, a 2 is the second sub-data block, M is the encrypted data block, k is the third key data, ⊕ is the XOR operator, L i is the first process variable, R i is the second process variable, 0≤i≤n, n is the number of cycles, f (R i-1 ,k) is the encryption function.

[0089] In this embodiment, the process of iteratively encrypting the first sub-data block and the second sub-data block according to the third key data can be expressed as:

[0090] ;

[0091] Specifically, Figure 2 As shown, the input of the iterative encryption process is the first sub-data block a 1 and the second sub-block a 2 , the expression of the iterative process is L i =R i-1 , R i =L i-1 ⊕f(R i-1 , k), after n iterations, the process variable L is obtained n , R n , L n and R nMerge data in the order in which they are stored, i.e. M=L n +R n , we can get the encrypted data block; where the encryption function f (R i-1 , k) The processing process includes:

[0092] (1) According to the size of the third key data k, the process variable R i-1 Interpolation expansion is performed, that is, the process variable R i-1 Divide into multiple sub-blocks, extract values ​​from the same position of each sub-block, fill in the space between sub-blocks, and complete the expansion from the beginning; for example, the size of k is 48 bits, R i-1 When the size is 32 bits, R i-1 Divide it into 8 sub-blocks, fill the last bit of the previous sub-block to the beginning and end of the next sub-block, and fill the beginning and end of the first sub-block with the last bit of the last sub-block, so as to realize the 32-bit R i-1 Expanded to 48 bits;

[0093] (2) The expanded R i-1 Perform an XOR operation with the third key data k to obtain the intermediate data R' i-1 ;

[0094] (3) R' i-1 The elements in are cyclically shifted in a preset direction and with a preset number of bits and the result is output.

[0095] A specific embodiment of the multi-channel data encryption method provided by an embodiment of the present invention is:

[0096] Step 1, obtaining the data to be encrypted;

[0097] The data to be encrypted can be any form of digital information such as text, image, audio, video, etc.

[0098] Step 2, dividing the data to be encrypted into multiple data blocks;

[0099] First, the segmentation threshold is set to 64 bits, and then the data to be encrypted is segmented to obtain multiple data blocks. The size of each data block is 64 bits. At the same time, the storage address sequence of each data block is also consistent with its position in the data to be encrypted.

[0100] Step 3, putting the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks;

[0101] First, the currently available encryption resources are detected in real time, and the number of available channels is dynamically determined; then, multiple data blocks are grouped according to the number of channels; for example, when the number of data blocks is 1024 and the number of channels is 8, the data blocks can be divided into 128 groups in order, and each data block group includes data blocks equal to the number of channels, that is, 8 data blocks; at the same time, in each data block group, the order of each data block is also consistent with its position in the data to be encrypted; when the multiple data blocks are grouped into multiple channels, they are sequentially placed into multiple channels in the order of grouping for encryption processing; after encryption is completed, the encrypted data blocks output by each channel are collected and recombined into an encrypted data set, that is, multiple encrypted data blocks are obtained; the specific encryption process includes:

[0102] (1) Generate key data; firstly, generate the first key data through the user's setting or input. The size of the first key data is 64 bits, of which the last 8 bits of the data are check bits; extract the first key data block, that is, remove the 8-bit check bits, and obtain the second key data, which can be expressed as c; after obtaining the second key data, first split the second key data in the order of the storage address to obtain the first subkey data and the second subkey data, that is, c={a,b}; swap the storage addresses of the first subkey data and the second subkey data to obtain the third subkey data, which can be expressed as d, and d={b, a}; after obtaining the third subkey data, shift the third subkey data left by 16 bits and extract the first 48 bits of data to obtain the third key data; the third key data is the key data to be generated;

[0103] (2) Encrypt the data block to obtain an encrypted data block; first, the 64-bit data block is divided according to the order of the storage address to obtain a first sub-data block and a second sub-data block, each of which is 32 bits in size; according to the third key data, the two sub-data blocks of the same size are encrypted multiple times to obtain an encrypted data block; wherein the iterative process can be expressed as:

[0104] ;

[0105] In this embodiment, the number of iterations n can be set to 16; after 16 iterations, the process variable L is obtained. n , R n , L n and R n Merge data in the order in which they are stored, i.e. M=L n +R n , you can get the encrypted data block;

[0106] Step 4: merge the multiple encrypted data blocks to obtain ciphertext data.

[0107] The encrypted data blocks processed by the 8 channels are collected and merged in the order of storage addresses to obtain the ciphertext data.

[0108] The multi-channel data encryption method proposed in the present invention improves the data encryption speed by using multiple channels to perform parallel encryption processing on data.

[0109] like Figure 3 As shown, the embodiment of the present invention further provides a multi-channel data encryption device 30, comprising:

[0110] An acquisition module 31, used to acquire data to be encrypted;

[0111] The processing module 32 is used to divide the data to be encrypted to obtain multiple data blocks; put the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks;

[0112] The generating module 33 is used to merge the multiple encrypted data blocks to obtain ciphertext data.

[0113] Optionally, the processing module 32 is specifically used for:

[0114] The data to be encrypted is segmented according to a preset threshold value to obtain a plurality of data blocks, wherein the storage space occupied by the plurality of data blocks is equal in size.

[0115] Optionally, the processing module 32 is further specifically configured to:

[0116] Obtaining the number of the multiple channels;

[0117] According to the number of the multiple channels, the multiple data blocks are grouped to obtain multiple data block groups, wherein the number of data blocks in each data block group is equal to the number of the multiple channels;

[0118] The multiple data blocks are grouped and put into multiple channels for encryption processing to obtain multiple encrypted data blocks, wherein one data block is grouped and encrypted into the multiple channels at a time, and each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block.

[0119] Optionally, each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block, including:

[0120] Obtaining first key data;

[0121] Extracting the first key data block to obtain second key data;

[0122] Performing a permutation shift process on the second key data to obtain third key data;

[0123] The data block is processed according to the third key data to obtain an encrypted data block.

[0124] Optionally, performing a permutation shift process on the second key data to obtain third key data includes:

[0125] The second key data is divided according to the order of storage addresses to obtain first subkey data and second subkey data, wherein the first subkey data and the second subkey data are equal in size;

[0126] Exchanging the storage addresses of the first subkey data and the second subkey data, and merging them in a front-to-back order of the storage addresses to obtain third subkey data;

[0127] The third subkey data is shifted according to a preset value to obtain the third key data.

[0128] Optionally, the data block is processed according to the third key data to obtain an encrypted data block, including:

[0129] The data block is divided according to the order of storage addresses to obtain a first sub-data block and a second sub-data block, wherein the first sub-data block and the second sub-data block are equal in size;

[0130] According to the third key data, the first sub-data block and the second sub-data block are iteratively encrypted to obtain an encrypted data block.

[0131] Optionally, performing iterative encryption processing on the first sub-data block and the second sub-data block according to the third key data to obtain an encrypted data block includes:

[0132] according to:

[0133] , get the encrypted data block;

[0134] Among them, a 1 is the first sub-data block, a 2 is the second sub-data block, M is the encrypted data block, k is the third key data, ⊕ is the XOR operator, L i is the first process variable, R i is the second process variable, 0≤i≤n, n is the number of cycles, f (R i-1 ,k) is the encryption function.

[0135] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0136] like Figure 4 As shown, the embodiment of the present invention further provides a computing device 40, including a processor 41, a memory 42, a program or instruction stored in the memory 42 and executable on the processor 41, and when the program or instruction is executed by the processor 41, each process of the above-mentioned multi-channel data encryption method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. It should be noted that the computing device in the embodiment of the present invention includes the above-mentioned mobile electronic device and non-mobile electronic device.

[0137] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0139] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0142] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0143] In addition, it should be pointed out that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understandable that all or any steps or components of the method and apparatus of the present invention can be implemented in hardware, firmware, software or a combination thereof in any computing device (including processors, storage media, etc.) or a network of computing devices, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.

[0144] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general-purpose device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code for implementing a method or device. That is to say, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.

[0145] The above are preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A multi-channel data encryption method, characterized in that: include: Obtain data to be encrypted; Segmenting the data to be encrypted to obtain multiple data blocks; Putting the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks; Merging the multiple encrypted data blocks to obtain ciphertext data; The data to be encrypted is segmented to obtain multiple data blocks, including: The data to be encrypted is segmented according to a preset threshold value to obtain a plurality of data blocks, wherein the storage space occupied by the plurality of data blocks is equal in size; The multiple data blocks are placed in multiple channels for encryption processing to obtain multiple encrypted data blocks, including: Obtaining the number of the multiple channels; According to the number of the multiple channels, the multiple data blocks are grouped to obtain multiple data block groups, wherein the number of data blocks in each data block group is equal to the number of the multiple channels; The plurality of data blocks are grouped and put into a plurality of channels for encryption processing to obtain a plurality of encrypted data blocks, wherein one data block is grouped and encrypted into the plurality of channels at a time, and each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block; Wherein, each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block, including: Obtaining first key data; Extracting the first key data block to obtain second key data; Performing a permutation shift process on the second key data to obtain third key data; The data block is divided according to the order of storage addresses to obtain a first sub-data block and a second sub-data block, wherein the first sub-data block and the second sub-data block are equal in size; according to: , get the encrypted data block, in, a 1 is the first sub-data block, a 2 is the second sub-data block, M To encrypt a block of data, k is the third key data, ⊕ is the XOR operator, L i is the first process variable, R i is the second process variable, 0≤ i ≤ n , n is the number of cycles, f ( R i-1 , k ) is the encryption function.

2. The multi-channel data encryption method according to claim 1, characterized in that: Performing a permutation shift process on the second key data to obtain third key data includes: The second key data is divided according to the order of storage addresses to obtain first subkey data and second subkey data, wherein the first subkey data and the second subkey data are equal in size; Exchanging the storage addresses of the first subkey data and the second subkey data, and merging them in a front-to-back order of the storage addresses to obtain third subkey data; The third subkey data is shifted according to a preset value to obtain the third key data.

3. A multi-channel data encryption device, characterized in that: include: An acquisition module, used for acquiring data to be encrypted; A processing module, used for segmenting the data to be encrypted to obtain multiple data blocks; Putting the multiple data blocks into multiple channels for encryption processing to obtain multiple encrypted data blocks; A generating module, used for merging the plurality of encrypted data blocks to obtain ciphertext data; The data to be encrypted is segmented to obtain multiple data blocks, including: The data to be encrypted is segmented according to a preset threshold value to obtain a plurality of data blocks, wherein the storage space occupied by the plurality of data blocks is equal in size; The multiple data blocks are placed in multiple channels for encryption processing to obtain multiple encrypted data blocks, including: Obtaining the number of the multiple channels; According to the number of the multiple channels, the multiple data blocks are grouped to obtain multiple data block groups, wherein the number of data blocks in each data block group is equal to the number of the multiple channels; The plurality of data blocks are grouped and put into a plurality of channels for encryption processing to obtain a plurality of encrypted data blocks, wherein one data block is grouped and encrypted into the plurality of channels at a time, and each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block; Wherein, each channel uses the same preset encryption algorithm to encrypt the data block to obtain an encrypted data block, including: Obtaining first key data; Extracting the first key data block to obtain second key data; Performing a permutation shift process on the second key data to obtain third key data; The data block is divided according to the order of storage addresses to obtain a first sub-data block and a second sub-data block, wherein the first sub-data block and the second sub-data block are equal in size; according to: , get the encrypted data block, in, a 1 is the first sub-data block, a 2 is the second sub-data block, M To encrypt a block of data, k is the third key data, ⊕ is the XOR operator, L i is the first process variable, R i is the second process variable, 0≤ i ≤ n , n is the number of cycles, f ( R i-1 , k ) is the encryption function.

4. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 2 is performed.

5. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Data encryption method and device and electronic equipment

    CN116663038A

  • Encryption transmission method and device suitable for video data, equipment and medium

    CN118740517A