Secure physical layer dynamic elastic polarization code coding method suitable for non-degraded channel
By adopting the dynamic elastic polarization code encoding method on the non -drop -level channel, the code word structure that destroys the polarized code and uses hash values as a frozen bit, solving the problem of encryption and communication separation in traditional confidential communication schemes, and realized high security. Sexual and low -power confidential communication.
Patent Information
- Application Number
- CN202411494168.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-24
AI Technical Summary
In traditional confidential communication solutions, encryption and communication are separated, security depends on the difficulty of deciphering the encryption layer, and there may be compatibility problems, making it difficult to achieve low-cost and reliable confidential communication on real-time application platforms or low-power devices.
Adopt a dynamic elastic polarization code encoding method suitable for the non -drop -level channel, and determine the encoding length and sharing key through the sending end and legal receiving end to generate the replacement matrix, hash value and location vector to destroy the original polarization code The code structure of the code, improve security, and use the hash value of the shared key as a frozen bit to avoid leakage of the key.
It has the characteristics of confidential transmission at the same time as the channel code, which improves the security of the system, reduces the reliability loss caused by encryption, and is suitable for real -time application and low power consumption platforms.
Smart Images

Figure CN119382877A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of physical layer security, and in particular to a secure physical layer dynamic elastic polarization code encoding method applicable to a non-degraded channel, which is applied to a real-time application platform or low-power consumption device that uses original polarization codes to transmit information with high confidentiality requirements, and ensures that information has the characteristics of confidentiality transmission while being encoded in a channel. Background Art
[0002] In traditional network communication schemes, confidential communication is often achieved by separating the communication layer from the encryption layer. The security of this method mainly depends on the difficulty of deciphering the encryption layer, and security vulnerabilities may occur due to compatibility issues. For real-time application platforms or low-power devices, a layered design is adopted to achieve confidential communication. On the one hand, the software and hardware costs must be considered, and on the other hand, it is necessary to prevent the adversary from implementing targeted eavesdropping and large-scale computing on the encryption layer. For real-time application platforms or low-power devices that require low-cost and reliable confidentiality, a confidential channel coding scheme is adopted. Secure encryption and reliable transmission encoding and decoding can be implemented at the same level. The encoding characteristics of polarization codes are used to achieve information encryption transmission, which is of great help in confusing eavesdroppers. In addition, compared with other physical layer security schemes, the use of a flexible coding structure can minimize the reliability loss caused by encryption and improve the inherent security of the system. Summary of the invention
[0003] In view of the technical problems existing in the above-mentioned background technology, the present invention proposes a secure physical layer dynamic elastic polarization code encoding method suitable for non-degraded channels, which solves the limitations and potential compatibility problems of traditional confidentiality schemes in which security can only rely on the difficulty of decrypting the confidentiality layer when encryption and communication are separated, and realizes a coding scheme that takes into account both reliability and security by integrating encoding and encryption.
[0004] In order to achieve the above object, the technical solution of the present invention is achieved as follows:
[0005] A secure physical layer dynamic elastic polarization code encoding method applicable to non-degraded channels, the steps of which are as follows:
[0006] S1: The sender and the legitimate receiver jointly determine the code length N and the shared key k. The sender generates the information subchannel set A and its complement A according to the channel polarization of the original polar code. C ;
[0007] S2: Generate permutation matrix P and hash value h in sequence based on shared key k D and position vector V D ; and according to the permutation matrix P and the position vector V D Generate the secret generator matrix G s; At the same time, the obtained hash value h D Then splice all zero vectors to get frozen bit f Z ;
[0008] S3: Based on the information subchannel set A and its complement A C , the secret generator matrix G s Divide into two sub-matrices And the information to be sent m, the two sub-matrices and freeze bit f Z Input the polar code encoder to calculate the ciphertext c;
[0009] S4: The obtained ciphertext is transmitted through a non-degraded channel, and both the legitimate receiving end and the illegal receiving end obtain the codeword y;
[0010] S5: The legal receiving end sends the codeword y and the position vector V D Input position puncher output codeword y';
[0011] S6: Input the code word y' and the permutation matrix P into the position permutator, and calculate the code word to be decoded u = y'P T ;
[0012] S7: Combine the codeword u to be decoded with the frozen bit f Z Input the improved SCl decoder and output the plaintext information m;
[0013] S8: The illegal receiving end decodes the codeword y using the randomly generated parameters and outputs erroneous information.
[0014] The permutation matrix P and the hash value h are generated in sequence based on the shared key k. D and position vector V D The method is:
[0015] Generate a pseudo-random sequence r using a pseudo-random sequence generator according to a shared key k;
[0016] According to the pseudo-random sequence r, a one-to-one mapping is adopted to a permutation matrix P of size N*N;
[0017] Enter the shared key k into the secure hash function to get the hash value h D ;
[0018] Get the hash value h D Take the first n bits of the pseudo-random sequence r and convert them into decimal form and record them as D0; take the first n bits of the pseudo-random sequence r and convert them into decimal form and record them as α, take the second n bits and convert them into decimal form and record them as β;
[0019] According to formula: D i =αD i-1+βmod N, iterate until ω different elements are generated, sort them and store them in the position vector V D .
[0020] According to the permutation matrix P and the position vector V D Generate the secret generator matrix G s The method is:
[0021] Generate polar code matrix in, stands for Kronecker product;
[0022] Multiply the polar code encoding matrix G by the permutation matrix P to obtain G': G'=GP=(g1,g2,...g N ), where g j represents the columns in G';
[0023] Generate ω random column vectors denoted as z1,z2,…z ω ; These column vectors are arranged according to the position vector V D Insert G' to get G s :
[0024]
[0025] The calculation method of the ciphertext c is:
[0026]
[0027] The code word y and the position vector V D The method of inputting the position puncher to output the codeword y' is:
[0028] The legitimate receiver sends the codeword y and the position vector V D As the input of the position puncher, the code word y is placed in the position vector V D The bits corresponding to the elements in are deleted, and the remaining bits are output as the puncturer to obtain the codeword y'.
[0029] Beneficial effects of the present invention:
[0030] Based on the original polarization code, the present invention uses column confusion and random vector insertion to destroy the codeword structure of the original polarization code, improve security, and use the hash value of the shared key as a frozen bit to avoid key leakage. Specifically, the channel polarization is first performed according to the scheme of the original polarization code, and then the generator matrix is right-multiplied by the permutation matrix, and then ω random column vectors are generated, and ω positions are determined under the control of the shared key, and these random vectors are inserted into the corresponding positions in sequence. According to the channel polarization result, the obtained matrix is divided into two sub-matrices. At this point, the systematic structure of the polarization code generator matrix is destroyed. The shared key is used as the input of the secure hash function, and its hash value is output. The obtained hash value is used as a frozen bit, and is multiplied with the sub-matrix together with the plaintext information to obtain two row vectors, and finally the vector XOR result is taken as the ciphertext for transmission.
[0031] For legitimate receivers, the reverse process of the above process can be used to recover the plaintext with the help of the shared key. For eavesdroppers, first, they can only guess the positions of the ω random vectors and the values of the permutation matrix, and then they need to guess the values of the frozen bits and use them as the input of the decoder. However, none of the above steps can be solved in polynomial time. This shows that this scheme has high confidentiality.
[0032] From the perspective of the coding scheme, since there is no need to estimate channel state information, a lot of computational overhead is reduced. The code rate of this scheme is close to the original polar code and meets the relevant standards of polar code in 5G communication. Therefore, this scheme can be used for real-time applications and low-power platforms that use original polar code. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.
[0034] Figure 1 It is a flow chart of the present invention.
[0035] Figure 2 This is a diagram showing the information confidentiality effect of the method of the present invention in a degraded channel and a non-degraded channel. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] like Figure 1 As shown, the embodiment of the present invention provides a secure physical layer dynamic elastic polarization code encoding method applicable to non-degraded channels. The transmitter is Alice, the legal receiver is Bob, and the illegal receiver is Eve. In actual design, the channel capacity of N channels after channel splitting needs to be considered. In a typical BAWGN channel, the Gaussian approximation calculation method is used to estimate the reliability of the channel. The steps are as follows:
[0038] S1: The sender and the legal receiver jointly determine the encoding length and shared key k (0 / 1 bit stream k, length K), the transmitter generates the information subchannel set A and its complement A according to the channel polarization of the original polar code C .
[0039] S2: Generate permutation matrix P and hash value h in sequence based on shared key k D and position vector V D ; and according to the permutation matrix P and the position vector V D Generate the secret generator matrix G s ; At the same time, the obtained hash value h D Then concatenate the all-zero vector to get the frozen bit f Z ;
[0040] Generate a pseudo-random sequence r (0 / 1 bit stream r) using a pseudo-random sequence generator according to the shared key k;
[0041] According to the pseudo-random sequence r, a one-to-one mapping is adopted to a permutation matrix P of size N*N (each row and each column has only one "1"), so P*P^T=I.
[0042] Enter the shared key k into the secure hash function sha-256 to get the hash value h D ; The obtained hash value h D Then concatenate the all-zero vector to get the frozen bit f Z (0 / 1 bit stream f z =[h D ||0], length is NK).
[0043] Get the hash value h DTake the first n bits of the pseudo-random sequence r and convert them into decimal form and record them as D0; take the first n bits of the pseudo-random sequence r and convert them into decimal form and record them as α, take the second n bits and convert them into decimal form and record them as β; delete the used bits from r.
[0044] According to the formula: D i =αD i-1 +βmod N, iterate until ω different elements are generated, sort them and store them in the position vector V D (decimal vector, length ω).
[0045] Generate polar code matrix in, stands for Kronecker product;
[0046] Multiply the polar code encoding matrix G by the permutation matrix P to obtain G': G'=GP=(g1,g2,...g N ), where g j represents the columns in G';
[0047] Generate ω random column vectors denoted as z1,z2,...z ω (0 / 1 bit, both of size N*1); these column vectors are arranged according to the position vector V D Insert G' to get G s :
[0048]
[0049] S3: Based on the information subchannel set A and its complement A C , the secret generator matrix G s Divide into two sub-matrices And the information to be sent m, the two sub-matrices and freeze bit f Z Input the polar code encoder to calculate the ciphertext c;
[0050]
[0051] S4: The obtained ciphertext is transmitted through a non-degraded channel, and both the legitimate receiving end and the illegal receiving end obtain the codeword y;
[0052] S5: The legal receiving end sends the codeword y and the position vector V D Input position puncher, put code word y in position vector V D The bits corresponding to the elements in are deleted, and the remaining bits are output as the puncturer to obtain the codeword y'.
[0053] S6: Input the code word y' and the permutation matrix P into the position permutator, and calculate the code word to be decoded u = y'P T ;
[0054] S7: Combine the codeword u to be decoded with the frozen bit f Z Input the improved SCl decoder and output the plaintext information m;
[0055] S8: The illegal receiver lacks the key and can only randomly generate the above parameters. The illegal receiver uses the randomly generated parameters to decode the codeword y, and then outputs erroneous information.
[0056] In this example, an improved SCL decoding algorithm is adopted, and the concept of path metric is added to the original SC decoding continuous elimination principle. The state transition probability of different paths is measured. The larger the state transition probability, the smaller the path metric obtained on the path. When all paths are calculated, the path with the smallest metric value is selected as the decoding result.
[0057] Before decoding begins, the legitimate receiving end transmits the random sequence, the received codeword and the frozen bit pattern obtained by bit mixing to the decoder based on the shared key.
[0058] The SCL decoding used in the decoder adds a list compared to the SC decoding to save the candidate paths within the specified conditions after each layer of path search (the list width is selected as L=4 in the above example). After completing the path search expansion of one layer, the L paths with the smallest current path metric PM are retained and the expansion continues to the next layer.
[0059] The path metric is a measure of the posterior probability of the path Logarithmically, we get in
[0060] In actual decoding, frozen bits and information bits are considered: in,
[0061] So the decision formula for the information bit is:
[0062] The decoder will determine the number of layers of likelihood ratio calculation and the number of actual bit execution layers based on the code length, fill the decoded information into the information bit according to the frozen bit pattern, fill the frozen bit with a random sequence, and recursively perform the next layer of calculation.
[0063] After all layers of calculations are iterated, the minimum path is selected from the metric table to give the decoding, and the final decoding is correct with the sent information.
[0064] However, the eavesdropper cannot decode the original information because he does not have the correct frozen bit pattern and random sequence.
[0065] Solution Analysis
[0066] 1) Complexity analysis:
[0067] Ⅰ Coding Complexity Analysis: C EN =C enc (m)+C mul (GP)+C ins (ω).
[0068] The first term is the polar code encoding complexity: C enm (m) = O(NlogN) + O(N).
[0069] The second term is the matrix permutation complexity. Since P is a permutation matrix, C mul (GP) = O(N).
[0070] The third term is the complexity of inserting a random vector: C ins (ω)=O(1).
[0071] So the encoding complexity is C EN =O(NlogN)+O(N)+O(1)≈O(NlogN), which is basically the same as the original polar code.
[0072] II. Decoding Complexity Analysis: C De =C dec (y p )+C mul (y'P T )+C del (ω).
[0073] When the improved SCL decoding algorithm is used, the decoding complexity of the scheme is C dec (y p )=O(L·N·logN), where L represents the width of the storage path in the decoder and N represents the code length.
[0074] The last two terms are completely inverse operations of the encoding, so: C mul (y'P) = O(N), C del (ω)=O(1).
[0075] Therefore C De =O(LNlogN)+O(N)+O(1) This is basically the same as the original polar code.
[0076] 2) Bit rate upper limit analysis (taking the binary erasure channel with erasure probability ∈=0.05 as an example):
[0077] The upper limit of the bit rate R for the proposed scheme ω=8 Max1 =NR0 / (N+ω)=0.795.
[0078] The upper limit of the code rate of the original polar code is R Max2 =I(W)-N -1 / μ =0.802.
[0079] It can be seen that the bit rate loss caused by adding encryption is very small.
[0080] 3) Reliability analysis:
[0081] Since the polarization phenomenon of polar codes will be completely split when the code length tends to infinity, there will be code errors when using the SC decoding algorithm under finite code length. The improved SCL decoding algorithm takes the path metric into account on the basis of the original SC decoding, and measures whether there is a codeless phenomenon in the previous decoding. When L≥2 m , m is the number of information bits, which is equivalent to maximum likelihood decoding, but the additional space is extremely large. In actual situations, L = 4 or 8 is often used to achieve the upper bound of the decoding. When CRC check is added, the block error rate can be greatly reduced.
[0082] 4) Safety analysis:
[0083] Ⅰ Brute force attack:
[0084] There are two ways for an adversary to use brute force attacks:
[0085] 1. Enumerate the keys: Since the key of the proposed scheme is 256 bits, the key space is 2^256.
[0086] 2. Position vector V D And the permutation matrix P is enumerated:
[0087] The permutation matrix space is N P =N! The position vector space is
[0088] This means that the enumeration is done in polynomial time.
[0089] Ⅱ Chosen plaintext attack:
[0090] The adversary launches the attack by following these steps:
[0091] 1. Generate two plaintexts m1 and m2 that differ only in the i-th bit;
[0092] 2. Calculate the corresponding ciphertext and
[0093] 3. Calculation
[0094] like Then there is At this point, the adversary successfully obtains the i-th row of the secret matrix. However, due to the Therefore the attack fails.
[0095] III. Message replay attack:
[0096] The adversary launches the attack by following these steps:
[0097] 1. The sender generates a message m;
[0098] 2. Calculate the corresponding ciphertext
[0099] 3. The adversary intercepts and destroys the ciphertext transmission. At this time, the receiver cannot decode it correctly and requests the sender to retransmit.
[0100] 4. The sender generates another ciphertext
[0101] 5. The enemy intercepts again and calculates
[0102] like Then c1+c2=e1+e2, and the opponent successfully obtains e1+e2.
[0103] However, due to the Therefore the attack fails.
[0104] The following are specific examples for verification:
[0105] The two parties agreed on the coding parameters N=32, n=5, ω=8.
[0106] Shared key: Both parties agree on a shared key k, which is 256 bits:
[0107] k=
[0108] [0,1,1,0,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,0,1,0,1,0,1,1,0,1,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1,1 ,1,0,1,1,1,0,1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0,0,0,0,1,0,0,0,0,0,0,0
[0136] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
[0137] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
[0138] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
[0139] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
[0140] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
[0141] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
[0142] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0
[0143] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,]
[0144] Use the shared key k as the input of the hash function and get the hash value as the frozen vector:
[0145] f Z =[1,1,0,1,1,1,0,0,0,1,0,0,1,0,1,0]
[0146] Iteratively calculate the position vector V with a length of ω D =[1,2,3,4,5,11,28,37]
[0147] Generate polar code encoding matrix G = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[0148] 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[0149] 1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[0150] 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[0151] 1,0,0,0,1,0,0,0,0,0,0,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
[0211] Generate a random column vector and calculate it according to the position vector V D Insert G' to get G s :
[0212] =[0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
[0213] 1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
[0214] 0,1,1,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[0215] 1,1,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[0216] 1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
[0217] 1,0,1,1,1,1,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
[0218] 1,0,0,1,1,1,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0
[0219] 0,0,0,1,1,1,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
[0220] 0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
[0221] 0,1,0,1,0,1,0,1,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[0222] 1,1,1,0,1,1,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0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1,-1,1,-1,1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,1,1,-1]
[0250] After the non-degraded channel AWGN, demodulation is performed to obtain the received codeword y:
[0251] y=[0.0832253284408484,1.62668874407316,0.922858801175447,0.414234960795648,1.3443464601817 3,1.25813607037137,1.18587431844257,-1.27264620434356,1.37160590808532,-1.75221557482539,0 .646092795796032,1.98898976614430,-1.20715797215410,1.71157317923010,-0.829389603799590,0.689655743313055,-1.17707969772063,-1.01510348386751,0.715459780487304,1.82986528099113,0.4 96842811496063,-1.60309905726626,1.25378433172790,-0.756857800086615,-0.271437870375673,-0.477943246234524,-1.09955448057868,1.20318557879041,0.479353559124914,0.676493326111249,1. 39663578190871,-0.647611587007317,-0.840709293475879,-1.83359779727352,1.35683576594829,-0.865815158497558,-0.0556256860299250,1.39399294562233,0.264237779484196,-0.641747789090372]
[0252] After the position puncher, calculate llr to get y':
[0253] y'=[7.95715117757484,7.50012772995670,-8.04892132258744,8.674797443386 31,-11.0819843361389,12.5794758075633,-7.63473737527411,10.824939256845 4,-5.24552043134269,4.36176590057139,-7.44450566467942,-6.42007813958665,4.52496496116795,11.5730841983919,3.14230984681850,-10.1388886716602 ,7.92962836578457,-4.78678902627618,-1.71672382722534,-3.02277850079158,-6.95419314014403,3.03169810268583,4.27851946482921,8.83310026504344, -4.09585530811886,-5.31711243490943,-11.5966907041040,8.58138286235149,-5.47589586710395,8.81638550074764,1.67118645407074,-4.05876939380586]
[0254] After the position permutator, the codeword u to be decoded is obtained:
[0255] u=[7.95715117757484,-8.04892132258744,8.67479744338631,-11.08198433613 89,12.5794758075633,-7.63473737527411,10.8249392568454,-5.245520431342 69,4.36176590057139,-7.44450566467942,7.50012772995670,-6.42007813958665,4.52496496116795,3.14230984681850,-10.1388886716602,7.92962836578457 ,11.5730841983919,-1.71672382722534,-4.78678902627618,-3.02277850079158,-6.95419314014403,3.03169810268583,8.83310026504344,-4.09585530811886 ,4.27851946482921,-11.5966907041040,8.58138286235149,-5.47589586710395,-5.31711243490943,8.81638550074764,1.67118645407074,-4.05876939380586]
[0256] The codeword u to be decoded and the frozen bit f Z Input SCl decoder L=12, output plaintext information m:
[0257] m=[0,0,0,1,1,1,0,1,1,1,0,1,0,1,0,1].
[0258] When the two communicating parties share a 256-bit original key, the encryption elements generated each time the encoding is different, and the average change rate of the ciphertext is 1 / 2 of the maximum value, which has excellent physical layer elasticity. When the legitimate user uses SCL for decoding, the block error rate can be around 0.07%, while the block error rate of the illegal user is 100% under the random trial method. It can also resist brute force attacks, differential attacks, selected plaintext attacks, and message replay attacks.
[0259] In order to measure the information confidentiality effect of the present invention in degraded channels and non-degraded channels, a channel gradient experiment was designed and implemented, and the following results were obtained: Figure 2 The anti-attack results are shown.
[0260] Figure 2The horizontal axis in the middle represents the advantage of the eavesdropping channel over the main channel. This advantage gradually increases, which means that the channel gradually changes from a degraded channel to a non-degraded channel. The calculation formula is:
[0261] SNR Adv =SNR E -SNR M
[0262] Among them, SNR E Represents the eavesdropping channel signal-to-noise ratio, SNR M Indicates the main channel signal-to-noise ratio.
[0263] Through Figure 2 The experimental results show that the following conclusions can be drawn:
[0264] 1) The present invention has high reliability for legitimate users
[0265] like Figure 2 As shown, the bit error rate of legitimate users is always kept at a low level, which means that they can decode information without errors.
[0266] 2) The present invention always maintains high confidentiality in both degraded and non-degraded channels
[0267] like Figure 2 As shown, the bit error rate of the eavesdropper of the present invention does not change with the expansion of the advantage, but remains at about 0.5. This means that it cannot be decoded correctly. In other words, the present invention maintains high confidentiality in both non-degraded channels and degraded channels.
[0268] In traditional schemes, the eavesdropper's bit error rate decreases rapidly as his advantage increases, which means that information leakage continues to increase and even the plaintext can be completely recovered.
[0269] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A secure physical layer dynamic elastic polarization code encoding method suitable for non-degraded channels, characterized in that: The steps are as follows: S1: The sender and the legitimate receiver jointly determine the code length N and the shared key k. The sender generates the information subchannel set A and its complement A according to the channel polarization of the original polar code. C ; S2: Generate permutation matrix P and hash value h in sequence based on shared key k D and position vector V D ; and according to the permutation matrix P and the position vector V D Generate secret generator matrix G s ; At the same time, the obtained hash value h D Then concatenate the all-zero vector to get the frozen bit f Z ; S3: Based on the information subchannel set A and its complement A C , the secret generator matrix G s Divide into two sub-matrices And the information to be sent m, the two sub-matrices and freeze bit f Z Input the polar code encoder to calculate the ciphertext c; S4: The obtained ciphertext is transmitted through a non-degraded channel, and both the legitimate receiving end and the illegal receiving end obtain the codeword y; S5: The legal receiving end sends the codeword y and the position vector V D Input position puncher output codeword y'; S6: Input the code word y' and the permutation matrix P into the position permutator, and calculate the code word to be decoded u = y'P T ; S7: Combine the codeword u to be decoded with the frozen bit f Z Input the improved SCl decoder and output the plaintext information m; S8: The illegal receiving end decodes the codeword y using the randomly generated parameters and outputs erroneous information.
2. The secure physical layer dynamic elastic polarization code encoding method applicable to non-degraded channels according to claim 1, characterized in that: The permutation matrix P and the hash value h are generated in sequence based on the shared key k. D and position vector V D The method is: Generate a pseudo-random sequence r using a pseudo-random sequence generator according to a shared key k; According to the pseudo-random sequence r, a one-to-one mapping is adopted to a permutation matrix P of size N*N; Enter the shared key k into the secure hash function to get the hash value h D ; Get the hash value h D Take the first n bits of the pseudo-random sequence r and convert them into decimal form and record them as D0; take the first n bits of the pseudo-random sequence r and convert them into decimal form and record them as α, take the second n bits and convert them into decimal form and record them as β; According to the formula: D i =αD i-1 +βmod N, iterate until ω different elements are generated, sort them and store them in the position vector V D .
3. The secure physical layer dynamic elastic polarization code encoding method applicable to non-degraded channels according to claim 2, characterized in that: According to the permutation matrix P and the position vector V D Generate secret generator matrix G s The method is: Generate polar code matrix in, stands for Kronecker product; Multiply the polar code encoding matrix G by the permutation matrix P to obtain G': G'=GP=(g1,g2,...g N ), where g j represents the columns in G'; Generate ω random column vectors denoted as z1,z2,...z ω ; These column vectors are arranged according to the position vector V D Insert G' to get G s :
4. The secure physical layer dynamic elastic polarization code encoding method applicable to non-degraded channels according to claim 3, characterized in that: The calculation method of the ciphertext c is:
5. The secure physical layer dynamic elastic polarization code encoding method applicable to non-degraded channels according to claim 1, characterized in that: The code word y and the position vector V D The method of inputting the position puncher to output the codeword y' is: The legitimate receiver sends the codeword y and the position vector V D As the input of the position puncher, the code word y is placed in the position vector V D The bits corresponding to the elements in are deleted, and the remaining bits are output as the puncturer to obtain the codeword y'.
Citation Information
Patent Citations
Single-step quantum key distribution post-processing method and system based on polarization code, medium and equipment
CN110011792A
Secure polarization code coding method based on random frozen bit filling
CN117014140A
Cited By
Wireless data security protection method and system for Polar code optimization
CN120434630A