A method for reconstructing communication data using matrix coding
The method of reconstructing communication data through matrix coding simplifies the encryption and decryption process, reduces hardware resource requirements, improves data security, solves the problems of key length and complex encryption and decryption processes in traditional methods, and achieves more efficient data Protect.
Patent Information
- Application Number
- CN202410725767.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-06
AI Technical Summary
Traditional data encryption methods rely on key length and complex encryption and decryption processes, resulting in insufficient data security protection and high resource consumption. A more reliable data protection method is needed.
Matrix coding is used to reconstruct communication data. The original data is divided by variable word length, the coding matrix elements are randomly filled, converted into transcoded data, and transmitted and decoded through the coding matrix, reducing the need for key length and encryption and decryption processes. rely.
It simplifies the encryption and decryption process, reduces hardware resource requirements, improves data security and confidentiality, and avoids the risk of key leakage.
Smart Images

Figure CN118300903B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method for reconstructing communication data by matrix coding. Background Art
[0002] Traditional data protection methods such as data encryption are universal and fixed. Although they can improve the accuracy of communication data, they have complex encryption and decryption algorithms, large key lengths and large data volumes, and provide limited support for data security and confidentiality. Traditional data security relies heavily on key protection, which can be leaked in a variety of ways and is increasingly destructive. Therefore, the data security protection process is particularly important.
[0003] Existing data security protection methods are becoming increasingly complex, with complex encryption and decryption processes, large key lengths, and increasing demands on software and hardware resources. Therefore, it is necessary to find a highly reliable data protection method. Summary of the invention
[0004] In order to solve the problem of over-reliance on key length and encryption and decryption process responsibility under the premise of ensuring confidentiality, the present invention provides a method for reconstructing communication data by matrix coding.
[0005] The method uses variable word length to divide the original data, and then randomly fills the coding matrix elements, so that the reconstructed communication data has strong randomness.
[0006] In a first aspect, the present invention provides a method for reconstructing communication data by matrix coding, characterized in that it comprises the following steps:
[0007] S1, obtaining first communication data;
[0008] S2, obtaining second communication data according to the first communication data, where the second communication data is of binary type and has a length L;
[0009] S3, length The second communication data is divided from right to left to obtain third communication data ,in, is a positive integer less than L, if If it is divisible by L, then the subscript The value of ,like If it is not divisible by L, then the subscript The value of commerce;
[0010] S4, initializing the encoding matrix M, the encoding matrix M is composed of A matrix consisting of elements, where represents all elements in the encoding matrix M;
[0011] S5, according to the third communication data and the coding matrix M to obtain fourth communication data;
[0012] S6, mapping the row and column coordinates of the encoding matrix M by the fourth communication data to obtain transcoded data, and sending the transcoded data through the transmitting end;
[0013] S7, the receiving end receives the transcoded data, and decodes the transcoded data according to the transcoded data and the encoding matrix M.
[0014] In some embodiments, in S4, the encoding matrix M is expressed as:
[0015] ;
[0016] Among them, the element is in a finite field Any number on finite field The number of elements in , , and the elements in the encoding matrix are not repeated, and the number of bits of all elements is the same.
[0017] In some embodiments, in S5, the third communication data The decimal value indicates the row coordinate of the encoded matrix element to obtain the row coordinate of the matrix element ,by The decimal value indicates the column coordinates of the encoded matrix element to obtain the column coordinates of the matrix element , get the matrix element coordinates , construct the fourth communication data according to the matrix element coordinates and the third communication data, and its expression is: .
[0018] In some embodiments, in S3, if the length of the third communication data on the left is insufficient, , add 0 to the left side of the third communication data on the left side until the length reaches .
[0019] In some embodiments, if the Corner mark If is an even number, use As matrix element coordinates, where .
[0020] In some embodiments, the decoding in S7 includes the following steps:
[0021] Obtain the fourth communication data according to the transcoded data and the encoding matrix M;
[0022] Obtain the third communication data according to the fourth communication data and the encoding matrix M;
[0023] Obtaining the second communication data according to the third communication data;
[0024] The first communication data is obtained according to the second communication data.
[0025] In some embodiments, the expression of the transcoded data is: .
[0026] In order to solve the problem of over-reliance on key length and encryption and decryption process responsibility under the premise of ensuring confidentiality, the present invention has the following advantages:
[0027] Through the technical solution of the present invention, the dependence on the key length and the degree of responsibility of the encryption and decryption process of the traditional data protection algorithm is eliminated. By transcoding and reconstructing the communication data, the algorithm is simple, highly operational, and has low requirements on chip hardware resources. The risk of the original data being known is avoided, and the security of the communication data is effectively protected. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A flow chart of the encoding process of a method for reconstructing communication data by matrix encoding is shown;
[0029] Figure 2 A flowchart of a decoding process of a method for reconstructing communication data using matrix coding is provided. DETAILED DESCRIPTION
[0030] The present disclosure will now be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thus implement the present disclosure, rather than implying any limitation on the scope of the present disclosure.
[0031] As used herein, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "based at least in part on". The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment". The term "another embodiment" is to be interpreted as "at least one other embodiment". The orientation or position relationship indicated by the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "vertical", "horizontal", "lateral", "longitudinal" and the like is based on the orientation or position relationship shown in the accompanying drawings. These terms are mainly for better describing the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation. In addition, in addition to being used to indicate an orientation or position relationship, some of the above terms may also be used to indicate other meanings, such as the term "upper" may also be used to indicate a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to the specific circumstances. In addition, the terms "install", "set", "provided with", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be an internal connection between two devices, elements or components. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances. In addition, the terms "first", "second", etc. are mainly used to distinguish different devices, elements or components (the specific types and structures may be the same or different), and are not used to indicate or imply the relative importance and quantity of the indicated devices, elements or components. Unless otherwise specified, "plurality" means two or more.
[0032] This embodiment discloses a method for reconstructing communication data by matrix coding, characterized in that it includes the following steps:
[0033] S1, obtaining first communication data;
[0034] S2, obtaining second communication data according to the first communication data, where the second communication data is of binary type and has a length L;
[0035] S3, length The second communication data is divided from right to left to obtain third communication data ,in, is a positive integer less than L, if If it is divisible by L, then the subscript The value of ,like If it is not divisible by L, then the subscript The value of commerce;
[0036] S4, initializing the encoding matrix M, the encoding matrix M is composed of A matrix consisting of elements, where represents all elements in the encoding matrix M;
[0037] S5, according to the third communication data and the coding matrix M to obtain fourth communication data;
[0038] S6, mapping the encoding matrix M by the fourth communication data to obtain transcoded data, and sending the transcoded data through the transmitting end;
[0039] S7, the receiving end receives the transcoded data, and decodes the transcoded data according to the transcoded data and the encoding matrix M.
[0040] In this embodiment, the whole process of the method for reconstructing communication data by matrix coding is introduced. First, the communication data is preprocessed to convert the decimal communication data into binary communication data, and then By length-splitting the binary communication data, we can get The binary number after the division is To describe this set of binary numbers; then initialize the matrix to To define the size of the matrix, elements of the matrix; according to And the encoding matrix M obtains the fourth communication data , the fourth communication data can be mapped through the matrix M to obtain the transcoded data In this way, the communication data is reconstructed into transcoded data through certain rules and several transformations, and the transcoded data is transmitted from the transmitter; the receiver decodes the transcoded data after receiving it, and the decoding process is the reverse process of the encoding process. For ease of understanding, the following takes the transmission of the decimal key 156983729 as an example for explanation.
[0041] Specifically, first obtain the first communication data 156983729, convert the decimal key 156983729 into binary to obtain the second communication data 10010101110000110110001; =5 to divide the second communication data, we can get six binary numbers 100, 10101, 11000, 10110, 01101, 10001, all converted into decimal numbers to get 4, 21, 22, 24, 13, 17. Since the length L of the second communication data is 28, 28 cannot be divided by 5, so the subscript The value of The quotient, that is The value of is 5, so 6 third communication data can be obtained , then initialize the encoding matrix M, and obtain the fourth communication data through the third communication data and the encoding matrix M ; The fourth communication data is mapped through the encoding matrix M to obtain transcoded data ; The receiving end receives the transcoded data After that, the fourth communication data is obtained by mapping through the encoding matrix M , convert the decimal number in the coordinates into binary and arrange them in order to get the binary key 10010101110000110110001, and finally convert the binary key into a decimal key to get 156983729.
[0042] Specifically, through the above method, the key 156983729 is converted into ciphertext For transmission, under the premise of ensuring security, on the one hand, the key length is effectively reduced, and on the other hand, the entire encoding and decoding process is not complicated, which can effectively solve the problem of over-reliance on key length and the degree of responsibility of the encryption and decryption process.
[0043] Specifically, in terms of the amount of transcoded data The value range of can be any positive integer smaller than the binary key word length, but when When the value ratio of is greater than 1 / 2 of the word length, the binary key is divided into only two segments, and the final transcoded data is only one; The smaller the value of , the more segments the binary key is divided into, and the more final transcoded data.
[0044] Specifically, from the proportion of transcoded data in the matrix, The smaller the value of is, the smaller the size of the matrix M is, and the greater the proportion of transcoded data is; The larger the value of , the larger the size of the matrix M, and the smaller the proportion of transcoded data.
[0045] In some embodiments, in S4, the encoding matrix M is expressed as:
[0046] ;
[0047] Among them, the element is in a finite field Any number on finite field The number of elements in , , and the elements in the encoding matrix are not repeated, and the number of bits of all elements is the same.
[0048] In this embodiment, the expression of the matrix M is introduced, and the elements in the matrix and the expressions of the elements are introduced. , the elements in the matrix M are finite fields Any number on , and any element in the matrix is not repeated, and the number of elements in the finite field is , so there is , that is, 0,1,2,…, Fill in the encoding matrix M according to certain rules. In addition, the number of bits of all elements in the encoding matrix is the same, for example, the element When the maximum value is 10, the element writing format is 00, 01, 02, 03, …, 10.
[0049] In some embodiments, in S5, the third communication data The decimal value indicates the row coordinate of the encoded matrix element to obtain the row coordinate of the matrix element ,by The decimal value indicates the column coordinates of the encoded matrix element to obtain the column coordinates of the matrix element , get the matrix element coordinates , constructing fourth communication data according to the matrix element coordinates and the third communication data .
[0050] In the present embodiment, the specific process from the third communication data to the fourth communication data is explained.
[0051] Specifically, the third communication data is a binary number, and its corresponding decimal value is used as the row coordinate of the matrix element of the encoding matrix M, denoted as ,by The corresponding decimal value is used as the column coordinate of the matrix element of the encoding matrix M, denoted as , thus obtaining the coordinates of the matrix elements , arranging the third communication data in the form of matrix coordinates yields the fourth communication data .
[0052] In some embodiments, in S3, if the length of the third communication data on the left is insufficient, , add 0 to the left side of the third communication data on the left side until the length reaches .
[0053] In this embodiment, a situation is proposed where, after the binary data is segmented, the leftmost group of binary numbers is less than the length , then add 0 to the leftmost side until the length of the leftmost binary number reaches .
[0054] Specifically, the operation of adding 0 is to prevent some special situations from occurring, such as if , and h is an even number, then the coordinates of the binary number after segmentation will only have row coordinates but no column coordinates. At this time, add 0 on the far left to complete the row and column coordinates.
[0055] In some embodiments, if the Corner mark If is an even number, use As matrix element coordinates, where .
[0056] In this embodiment, a corner mark is proposed The parity problem.
[0057] Specifically, since the matrix initialized in this application is As the number of the first row and the first column, so when When it is an odd number, the binary type communication data is divided and converted into the coordinates of the binary communication data, which has complete row coordinates and column coordinates; if When is an even number, the leftmost set of coordinates will only have row coordinates but no column coordinates. In this case, you can As the leftmost set of coordinates, , so that it will not affect the actual value of the entire series.
[0058] Specifically, when When it is an odd number, As the leftmost coordinate, , the other coordinates remain unchanged.
[0059] In some embodiments, the decoding in S7 includes the following steps:
[0060] Obtain the fourth communication data according to the transcoded data and the encoding matrix M;
[0061] Obtain the third communication data according to the fourth communication data and the encoding matrix M;
[0062] Obtaining the second communication data according to the third communication data;
[0063] The first communication data is obtained according to the second communication data.
[0064] In this embodiment, the transcoding process after the receiving end receives the transcoded data is introduced. The transcoding process is the inverse process of the encoding process. First, the transcoded data is mapped to the encoding matrix M to obtain fourth communication data, and then the fourth communication data is converted into third communication data through mapping. Multiple binary numbers of the third communication data are arranged to obtain second communication data, and then the binary numbers of the second communication data are converted into decimal to obtain first communication data.
[0065] In some embodiments, the expression of the transcoded data is: .
[0066] In this embodiment, the expression of transcoded data is introduced.
[0067] Specifically, the transcoded data is a ciphertext to the outside world. The larger the matrix, the lower the proportion of the transcoded data in the matrix, and the greater the amount of calculation required to crack it through unconventional means; however, in the present application, the amount of transcoded data is determined by the amount of the third communication data, and the amount of the third communication data is determined by λ. Generally, the smaller the value of λ, the more transcoded data there is, but relatively speaking, the greater the proportion of transcoded data in the matrix; and the larger the λ, the smaller the amount of transcoded data, but relatively speaking, the smaller the proportion of transcoded data in the matrix. Therefore, when using the method of the present application for encrypted transmission, it is necessary to set a suitable value of λ according to the actual usage scenario to achieve optimal resource allocation and utilization.
[0068] In summary, through the above method, the communication data is transcoded and reconstructed, the algorithm is simple, the operability is strong, the requirements for chip hardware resources are low, the risk of the original data being known is avoided, and the security of the communication data can be effectively protected.
[0069] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive in all respects, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.
[0070] In addition, it should be understood that although the present specification is described according to embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that those skilled in the art can understand.
Claims
1. A method for reconstructing communication data by matrix coding, characterized in that: The following steps are involved: S1, obtaining first communication data; S2, obtaining second communication data according to the first communication data, where the second communication data is of binary type and has a length L; S3, length The second communication data is divided from right to left to obtain third communication data ,in, is a positive integer less than L, if If it is divisible by L, then the subscript The value of ,like If it is not divisible by L, then the subscript The value of commerce; S4, initializing the encoding matrix M, the encoding matrix M is composed of A matrix consisting of elements, where represents all elements in the encoding matrix M; S5, according to the third communication data and the coding matrix M to obtain fourth communication data; S6, mapping the row and column coordinates of the encoding matrix M by the fourth communication data to obtain transcoded data, and sending the transcoded data through the transmitting end; S7, a receiving end receives the transcoded data, and decodes the transcoded data according to the transcoded data and the encoding matrix M; In S5, the third communication data The decimal value indicates the row coordinate of the encoded matrix element to obtain the row coordinate of the matrix element ,by The decimal value indicates the column coordinates of the encoded matrix element to obtain the column coordinates of the matrix element , get the matrix element coordinates , construct the fourth communication data according to the matrix element coordinates and the third communication data, and its expression is: ; The expression of the transcoded data is: .
2. A method for reconstructing communication data by matrix coding as claimed in claim 1, characterized in that: In S4, the expression of the encoding matrix M is: ; Among them, the element is in a finite field Any number on finite field The number of elements in , , and the elements in the encoding matrix are not repeated, and the number of bits of all elements is the same.
3. A method for reconstructing communication data by matrix coding as claimed in claim 1, characterized in that: In S3, if the length of the third communication data on the left is insufficient , add 0 to the left side of the third communication data on the leftmost side until the length reaches .
4. A method for reconstructing communication data by matrix coding as claimed in claim 1, characterized in that: If the Corner mark If is an even number, use As matrix element coordinates, where .
5. A method for reconstructing communication data by matrix coding as claimed in claim 1, characterized in that: The decoding in S7 includes the following steps: Obtain the fourth communication data according to the transcoded data and the encoding matrix M; Obtain the third communication data according to the fourth communication data and the encoding matrix M; Obtaining the second communication data according to the third communication data; The first communication data is obtained according to the second communication data.
Citation Information
Patent Citations
Wireless sensor network and computer network fused network secret key management method
CN102315935A
Privacy data sending method and apparatus, and privacy data receiving method and apparatus
CN106161021A
Data encryption transmission method for information analysis system
CN115865523A
Data security communication method
CN117676562A
Secure transmission method for personal information cloud platform data
CN117978360A
