CN103944577A - Design method for united channel safe coding and decoding device based on Knuth code - Google Patents
Design method for united channel safe coding and decoding device based on Knuth code Download PDFInfo
- Publication number
- CN103944577A CN103944577A CN201310021196.8A CN201310021196A CN103944577A CN 103944577 A CN103944577 A CN 103944577A CN 201310021196 A CN201310021196 A CN 201310021196A CN 103944577 A CN103944577 A CN 103944577A
- Authority
- CN
- China
- Prior art keywords
- knuth
- code
- sequence
- random
- binary number
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Error Detection And Correction (AREA)
Abstract
The invention provides a design method for a united channel safe coding and decoding device based on the Knuth code. In order to solve a problem that a conventional Knuth code stream does not have an encryption function, a random Knuth coding method based on secret key control is designed. The method associates random binary numbers with classic Knuth encoders. First, a secret key Key is used to generate a random binary number b=f(Key), wherein f(.) is a random binary number generation function. Then, for an input to-be-coded vector u and a binary number b, b is used to determine a direction for searching a minimum balanced position j (b=0, searching forward; b=1, searching backward), and a minimum balanced position index j and a partial inversion operation vector u(j) are output, that is, u(j)=v(u,b), wherein v(, .,) is a partial inversion operation function. Finally, a balanced code sequence j2 of the position j is added following the u(j), so as to obtain an output code partial inversion stream (defined in the specification), and a label (defined in the specification) represents link of the two binary sequences. In the decoding, a receiving end uses the same Key and the same random function f(.) with those of the coding end, and generates the random binary number b, and a received sequence is divided into a data sequence u(j) and a check sequence j2, and then the minimum balanced position j is obtained by looking up a table, and finally a correct bit sequence u is obtained in a partial inversion operation.
Description
Technical field
The present invention relates to Knuth code, also referred to as a kind of combined channel and the safe codec design method of balanced code (Balanced Codes) encoding code stream, relate generally to the random Knuth code method for designing with code stream error detection and encryption function.
Background technology
In order to carry out transmitting on noisy channel, need to overcome the Noise and Interference in channel.Chnnel coding (Channel Coding) or title forward error correction coding (Forward Error Correction, FEC), in information code element to be sent, add necessary verification code element according to certain criterion, receiving terminal utilizes the coding criterion between verification code element and information code element, detect and correct mistake, improve the reliability of information code element transmission.The target of research chnnel coding is to utilize minimum verification code element, obtains higher reliability transmission, is ensureing, under the prerequisite of transmission reliability, to improve code efficiency as far as possible.A kind of channel coding schemes with error detection function that the famous scholar Donald E.Knuth of Knuth Ma Shi Stanford University proposed in article " Efficient Balanced Codes " in 1986.This code requires symbol in code word " 1 " identical with the number of symbol " 0 ", therefore, and also referred to as balanced code (Balanced Codes).
The major parameter of this yard is: information bit is k, and check bit number is r, and code length n=k+r, has 2
kindividual code word, the number (or claiming Hamming weight) of symbol in each code word " 1 " is
wherein
for lower bracket function.Knuth code coding is simple, and architectural characteristic is good, has a wide range of applications.(symbol " 1 " is wrong is symbol " 0 " to can be used for detecting all Asymmetric errors, or conversely), to the insensitive asynchronous space communication of time delay, very lagre scale integrated circuit (VLSIC) (Very Large Scale Integration, VLSI) system noise reduction, data of optical disk storage etc.Tradition Knuth code coder block diagram as shown in Figure 1.
In the initiative article of Knuth, a kind of simple parallel encoding scheme (Parallel Coding Scheme) is proposed.If input message vector is u, its length is k, u
(j)=v (u) represents the vector after the front j bit negate of vectorial u, and v () is partial inversion handling function, wherein j=1, and 2 ..., k.Knuth has proved, to all input vector u, at least to have an equilbrium position point j, makes u
(j)hamming weight be
be u
(j)it is balance.For transmitting and encoding conveniently, select the equilbrium position point of minimum value j as u.For location index j is carried out to balance code, Knuth encoding scheme need to be at the balance sequence j of index j and r bit
2between set up one by one mapping relations table (j=0,1 ..., k-1).Obtain after minimum value j, obtain corresponding r bit balance sequence j by tabling look-up
2.The Knuth coding of last output information vector u
symbol
the knot that represents two binary sequences connects.When decoding, reception vector C is divided into k Bit data vector u by decoder
(j)with r bit trial vector j
2, adopt lookup table mode to obtain minimum equilbrium position point j, then negate u
(j)front j bit, can obtain and send information vector u.
For example, establish message length k=10, check bit is counted r=6, u=0111010110, u
(3)=1001010110, equilbrium position point has 3, is respectively j=3, and 5,7, select minimum value j=3 to encode.If 6 bit balance sequences of index 3 correspondences are j
2=011001, last output encoder code stream is
at receiving terminal, first decoder extracts respectively 10 Bit data vector u from receive vector
(3)=1001010110 and 6 bit verification vector j
2=011001, then tabling look-up and obtaining this minimum equilbrium position corresponding to verification vector is 3, finally by u
(3)front 3 negates of=1001010110, obtain former input message vector u=0111010110.
Can find out from encoder block diagram 1, Knuth coding is mainly made up of four parts, and this code stream does not possess encryption function, easily divulges a secret in the upper transmission of channel (particularly wireless channel).For obtaining encryption code stream, the present invention is based on Knuth code the feature with satisfactory texture, the direction of search of the minimum position balance point to traditional Knuth code coder is carried out randomization, as shown in Figure 2, encrypts code stream thereby obtain.
Summary of the invention
Do not possess the problem of encryption function in order to solve classical Knuth code stream, the present invention has designed a kind of random coded method based on cipher controlled, has realized error detection and the encryption function of Knuth code stream.
The technical scheme that technical solution problem of the present invention adopts is: taking key K ey as seed, produce a random binary number b.This binary number is for controlling the equilbrium position point search direction of Knuth encoder: if b=0 is identical with classical Knuth encoder searches direction, i.e. and the equilbrium position of sweep forward input message sequence point; Otherwise, if b=1, with classical Knuth encoder searches opposite direction, the i.e. equilbrium position of sweep backward input message sequence point.After newly-designed encoder encodes, output code flow has encryption function.
At receiving terminal, first decoder is partitioned into k Bit data vector u from receive vector
(j)with r bit trial vector j
2, obtain minimum equilbrium position point j by lookup table mode; Then, adopt the key K ey identical with coding side to produce random binary number b, determine correct negate direction; Finally, by data vector u
(j)carry out part negate and obtain correct information sequence.
Beneficial effect is, the random Knuth encoder of the present invention's design, output code flow has been realized error detection and encryption function, and chnnel coding and data encryption are fused into a combined channel safe coding device, has reduced the channel encoder of separation and the encoder complexity of encryption equipment.Further, if be that seed produces the random binary sequence that length is N by key K ey, input message sequence is divided into N group, every group of length is k, adopt above-mentioned combined channel secure coding method, can obtain length is the encryption Knuth code stream of N × n, has strengthened the confidentiality of data.
Brief description of the drawings
The classical Knuth encoder model of Fig. 1
In figure: 1. minimum equilbrium position searcher, 2. location index encoder, 3. binary sequence knot connected device, u is that input length to be encoded is the information sequence of k bit, the minimum equilbrium position point that j is input message sequence, u
(j)for the balance sequence of k bit, j
2for the r bit balance sequence corresponding with j, c is the output balance sequence of n=k+r bit.
The amended random Knuth encoder model of Fig. 2
In figure: 4. random binary number generator, Key is input key, b is the random binary number that module 4 is exported.
Embodiment
The present invention is based on the safe codec design method of combined channel of Knuth code, be mainly divided into the randomization of encoding code stream and the decoding of reception code stream, realize error detection, the encryption and decryption function of code stream.
1. random Knuth encoder design method
Analysis of classical Knuth encoder is known: if encoder is in the time of search balance point position, the direction of search is random, even code stream is intercepted and captured in the time of transmission, listener-in is owing to can not obtaining the correct direction of search, thereby can not obtain correct part negate result, and then realized the confidentiality of encoding code stream, random Knuth encoder of the present invention is as shown in Figure 2.This coded system is made up of random binary number generator and classical Knuth encoder, and it is input as coded sequence, is output as ciphering sequence.The specific embodiments of the random Knuth encoder of the present invention's design is as follows.
First input key K ey, produce a random binary number b by random binary number generator module 4.
Secondly, k bit information sequence u is inputted to minimum equilbrium position searcher module 1, the direction of search that module 1 is definite according to binary number b, the minimum equilbrium position point j of search sequence u, output minimum value j and part negate sequence u
(j), by index value j input position index coder module 2 and u
(j)input binary sequence connector modules 3.
Again, module 2 is encoded to index j, output r bit-binary balance sequence j
2, and input module 3.
Finally, module 3 is by sequence u
(j)and j
2knot is linked to be a coded sequence
output, wherein
the knot that represents two binary sequences connects.Coded sequence c through random Knuth device output has error detection and encryption function.
For example, establish k=10, r=6, n=k+r=16.The random binary number b=1 that input key K ey produces, input message sequence u=0111010110.According to the random Knuth encoder of our design, sweep backward is exported minimum equilbrium position point j=3 and part negate sequence u
(3)=0111010001, the balance sequence that location index j=3 is corresponding is j
2=011001.Finally, the Knuth code of binary sequence knot connected device output is
this is that length is the balanced code of 16 bits, and this coded sequence is from classical Knuth encoder output sequence is different above.
2. code stream decoding method design
Receive after sequence at the receiving terminal of communication system, decode through four steps below: first, receiving sequence is cut apart, obtained k Bit data sequence u
(j)with r bit verification sequence j
2; Secondly, use the key identical with coding side, produce random binary number b (identical with the b of coding side); Again, by j
2table look-up and obtain minimum equilbrium position point j; Finally, according to location index j and the definite negate direction of b, to u
(j)part negate acquired information sequence u.
For example, establish k=10, r=6, n=k+r=16.The random binary number b=1 that input key K ey produces, the data sequence of receiving is c=0111010001011001, cuts apart and obtains u
(3)=0111010001 and j
2=011001.The minimum equilbrium position point j=3 that tables look-up to obtain, to u
(3)rear 3 negates of=0111010001 obtain correct information sequence u=0111010110.
On the other hand, according to classical Knuth decoding scheme: receiving sequence c=0111010001011001 is cut apart to obtain to u
(3)=0111010001 and j
2=011001.The minimum equilbrium position point j=3 that tables look-up to obtain, to u
(3)front 3 negates of=0111010001 obtain error message sequence u=1001010001.Illustrate and there is no correct key, can not obtain and be correctly decoded sequence, thereby realized the confidentiality of code stream.
Claims (3)
1. the random Knuth codec design method based on cipher controlled, is characterized in that data are after coding, utilizes the classical Knuth encoder of random binary number control, realizes error detection and the encryption function of encoding code stream.
2. the Knuth codec design method based on cipher controlled according to claim 1, it is characterized in that: encoder is relevant to the random binary number of cipher controlled, adopt key to produce a random binary number, this number, for controlled encoder output, is obtained and encrypts code stream.
3. the Knuth codec design method based on cipher controlled according to claim 1, it is characterized in that: the code stream that decoding end is received, in the time of decoding, produce random binary number by the key identical with coding side, be then correctly decoded sequence according to this numerical value output.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310021196.8A CN103944577A (en) | 2013-01-22 | 2013-01-22 | Design method for united channel safe coding and decoding device based on Knuth code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310021196.8A CN103944577A (en) | 2013-01-22 | 2013-01-22 | Design method for united channel safe coding and decoding device based on Knuth code |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103944577A true CN103944577A (en) | 2014-07-23 |
Family
ID=51192093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310021196.8A Pending CN103944577A (en) | 2013-01-22 | 2013-01-22 | Design method for united channel safe coding and decoding device based on Knuth code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103944577A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101059957A (en) * | 2007-05-24 | 2007-10-24 | 华中科技大学 | An audio coding selective cryptographic method |
CN101577605A (en) * | 2008-05-08 | 2009-11-11 | 吴志军 | Speech LPC hiding and extraction algorithm based on filter similarity |
CN102754446A (en) * | 2010-02-03 | 2012-10-24 | 汤姆逊许可证公司 | Valid replacement data in encoded video |
-
2013
- 2013-01-22 CN CN201310021196.8A patent/CN103944577A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101059957A (en) * | 2007-05-24 | 2007-10-24 | 华中科技大学 | An audio coding selective cryptographic method |
CN101577605A (en) * | 2008-05-08 | 2009-11-11 | 吴志军 | Speech LPC hiding and extraction algorithm based on filter similarity |
CN102754446A (en) * | 2010-02-03 | 2012-10-24 | 汤姆逊许可证公司 | Valid replacement data in encoded video |
Non-Patent Citations (1)
Title |
---|
LUCA G. TALLINI: "Balanced Codes With Parallel Encoding and Decoding", 《IEEE TRANSACTIONS ON COMPUTERS》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sala et al. | Exact reconstruction from insertions in synchronization codes | |
CN106209113A (en) | A kind of decoding method of polarization code | |
CN1210872C (en) | Reduced search symbol estimation algorithm | |
EP3994799B1 (en) | Iterative bit flip decoding based on symbol reliabilities | |
RU2011104005A (en) | METHOD FOR CODING SYMBOLS, METHOD FOR DECODING SYMBOLS, METHOD FOR TRANSFER OF SYMBOLS FROM THE TRANSMITTER TO THE RECEIVER, CODER, DECODER AND SYSTEM FOR TRANSFER OF SYMBOLS FROM THE TRANSMITTER TO THE RECEIVER | |
JP2002509680A (en) | Iterative decoding of product code | |
CN107332570B (en) | Polarization code coding method of segmented cascade Hash sequence | |
CN107231158A (en) | A kind of polarization code iterative receiver, system and polarization code iterative decoding method | |
CN106254030B (en) | Two-way coding and decoding method without rate Spinal code | |
CN1301117A (en) | 'Not or' codes and serial connected encoder/decoder therewith | |
KR20220085049A (en) | Device for multi-level encoding | |
CN110233698B (en) | Method for encoding and decoding polarization code, transmitting device, receiving device, and medium | |
CN104135345A (en) | Cross-layer coding and decoding method applied to long-term evolution system | |
Spandri et al. | Reed-muller identification | |
CN110535560A (en) | A kind of polarization code combines coding and interpretation method | |
CN109428672A (en) | Information coding and decoding method and device, information processing system | |
CN108540140B (en) | Polar code decoding method and device | |
Kurkoski | Coded modulation using lattices and Reed-Solomon codes, with applications to flash memories | |
CN109194336A (en) | Cascade the coding and interpretation method, system and device of Spinal code | |
CN107276720A (en) | A kind of Beidou navigation message coding method based on punctured polarization code characteristic | |
Hossein et al. | Weakly mutually uncorrelated codes | |
CN103944577A (en) | Design method for united channel safe coding and decoding device based on Knuth code | |
CN104821881A (en) | Compression-and-error-correction-coding-based safety data fusion method of sensing layer of internet of things | |
CN101645753A (en) | Coding method without rate codes | |
CN111198781B (en) | Computer-implemented method for error correction coding and encryption of files |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140723 |