Interleaver-based CRC reliable transmission method
By introducing a packet interleaver to interleave data after CRC verification, data errors and security problems caused by CRC collisions are solved, and efficient and secure data transmission is achieved.
Patent Information
- Application Number
- CN202510717518.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-08-29
AI Technical Summary
Among the existing CRC verification methods, the CRC collision probability is high, resulting in data transmission errors and security risks. The existing reduction methods increase data processing delay or redundancy, affecting system efficiency and security.
The packet interleaver is used to interleave the data processed by CRC, change the position of the data in the transmission sequence, reduce the probability of CRC collision through the randomization of the interleaver, and improve data security.
Effectively reduce the probability of CRC collision, improve the security and efficiency of data transmission, avoid the identification ability of data tampering, and reduce hardware overhead and processing delay.
Smart Images

Figure CN120567367A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data security, and in particular to a CRC reliable transmission method based on an interleaver. Background Art
[0002] Cyclic Redundancy Check (CRC) is a fast algorithm that generates a fixed-bit checksum for data such as network packets and computer files. It is primarily used to detect or verify errors that may occur during data transmission or storage. CRC treats data as a binary number and uses polynomial division to calculate the remainder to verify data integrity. With its clear principles and simple implementation, it is widely used for data verification in areas such as computer network data transmission and file storage.
[0003] The basic principle of CRC is to generate a checksum, append it to the data to be transmitted, and form a new data frame. This is then sent to the receiver. The receiver recalculates the checksum according to the rules used by the sender to generate the checksum and compares the calculated checksum with the received checksum. If the two are identical, the received data is correct; if they are different, the received data is erroneous. A CRC collision occurs when two different data blocks generate the same CRC value. During data transmission, a CRC collision can cause two different data blocks to be mistakenly identified as identical, leading to data transmission errors. This error can cause information loss or data corruption, impacting system operation. CRC collisions can also pose system security risks. For example, in applications such as network communications and data storage, attackers can exploit CRC collisions to tamper with data, threatening system security. From a spatial mapping perspective, CRC is essentially a one-way function that maps data from an infinite domain to a finite domain space. This is a many-to-one mapping. Therefore, in practical applications, it is necessary to reduce the probability of CRC collisions and improve the reliability and security of data verification.
[0004] Methods to reduce the probability of CRC collisions include:
[0005] 1. Using a longer CRC polynomial, such as CRC-64 instead of CRC-32, can significantly reduce the probability of collision. This method reduces the probability of collision by increasing the length of the check code and increasing the mapping space of the finite field. A longer check code increases the computational complexity of data verification, increases data processing delay, and also increases data transmission overhead, reducing the effectiveness of data transmission.
[0006] 2. Use a database or hash table to store known CRC values. Each time a CRC value is calculated, a lookup is performed to determine if the same CRC value exists. This method can eliminate CRC collisions by looking up the database or hash table. However, it increases processing latency and requires additional buffering to store CRC values. When a CRC collision occurs, a solution must be found for recalculating the CRC value.
[0007] 3. Combining with other technologies, such as forward error correction coding technology, increases data redundancy and improves the reliability of data verification. The cost of this method is increased data redundancy and reduced data validity. The introduction of other technologies also increases the complexity of system implementation and processing delay.
[0008] 4. Randomization technology: Randomizing data before transmission can increase the difficulty of data collision. This method will not completely eliminate the possibility of CRC collision, but it can improve the overall security of the system. Summary of the Invention
[0009] The purpose of the present invention is to provide a reliable CRC transmission method based on an interleaver, which adopts group interleaving to change the position of information in the transmission sequence without increasing data redundancy, thereby ensuring data transmission efficiency, effectively reducing the collision probability of CRC, and improving data security.
[0010] To achieve the above object, the present invention provides a CRC reliable transmission method based on an interleaver, comprising the following steps:
[0011] Step 1: Select a packet interleaver;
[0012] Step 2: Interleaver parameter calculation;
[0013] Step 3: Calculate the CRC value and append the obtained CRC value to the data to obtain the data block after CRC processing;
[0014] Step 4: Send the data obtained in step 3 to the interleaver for interleaving;
[0015] Step 5: Send the data obtained in step 4 to the channel for transmission or memory for storage;
[0016] Step 6: After receiving the data, the receiver sends it to the deinterleaver for deinterleaving;
[0017] Step 7: Send the data obtained in step 6 to the CRC checker for verification.
[0018] Optionally, the block interleavers include LR / TB, RL / TB, LR / BT, RL / BT interleavers, and random interleavers. There are no specific requirements for the type of block interleaver selected, but an interleaver with a lower correlation coefficient is preferred. Given a given interleaving depth, the correlation coefficient of a square block interleaver is greater than that of a non-square block interleaver, so a non-square block interleaver is selected. A random interleaver needs to transmit the interleaved data position sequence to the receiving end for deinterleaving. The number of interleaving parameters required is proportional to the interleaving depth and is greater than that of traditional block interleavers such as LR / TB. Therefore, a traditional non-square block interleaver is a better option.
[0019] Optionally, during the execution of step 2, the interleaver depth L can be determined by the transmitting end or determined by negotiation between the transmitting end and the receiving end through a protocol. Let L = M×N, where M and N are integers. For a given L, M and N are selected such that M≠N to construct an M×N non-square matrix interleaver. If L is a square number or L cannot be decomposed into the product of two positive integers, L is reselected to meet the above requirements. The transmitting end calculates the interleaving parameters L, M, and N and notifies the receiving end of the interleaving parameters L, M, and N through a reliable channel.
[0020] Optionally, the deinterleaver in step 6 is an N×M storage matrix. The receiving end obtains interleaving parameters through a reliable channel and can correctly deinterleave, while a third party cannot obtain the interleaving parameters and cannot correctly deinterleave.
[0021] Optionally, during the verification process in step 7, if the CRC value calculated by the receiving end is the same as the received CRC value, it means that the received data is correct and complete; if the CRC value calculated by the receiving end is different from the received CRC value, it means that the received data is wrong and incomplete.
[0022] The present invention provides a reliable CRC transmission method based on an interleaver. This method introduces randomization processing technology. Data first enters the CRC processing to calculate the CRC value. Then, the data and the CRC value are sent to the interleaver for processing. After interleaving, the order of the data is changed. The interleaving processing of the interleaver randomizes the data to be transmitted. The present invention adopts a group interleaver. The implementation of the interleaver changes the reading and writing order of data through data caching. Compared with other methods, the use of group interleaving for interleaving processing changes the position of information in the transmission sequence without increasing data redundancy, ensuring data transmission efficiency, eliminating additional computational overhead, and generating no longer processing delays for data processing. No additional hardware equipment is required. Data verification shows that the method of the present invention can effectively reduce the probability of CRC collisions and provide more secure protection for the verified data. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 The present invention is a schematic flow chart of the steps of a CRC reliable transmission method based on an interleaver.
[0025] Figure 2 3×3 matrix and LR / TB interleaver in an embodiment of the present invention.
[0026] Figure 3 Schematic diagram of fixed point distribution of LR / TB interleavers with different structures in an embodiment of the present invention.
[0027] Figure 4 1 is a schematic diagram of a deinterleaving process using an L=N×M=8×2LR / TB deinterleaver in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.
[0029] See also Figure 1 The present invention provides a CRC reliable transmission method based on an interleaver, comprising the following steps:
[0030] Step 1: Select a packet interleaver;
[0031] Step 2: Interleaver parameter calculation;
[0032] Step 3: Calculate the CRC value and append the obtained CRC value to the data to obtain the data block after CRC processing;
[0033] Step 4: Send the data obtained in step 3 to the interleaver for interleaving;
[0034] Step 5: Send the data obtained in step 4 to the channel for transmission or memory for storage;
[0035] Step 6: After receiving the data, the receiver sends it to the deinterleaver for deinterleaving;
[0036] Step 7: Send the data obtained in step 6 to the CRC checker for verification.
[0037] The following is a further explanation based on the relevant principles, implementation steps and specific examples:
[0038] Traditional CRC transmission systems are susceptible to CRC collisions because the CRC checksum is a many-to-one mapping—a one-way function that maps data from an infinite domain to a finite domain space. In traditional CRC transmission systems, the CRC value is appended to the information data, dividing the transmitted data into two parts: information data + CRC value. A third party may tamper with the information data portion. Due to the possibility of CRC collisions, the CRC value calculated by the receiver after the information data has been tampered with may be the same as the CRC value transmitted by the sender. Based on the judgment rules, the receiver will believe the data is correct or complete, making an incorrect judgment. Alternatively, a third party may tamper with the data, including both the information data and the CRC value. The third party will recalculate the CRC value. Based on the CRC judgment rules, the receiver will believe the data is correct or complete and will not recognize that the data has been modified. In the CRC transmission scheme proposed in this article, the data is first CRC-checked and sent to the interleaver for interleaving. In the design of the interleaver, the interleaving depth is usually greater than the length of the CRC data block. The information data and CRC values of multiple CRC data blocks are shuffled and reordered to form a new data block, which is then sent to the channel for transmission. Any modification made by a third party to the interleaved data will cause the data received by the receiving end to be different from the data output by the CRC check at the system sending end after deinterleaving. Due to the randomization characteristics of the interleaver, the positional relationship between the information bit and the check bit in the data sequence transmitted on the channel in this scheme is not fixed. The third party cannot only change the information data to cause a CRC collision or modify the information data and CRC value at the same time as in the traditional CRC system. Any modification of the data by the third party can be discovered by the receiving end after deinterleaving and CRC check.
[0039] Step 1 is the interleaver design process. This invention uses a block interleaver, which writes data into a storage matrix row by row and reads it out column by column. The LR / TB block interleaver is used as an example to illustrate the specific process. The parameter design principles for other types of block interleavers, such as RL / TB, LR / BT, and RL / BT, are similar. A random interleaver is also a block interleaver. It writes data sequentially into a storage area and reads it out in a random sequence. There are no specific requirements for the interleave depth, which can be any value.
[0040] The LR / TB interleaver reads data from the storage matrix in the order from left to right and from top to bottom. The correlation coefficient is an important parameter to measure the performance of the interleaver. The correlation of data mainly occurs at the fixed point of the interleaving algorithm, so the corresponding correlation coefficient is
[0041] The mean value of R = the number of fixed points of the interleaving algorithm / L (1)
[0042] Where L is the interleaving depth. A good interleaver should have a low correlation coefficient to minimize the correlation between the data sequences before and after interleaving. According to probability theory, if the input and output sequences are completely statistically independent, the correlation coefficient is 0.
[0043] The correlation of data mainly occurs at the fixed points of the interleaving algorithm. When the interleaving depth is given, the fewer the number of fixed points, the smaller the correlation coefficient. When the interleaving depth is given, the number of fixed points of the square matrix group interleaver is greater than that of the non-square matrix group interleaver, and the correlation coefficient is greater. Therefore, the non-square matrix group interleaver is more suitable for use in the present invention than the square matrix group interleaver. The random interleaver needs to transmit the interleaved data position sequence to the receiving end so that the receiving end can implement the deinterleaving function. The number of interleaving parameters required to be transmitted is proportional to the interleaving depth and is greater than that of traditional group interleavers such as LR / TB, while traditional group interleavers only need to transmit three parameters L, M and N. The fewer interleaving parameters, the higher the system security. The group interleaver is simple to implement in the interleaver and does not require additional hardware overhead. In summary, the non-square matrix group interleaver is the optimal solution for the interleaver design in the present invention.
[0044] Taking a 3×3 matrix as an example, the LR / TB interleaver writes data into the 3×3 memory in row units, and the output of the interleaver reads data from the memory in column units from left to right and from top to bottom, as shown in Figure 2 As shown, in Figure 2 The first row in (b) represents the position arrangement of the data before it is input into the interleaver, and the second row represents the position arrangement of the data after interleaving.
[0045] From the 3×3 square matrix, we can see that the fixed points of the square matrix interleaver occur on the diagonal of the matrix. Studies have shown that in terms of correlation coefficient, the LR / TB interleaver with a non-square matrix structure has fewer fixed points and a smaller correlation coefficient than the LR / TB interleaver with a square matrix structure, and has better performance. Taking L=16 as an example, the number of rows M and the number of columns N of the storage matrix have three sets of values, namely (4, 4), (2, 8) and (8, 2). Figure 3 It can be seen that the LR / TB interleaver with (M, N) = (4, 4) has 4 fixed points, and the LR / TB interleavers with (M, N) = (2, 8) and (M, N) = (8, 2) have only 2 fixed points respectively.
[0046] Step 2: Calculate interleaver parameters. The interleaver depth L can be determined by the transmitter or negotiated between the transmitter and receiver through a protocol. Let L = M × N, where M and N are integers. For a given L, different combinations of M and N are possible. Select M and N such that M ≠ N to construct an M × N non-square LR / TB interleaver. If L is a square number or cannot be decomposed into the product of two positive integers, reselect L to meet the above requirements. After determining L, M, and N, the interleaver parameters are finalized and communicated to the receiver via a reliable channel.
[0047] Step 3: Calculate the CRC value. Determine the CRC polynomial based on the actual system protocol requirements, calculate the CRC value for the data to be transmitted, and append the CRC value to the data to obtain the CRC-processed data block.
[0048] Step 4: Send the data obtained in step 3 to the interleaver for interleaving.
[0049] Step 5: Send the data obtained in step 4 to the channel for transmission or memory for storage.
[0050] Step 6: After receiving the data, the receiver sends it to the deinterleaver for deinterleaving. The LR / TB deinterleaver is an N×M storage matrix, such as Figure 4 As shown (taking L=N×M=8×2LR / TB deinterleaver as an example).
[0051] Step 7: Send the data obtained in step 6 to the CRC checker for verification. If the CRC value calculated by the receiving end is the same as the received CRC value, it means that the received data is correct and complete. If the CRC value calculated by the receiving end is different from the received CRC value, it means that the received data is incorrect and incomplete.
[0052] The following examples are used to verify the following:
[0053] Taking CRC-8 as an example, the generating polynomial is g(x)=x 8 +x 2 +x+1, assuming that the information data is 00011100B (or 1CH in hexadecimal), a total of 8 bits, the CRC value is also 8 bits, and the CRC data block length is 16 bits (including information data and CRC value). For convenience of calculation, assume that the interleaving depth L = 28, set M = 7, and N = 4.
[0054] Analyze the situation where a third party tampers with an information data block and recalculates the CRC value. Assume the data is 1CH, A2H, 36H, and EDH, and the corresponding CRC values are 54H, 67H, 82H, and 8DH, respectively. The data after CRC check is 1C 54A2673682ED8DH. Since the interleaver depth is 28, the first data block fed into the interleaver is 1C 54A26H, and the interleaved data output is: 48E43D 0H. The third party replaces the first data block 48E4H with a new CRC block (95E2H). The data received by the receiver is: 95E23D 0H. The deinterleaver deinterleaves the data to: F45C 2A 2H, which is obviously different from the input sequence of the transmitter's interleaver. A CRC check is performed on F45C 2A 2H. There is only one complete CRC block, F45CH. The CRC value of F4H, C2H, differs from the CRC value 5CH obtained from the received data. Therefore, the receiver determines that the data is incorrect or incomplete, and discovers that the data has been tampered with. Without interleaving, the data 95E2H tampered with by a third party will pass the CRC check and meet the rule that the CRC values calculated by the sender and receiver are the same. The receiver will mistakenly believe that the data is correct and fail to recognize that the data has been tampered with.
[0055] Analysis shows that a third party only tampered with the information data block without changing the CRC value. However, the CRC value of this data block coincides with the original data block, indicating a CRC collision. Calculations show that the CRC values of 107H, 20EH, and 41CH are all 00H (assuming the information block is 12 bits. If the information is still 8 bits and the checksum is 8 bits, then there is a one-to-one mapping, theoretically proving that there is no CRC collision issue). Assume that the data after CRC processing at the sender is 1070020E 0041C 00H, and the output data after interleaving (considering two interleaved blocks here) is: 0040950852A004H. The third-party tampered data is: 20E0910752A004H. The data obtained after deinterleaving at the receiver is: 04F 4020688C1C 0H. The CRC value of 04FH is 79 (79≠40), and the CRC value of 206H is 38 (38≠88). The receiver finds that both data blocks 04F 4020688H have been tampered with. In a traditional CRC system solution, assume that the data after CRC processing is 1070020E 0041C 00H, and the third-party tampered data is 20E 001070041C 00H. Because the CRC values of 107H, 20EH, and 41CH are all 00H, the receiver believes that the data is correct and cannot detect that the data has been tampered with.
[0056] In summary, compared with the existing methods, the present invention has the following advantages:
[0057] 1. An interleaver is introduced after CRC check to randomize the data after CRC processing. This can detect third-party data tampering that traditional CRC systems cannot detect, solve the problem of data tampering caused by CRC collisions, improve data detection capabilities, and better protect data.
[0058] 2. The application of group interleaver in this system solution is determined. Group interleaver is simple to implement. The implementation of the interleaver changes the reading and writing order of data through data caching. Unlike convolutional interleaver, it must be implemented through shift register circuits, which not only increases the system's hardware equipment but also increases the system's processing delay.
[0059] The above disclosure is merely one or more preferred embodiments of the present invention, and certainly cannot be used to limit the scope of the present invention. A person skilled in the art can understand that all or part of the processes of the above embodiments and equivalent changes made in accordance with the claims of the present invention still fall within the scope of the invention.
Claims
1. A CRC reliable transmission method based on an interleaver, characterized in that: The following steps are involved: Step 1: Select a packet interleaver; Step 2: Interleaver parameter calculation; Step 3: Calculate the CRC value and append the obtained CRC value to the data to obtain the data block after CRC processing; Step 4: Send the data obtained in step 3 to the interleaver for interleaving; Step 5: Send the data obtained in step 4 to the channel for transmission or memory for storage; Step 6: After receiving the data, the receiver sends it to the deinterleaver for deinterleaving; Step 7: Send the data obtained in step 6 to the CRC checker for verification.
2. The CRC reliable transmission method based on an interleaver as claimed in claim 1, wherein The group interleavers in step 1 include LR / TB, RL / TB, LR / BT, RL / BT interleavers and random interleavers. There is no special requirement for the type of group interleaver when selecting the group interleaver, but an interleaver with a lower correlation coefficient is preferred.
3. The CRC reliable transmission method based on an interleaver as claimed in claim 1, wherein During the execution of step 2, the interleaver depth L can be determined by the transmitter or negotiated between the transmitter and the receiver through a protocol. Let L = M × N, where M and N are integers. For a given L, M and N are selected such that M ≠ N to construct an M × N non-square matrix interleaver. If L is a square number or L cannot be decomposed into the product of two positive integers, L is reselected to meet the above requirements. The transmitter calculates the interleaving parameters L, M, and N and notifies the receiver of the interleaving parameters L, M, and N via a reliable channel.
4. The CRC reliable transmission method based on an interleaver as claimed in claim 1, wherein The deinterleaver in step 6 is an N×M storage matrix. The receiving end obtains the interleaving parameters through a reliable channel and can correctly deinterleave. However, a third party cannot obtain the interleaving parameters and cannot correctly deinterleave.
5. The CRC reliable transmission method based on an interleaver as claimed in claim 1, wherein During the verification process in step 7, if the CRC value calculated by the receiving end is the same as the received CRC value, it means that the received data is correct and complete; if the CRC value calculated by the receiving end is different from the received CRC value, it means that the received data is incorrect and incomplete.