Secure network programming method based on rank metric error correction code and related products
By performing round key encryption, rank metric coding, random linear coding and rank metric error correction decoding on information data, the problem of low stability of random network coding in a bit error environment is solved and high security and stability of data transmission are achieved. sex.
Patent Information
- Application Number
- CN202410706086.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-06-03
AI Technical Summary
When existing random network coding transmits information in a network environment with errors, data stability is low and it lacks an effective error control mechanism.
A secure network programming method based on rank metric error correction codes is adopted to ensure the security and stability of data during transmission by performing round key encryption, rank metric encoding, random linear encoding and rank metric error correction decoding on information data.
It improves the security and stability of data transmission, prevents data leakage, tampering and noise interference, and ensures the integrity and privacy of data transmission.
Smart Images

Figure CN118300892B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data network technology, and in particular to a secure network programming method based on rank metric error correction code and related products. Background Art
[0002] Random Network Coding (RNC) is a technology for data transmission in the network. Random network coding improves the reliability and efficiency of the network by performing random linear combinations of data packets. It is widely used in the field of data transmission.
[0003] Existing random network coding treats each data packet as a vector and uses random coefficients to perform linear combinations for data transmission. In actual use, random network coding itself does not provide an error control mechanism, which makes data vulnerable to damage when transmitting information in a network environment with errors, and may lead to low stability when programming data for network transmission. Summary of the invention
[0004] The present invention provides a secure network programming method based on rank metric error correction code and related products, the main purpose of which is to solve the problem of low stability when data is transmitted through network programming in related technologies.
[0005] To achieve the above-mentioned objectives, the present invention provides a secure network programming method based on rank metric error correction code, comprising: encrypting information data with round keys to obtain encrypted information data; rank metric encoding the encrypted information data to obtain an encoded data packet; performing random linear encoding on the encoded data packet to obtain a network data packet; performing rank metric error correction decoding on the network data packet to obtain a recovery data packet; and decrypting the recovery data packet with round keys to obtain decrypted data.
[0006] In order to solve the above problems, the present invention also provides a secure network programming system based on rank metric error correction code, the system including: a data encryption module, used to perform round key encryption on information data to obtain encrypted information data; a rank metric encoding module, used to perform rank metric encoding on encrypted information data to obtain an encoded data packet; a linear encoding module, used to perform random linear encoding on the encoded data packet to obtain a network data packet; a rank metric decoding module, used to perform rank metric error correction decoding on the network data packet to obtain a recovered data packet; a data decryption module, used to perform round key decryption on the recovered data packet to obtain decrypted data.
[0007] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0008] at least one processor; and,
[0009] a memory communicatively connected to at least one processor; wherein,
[0010] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the above-mentioned secure network programming method based on rank metric error correction code.
[0011] In order to solve the above problems, the present invention also provides a computer-readable storage medium storing a computer program, which implements the above-mentioned secure network programming method based on rank metric error correction code when executed by a processor.
[0012] The embodiment of the present invention can encrypt and protect the information data by encrypting the information data with round keys, prevent data leakage during network programming transmission, and improve the security of information data transmission. By rank-metric encoding the encrypted information data, the encrypted information data can be re-encrypted by linear coding, and transmission error correction can be achieved according to the result of rank measurement, thereby improving the stability of network programming. By performing random linear encoding on the encoded data packet, the linear encoding of the encoded data packet can be achieved using a linear network, thereby reducing the possibility of eavesdropping and leakage by eavesdroppers. By performing rank-metric error correction decoding on the network data packet, the error correction of the network data packet can be achieved using the rank-metric error correction coding algorithm, thereby preventing data from being tampered with, and removing noise data during network transmission, thereby ensuring the integrity of data transmission. By performing round-key decryption on the recovery data packet, the privacy security of data transmission is improved, thereby improving the stability of data transmission. Therefore, the secure network programming method and related products based on rank-metric error correction code proposed by the present invention can solve the problem of low stability when data is transmitted through network programming. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flowchart of a secure network programming method based on rank metric error correction code provided by one embodiment of the present invention;
[0014] Figure 2 A schematic diagram of a process for performing rank metric encoding provided by an embodiment of the present invention;
[0015] Figure 3 A schematic diagram of a process for performing an error query provided by an embodiment of the present invention;
[0016] Figure 4 A functional module diagram of a secure network programming system based on rank metric error correction code provided by an embodiment of the present invention;
[0017] Figure 5 A schematic diagram of the structure of an electronic device for implementing a secure network programming method based on rank metric error correction code provided by one embodiment of the present invention.
[0018] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0019] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0020] The embodiment of the present application provides a secure network programming method based on rank metric error correction code. The execution subject of the secure network programming method based on rank metric error correction code includes but is not limited to at least one of the electronic devices such as the server and the terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the secure network programming method based on rank metric error correction code can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0021] Reference Figure 1 FIG. 1 is a flow chart of a secure network programming method based on a rank metric error correction code provided by an embodiment of the present invention. In this embodiment, the secure network programming method based on a rank metric error correction code includes:
[0022] S1. Encrypt the information data with a round key to obtain encrypted information data.
[0023] Specifically, information data refers to source data that needs to be transmitted through network programming. In order to prevent the information data from being eavesdropped and leaked during transmission, the information data needs to be encrypted to obtain encrypted information data.
[0024] In an embodiment of the present invention, information data is encrypted with round keys to obtain encrypted information data, including: performing a data block operation on the information data to obtain information data blocks; performing a key expansion on a preset initial key to obtain an extended round key; performing an initial bit-by-bit XOR operation on the information data block using the extended round key to obtain initial encrypted data; and performing a multi-level round encryption operation on the initial encrypted data using the extended round key to obtain encrypted information data.
[0025] In detail, data block operation refers to dividing information data into data blocks according to a preset bit length, and filling zeros in the insufficient parts. Key expansion refers to expanding the initial key into a multi-round key sequence. The key expansion algorithm can be used to expand the key. The initial bit-by-bit XOR operation uses the first key of the expansion round key to perform an XOR operation on the information data block according to the byte bit of the data.
[0026] In detail, the initial encrypted data is subjected to a multi-level round encryption operation using an extended round key to obtain encrypted information data, including: performing a multi-level byte replacement on the initial encrypted data using a preset byte table to obtain replaced encrypted data; performing a multi-level row shift operation on the replaced encrypted data to obtain shifted encrypted data; performing a multi-level column mixing operation on the shifted encrypted data to obtain mixed encrypted data; performing a multi-level bit-by-bit XOR operation on the mixed encrypted data to obtain encrypted information data.
[0027] In detail, the byte table refers to a fixed table of an S-box (Substitution box), and multi-level byte substitution refers to replacing bytes in the initial encrypted data with corresponding bytes in the byte table during each round of encryption.
[0028] In detail, multi-level row shifting refers to cyclic shifting by row during each round of encryption, and multi-level column mixing refers to linearly transforming each column of the shifted encrypted data using a column mixing algorithm during each round of encryption.
[0029] In the embodiment of the present invention, by encrypting the information data with round keys, the information data can be encrypted and protected, thereby preventing data leakage during network programming transmission and improving the security of information data transmission.
[0030] S2. Perform rank metric encoding on the encrypted information data to obtain an encoded data packet.
[0031] In detail, during the process of network programming transmission, encrypted information data may have data errors due to communication noise and other problems. In order to correct the erroneous data, the encrypted information data needs to be rank-coded. The encoded data packet is the input data transmitted by the sender to the linear network.
[0032] In the embodiment of the present invention, refer to Figure 2 As shown, the specific implementation process of performing rank metric encoding on the encrypted information data to obtain the encoded data packet includes:
[0033] S21, performing a random matrix expansion operation on the encrypted information data to obtain an expansion matrix;
[0034] S22, constructing a linear matrix according to the extended matrix to obtain a generated matrix;
[0035] S23, performing error correction coding on the extended matrix according to the generation matrix to obtain an error correction data packet;
[0036] S24. Perform metric rank calculation on the error correction data packet to obtain an encoded data packet.
[0037] Specifically, in order to further encrypt the encrypted information data, the encrypted information data can be expanded using a random matrix, and the encrypted information data can be further converted into a matrix form to facilitate subsequent rank metric encoding.
[0038] In detail, a random matrix expansion operation is performed on the encrypted information data to obtain an expanded matrix, including: performing a data block operation on the encrypted information data to obtain an encrypted data block; performing a matrix operation on the encrypted data block to obtain an encrypted matrix; performing a parameter matrix initialization on the encrypted matrix to obtain a random matrix; and performing matrix expansion on the encrypted matrix according to the random matrix to obtain an expanded matrix.
[0039] In detail, the matrix operation refers to splicing each data block as a row of matrix elements into an encrypted matrix according to the segmentation length of the encrypted data block, the parameter matrix initialization refers to randomly initializing a data matrix with the same column length according to the column length of the encrypted matrix, and the matrix expansion refers to splicing the encrypted matrix and the random matrix into an extended matrix.
[0040] In detail, a linear matrix is constructed according to the extended matrix to obtain a generator matrix, including: extracting a matrix width from the extended matrix, initializing the generator matrix in a preset extended domain according to the matrix width, wherein the matrix width of the generator matrix is the same as the matrix width of the extended matrix.
[0041] Specifically, error correction coding refers to using matrix multiplication to calculate the matrix product of the generating matrix and the expansion matrix, splitting the matrix product into error correction data packets by rows, and using Gaussian elimination to calculate the metric rank. The metric rank obtained by the metric rank calculation is used to ensure the security of the data during transmission. As long as the value of the metric rank is less than or equal to the number of eavesdropped links, the encoded data packet can be kept confidential from eavesdroppers in the linear network.
[0042] In the embodiment of the present invention, by performing rank measurement encoding on the encrypted information data, the encrypted information data can be re-encrypted using linear coding, and transmission error correction is implemented according to the result of the rank measurement, thereby improving the stability of network programming.
[0043] S3. Perform random linear encoding on the encoded data packet to obtain a network data packet.
[0044] In detail, in order to further realize the encryption of information data, a linear network can be used to perform linear combination transmission on the encoded data packets, and the network data packet is a data packet obtained after the encoded data packet is encoded through the linear network.
[0045] Specifically, linear networks can be applied to a variety of network environments, such as wireless sensor networks, satellite communication networks, data center networks, etc. By selecting appropriate rank codes and random network coding coefficients, they can be optimized according to different network conditions and security requirements.
[0046] In an embodiment of the present invention, random linear coding is performed on a coded data packet to obtain a network data packet, including: initializing random coefficients on the coded data packet to obtain random coding coefficients; linearly combining the coded data packets according to the random coding coefficients to obtain a recombined data packet; and iteratively network coding the recombined data packet to obtain a network data packet.
[0047] In detail, random coefficient initialization refers to generating a random coefficient vector according to each intermediate node or source node of the linear network, linear combination refers to multiplying the data matrix corresponding to the encoded data packet by the random coding coefficient, and iterative network coding refers to re-performing the above-mentioned linear combination operation on the reassembled data packet as the encoded data packet at each layer of the linear network.
[0048] In detail, based on the confidentiality of metric rank coding, if the matrix form of the noise data in the linear network transmission process is the noise matrix, the number of links of the eavesdropper in the linear network is the number of eavesdropping links, and the length of the message in the encoded data packet is the message length, when the difference between the rank of the encoded data packet and the message length and the number of eavesdropping links is greater than twice the rank of the noise matrix, it can ensure that the data can be effectively and reliably recovered during the subsequent rank metric error correction decoding.
[0049] In the embodiment of the present invention, by performing random linear encoding on the encoded data packets, the linear encoding of the encoded data packets can be realized by using a linear network, thereby reducing the possibility of eavesdropping and leaking of information by an eavesdropper, and improving the security and privacy of the data.
[0050] S4. Perform rank metric error correction decoding on the network data packet to obtain a recovered data packet.
[0051] In detail, since noise may occur in network transmission, after the network data packet is transmitted to the receiving end, the received data needs to be error corrected and decoded. The data content of the restored data packet is the same as the encrypted information data, and the rank metric error correction decoding steps can be implemented at the receiving end.
[0052] In an embodiment of the present invention, rank metric error correction decoding is performed on a network data packet to obtain a recovered data packet, including: performing syndrome calculation on the network data packet to obtain a data syndrome vector; performing error query on the network data packet according to the data syndrome vector to obtain a transmission error value; performing data error correction on the network data packet according to the transmission error value to obtain a recovered data packet.
[0053] In detail, the generation matrix can be used to perform syndrome calculation on the network data packet to obtain a data syndrome vector, including generating a transposed matrix of the generation matrix, and multiplying the network data packet by the transposed matrix to obtain the data syndrome vector.
[0054] Specifically, refer to Figure 3 As shown, the above-mentioned error query of the network data packet according to the data syndrome vector to obtain the specific implementation process of the transmission error includes:
[0055] S31, calculating an error locating polynomial for the network data packet according to the data syndrome vector to obtain a locating polynomial;
[0056] S32, performing root space mapping on the positioning polynomial according to the data syndrome vector to obtain a positioning error basis;
[0057] S33, performing error positioning on the network data packet according to the positioning error base to obtain an error position;
[0058] S34, calculating an error value of the network data packet according to the positioning polynomial to obtain a positioning error value;
[0059] S35. Error marking the error position according to the positioning error value to obtain a transmission error value.
[0060] In detail, an error locator polynomial (ESP) or an error locator polynomial (ELP) may be used to calculate the error locator polynomial, where the locator polynomial refers to a mathematical expression of the error span polynomial or the error locator polynomial.
[0061] Specifically, the root space mapping of the positioning polynomial can be achieved by calculating the left null space. The positioning error basis refers to the basis of the positioning polynomial in the left null space. The right inverse algorithm can be used to locate errors in network data packets. The error position refers to the position where data with errors or noise occur during transmission in the network data packet. The error value calculation refers to substituting the data into the positioning polynomial. The positioning error value represents the degree of error deviation of the corresponding error position.
[0062] In detail, data error correction refers to filtering out the data to be corrected from the network data packet according to the error position, and correcting the data to be corrected according to the transmission error value to obtain the transmission error.
[0063] In an embodiment of the present invention, by performing rank metric error correction decoding on network data packets, the rank metric error correction coding algorithm can be used to implement error correction of network data packets, thereby preventing data tampering and removing noise data during network transmission, ensuring the integrity of data transmission and improving data transmission stability.
[0064] S5. Decrypt the restored data packet using the round key to obtain decrypted data.
[0065] In detail, the recovery data packet is encrypted data. In order to extract the original data from the recovery data packet, the recovery data packet needs to be decrypted with a round key, wherein the decrypted data is the same as the content of the information data. The round key decryption step can be implemented at the receiving end.
[0066] In an embodiment of the present invention, a round key is used to decrypt a recovery data packet to obtain decrypted data, including: performing a data block operation on the recovery data packet to obtain a recovery data block; obtaining an extended round key corresponding to the recovery data packet; performing a reverse round bit-by-bit XOR operation on the recovery data block using the extended round key to obtain initial decrypted data; and performing a reverse round decryption operation on the initial decrypted data using the extended round key to obtain decrypted information data.
[0067] In detail, the extended round key is the same as the extended round key in the above step S1, and the reverse round bit-by-bit XOR operation refers to performing a bit-by-bit XOR operation on the restored data block using the last key of the extended round key.
[0068] Specifically, the initial decrypted data is subjected to a reverse decryption operation using the extended round key to obtain decrypted information data, including: performing a multi-level reverse shift operation on the initial decrypted data to obtain shifted decrypted data; performing a multi-level reverse byte replacement operation on the shifted decrypted data to obtain replaced decrypted data; performing a multi-level bit-by-bit XOR operation on the replaced decrypted data to obtain XOR decrypted data; performing a multi-level reverse column mixing operation on the XOR decrypted data to obtain decrypted information data.
[0069] In detail, the multi-level reverse row shift is the inverse step of the multi-level row shift in the above step S1, the multi-level reverse byte replacement is the inverse step of the multi-level byte replacement in the above step S1, and the reverse column mixing operation is the inverse step of the multi-level column mixing in the above step S1.
[0070] In the embodiment of the present invention, by decrypting the recovery data packet with the round key, encryption and decryption of data during data transmission can be completed, the privacy security of data transmission is improved, and the stability of data transmission is further improved.
[0071] The embodiment of the present invention can encrypt and protect the information data by encrypting the information data with round keys, prevent data leakage during network programming transmission, and improve the security of information data transmission. By rank-metric encoding the encrypted information data, the encrypted information data can be re-encrypted by linear coding, and transmission error correction can be achieved according to the result of rank measurement, thereby improving the stability of network programming. By performing random linear encoding on the encoded data packet, the linear encoding of the encoded data packet can be achieved using a linear network, thereby reducing the possibility of eavesdropping and leakage by eavesdroppers. By performing rank-metric error correction decoding on the network data packet, the error correction of the network data packet can be achieved using the rank-metric error correction coding algorithm, thereby preventing data from being tampered with, and removing noise data during network transmission, thereby ensuring the integrity of data transmission. By performing round-key decryption on the recovery data packet, the privacy security of data transmission is improved, thereby improving the stability of data transmission. Therefore, the secure network programming method based on rank-metric error correction code proposed by the present invention can solve the problem of low stability when data is transmitted for network programming.
[0072] like Figure 4 As shown, it is a functional module diagram of a secure network programming system based on rank metric error correction code provided by one embodiment of the present invention.
[0073] The secure network programming system 400 based on rank metric error correction code of the present invention can be installed in an electronic device. According to the functions implemented, the secure network programming system 400 based on rank metric error correction code can include a data encryption module 401, a rank metric encoding module 402, a linear encoding module 403, a rank metric decoding module 404 and a data decryption module 405. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0074] In this embodiment, the functions of each module / unit are as follows:
[0075] The data encryption module 401 is used to perform round key encryption on the information data to obtain encrypted information data;
[0076] The rank metric encoding module 402 is used to perform rank metric encoding on the encrypted information data to obtain an encoded data packet;
[0077] The linear encoding module 403 is used to perform random linear encoding on the encoded data packet to obtain a network data packet;
[0078] A rank metric decoding module 404 is used to perform rank metric error correction decoding on the network data packet to obtain a recovered data packet;
[0079] The data decryption module 405 is used to decrypt the restored data packet using the round key to obtain decrypted data.
[0080] In detail, each module in the secure network programming system 400 based on rank metric error correction code in the embodiment of the present invention adopts the same Figure 1 The secure network programming method based on rank metric error correction code has the same technical means and can produce the same technical effects, so I will not go into details here.
[0081] like Figure 5 1 is a schematic diagram of the structure of an electronic device for implementing a secure network programming method based on rank metric error correction code provided by an embodiment of the present invention.
[0082] The electronic device 501 may include a processor 510, a memory 511, a communication bus 512, and a communication interface 513, and may also include a computer program stored in the memory 511 and executable on the processor 510, such as a secure network programming program based on a rank metric error correction code.
[0083] Among them, the processor 510 may be composed of an integrated circuit in some embodiments, for example, it may be composed of a single packaged integrated circuit, or it may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips, etc. The processor 510 is the control core (Control Unit) of the electronic device, which uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory 511 (for example, executing a secure network programming program based on a rank metric error correction code, etc.), and calling data stored in the memory 511.
[0084] The memory 511 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 511 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 511 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 511 may also include both an internal storage unit of the electronic device and an external storage device. The memory 511 can not only be used to store application software and various types of data installed in the electronic device, such as the code of a secure network programming program based on a rank metric error correction code, but also can be used to temporarily store data that has been output or is to be output.
[0085] The communication bus 512 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 511 and at least one processor 510, etc.
[0086] The communication interface 513 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0087] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0088] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to at least one processor 510 through a power management system, so that the power management system can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0089] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited by this structure.
[0090] Specifically, the specific implementation method of the processor 510 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0091] Furthermore, if the module / unit integrated in the electronic device 501 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or system capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM).
[0092] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0093] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A secure network programming method based on rank-metric error correction code, applied to linear networks, including wireless sensor networks, satellite communication networks, and data center networks, characterized in that: The method comprises: Performing round key encryption on the information data to obtain encrypted information data; Performing rank metric encoding on the encrypted information data to obtain an encoded data packet; Performing random linear encoding on the encoded data packet to obtain a network data packet; Performing rank metric error correction decoding on the network data packet to obtain a recovered data packet; Decrypting the restored data packet with a round key to obtain decrypted data; The step of performing rank metric encoding on the encrypted information data to obtain a coded data packet includes: performing a random matrix expansion operation on the encrypted information data to obtain an expansion matrix; performing linear matrix construction based on the expansion matrix to obtain a generator matrix; calculating the matrix product of the generator matrix and the expansion matrix by matrix multiplication, and splitting the matrix product into error correction data packets by row; performing metric rank calculation on the error correction data packet to obtain a coded data packet; The method of performing rank metric error correction decoding on the network data packet to obtain a recovered data packet includes: multiplying the network data packet by the transposed matrix of the generating matrix to obtain a data syndrome vector; performing an error query on the network data packet according to the data syndrome vector to obtain a transmission error value; and performing data error correction on the network data packet according to the transmission error value to obtain a recovered data packet.
2. The secure network programming method based on rank metric error correction code according to claim 1, characterized in that: The step of encrypting the information data with a round key to obtain the encrypted information data comprises: Performing data block operation on the information data to obtain information data blocks; Perform key expansion on the preset initial key to obtain an extended round key; Using the extended round key to perform an initial bit-by-bit XOR operation on the information data block to obtain initial encrypted data; The extended round key is used to perform a multi-stage round encryption operation on the initial encrypted data to obtain encrypted information data.
3. The secure network programming method based on rank metric error correction code according to claim 2, characterized in that: The method of performing a multi-stage round encryption operation on the initial encrypted data using the extended round key to obtain encrypted information data includes: Performing multi-level byte replacement on the initial encrypted data using a preset byte table to obtain replaced encrypted data; Performing a multi-level row shift operation on the replacement encrypted data to obtain shift encrypted data; Performing a multi-level column mixing operation on the shift encrypted data to obtain mixed encrypted data; A multi-level bit-by-bit XOR operation is performed on the mixed encrypted data to obtain encrypted information data.
4. The secure network programming method based on rank metric error correction code according to claim 1, characterized in that: The step of performing a random matrix expansion operation on the encrypted information data to obtain an expansion matrix includes: Performing a data block operation on the encrypted information data to obtain encrypted data blocks; Performing a matrix operation on the encrypted data block to obtain an encryption matrix; Initializing a parameter matrix of the encryption matrix to obtain a random matrix; The encryption matrix is expanded according to the random matrix to obtain an expanded matrix.
5. The secure network programming method based on rank metric error correction code according to claim 1, characterized in that: The step of performing random linear encoding on the encoded data packet to obtain a network data packet comprises: Initializing random coefficients of the coded data packet to obtain random coding coefficients; Linearly combining the coded data packets according to the random coding coefficients to obtain a recombined data packet; Iterative network coding is performed on the reassembled data packet to obtain a network data packet.
6. The secure network programming method based on rank metric error correction code according to claim 1, characterized in that: The performing error query on the network data packet according to the data syndrome vector to obtain a transmission error value includes: Performing error location polynomial calculation on the network data packet according to the data syndrome vector to obtain a location polynomial; Perform root space mapping on the positioning polynomial according to the data syndrome vector to obtain a positioning error basis; Perform error positioning on the network data packet according to the positioning error base to obtain an error position; Calculating an error value of the network data packet according to the positioning polynomial to obtain a positioning error value; The error position is error marked according to the positioning error value to obtain a transmission error value.
7. The secure network programming method based on rank metric error correction code according to claim 1, characterized in that: The step of performing round key decryption on the restored data packet to obtain decrypted data includes: Performing data block operation on the restored data packet to obtain restored data blocks; Obtaining an extended round key corresponding to the recovery data packet; Using the extended round key, performing a reverse round bit-by-bit XOR operation on the restored data block to obtain initial decrypted data; The initial decrypted data is decrypted inversely using the extended round key to obtain decrypted information data.
8. A secure network programming system based on rank-metric error correction code, applied to linear networks, including wireless sensor networks, satellite communication networks, and data center networks, characterized in that: The system comprises: A data encryption module is used to perform round key encryption on information data to obtain encrypted information data; A rank metric coding module is used to perform a random matrix expansion operation on the encrypted information data to obtain an expanded matrix; perform a linear matrix construction based on the expanded matrix to obtain a generator matrix; calculate the matrix product of the generator matrix and the expanded matrix by matrix multiplication, and split the matrix product into error correction data packets by row; perform a metric rank calculation on the error correction data packet to obtain an encoded data packet; A linear encoding module, used for performing random linear encoding on the encoded data packet to obtain a network data packet; A rank metric decoding module, used to multiply the network data packet by the transposed matrix of the generation matrix to obtain a data syndrome vector; perform an error query on the network data packet according to the data syndrome vector to obtain a transmission error value; perform data error correction on the network data packet according to the transmission error value to obtain a recovery data packet; The data decryption module is used to decrypt the restored data packet using a round key to obtain decrypted data.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the secure network programming method based on rank metric error correction code as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the secure network programming method based on rank metric error correction code as described in any one of claims 1 to 7 is implemented.
