Secure physical layer dynamic elastic polarization code encoding method for non-degraded channels
By integrating encoding and encryption in the polarized coding encoding method, using the shared key to generate a permutation matrix and hash value, destroying the codeword structure and inserting random column vectors, the problem of security dependence on decoding in traditional confidential communication is solved, and the reliability and security are balanced on real-time application platforms and low-power devices are achieved.
Patent Information
- Application Number
- CN202411494168.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-10-24
AI Technical Summary
In traditional confidential communication solutions, the security caused by the separation of encryption and communication depends on the difficulty of deciphering the confidential layer, there are compatibility problems, and it is difficult to achieve both reliability and security on real-time application platforms and low-power devices.
The dynamic elastic polarization coding method of the secure physical layer is adopted, and through the integration of encoding and encryption, the shared key is used to generate a permutation matrix, hash value and position vector, destroying the codeword structure of the original polarization code, inserting a random column vector and using a hash value as a frozen bit, ensuring the security of information transmission.
It improves the security of information transmission and reduces the reliability loss caused by encryption. It is suitable for real-time applications and low-power platforms in 5G communications, and the encoding complexity is close to the original polarized code.
Smart Images

Figure CN119382877B_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 suitable for non-degraded channels. The method is applied to real-time application platforms or low-power devices with high confidentiality requirements that use original polarization codes to transmit information, ensuring that information is transmitted confidentially while being encoded and decoded through the channel. Background Art
[0002] Traditional network communication solutions often achieve confidential communication by separating the communication layer from the encryption layer. This approach's security relies primarily on the difficulty of cracking the encryption layer and can lead to security vulnerabilities due to compatibility issues. However, for real-time application platforms or low-power devices, a layered design is required to implement confidential communication. This requires considering both software and hardware costs while also preventing adversaries from conducting targeted eavesdropping and large-scale computations against the encryption layer. For real-time application platforms or low-power devices requiring both low-cost and reliable confidentiality, a secure channel coding scheme is employed. Secure encryption and reliable transmission encoding and decoding can be implemented at the same layer, leveraging the encoding characteristics of polarization codes to achieve encrypted transmission, significantly helping to confuse eavesdroppers. Furthermore, compared to other physical-layer security solutions, the flexible coding structure minimizes the reliability loss associated with encryption, enhancing the system's inherent security. Summary of the Invention
[0003] In response to 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. This method solves the limitations and potential compatibility issues of traditional confidentiality schemes where security relies solely on the difficulty of decrypting the confidentiality layer when encryption and communication are separated. By integrating encoding and encryption, a coding scheme that balances reliability and security is achieved.
[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 based on the channel polarization of the original polar code. C ;
[0007] S2: Generate the permutation matrix P and hash value h based on the shared key k D and position vector V D ; and according to the permutation matrix P and position vector V D Generate secret generator matrix G s; At the same time, the hash value h D Then concatenate the all-zero vector to get the frozen bit f Z ;
[0008] S3: According to 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 bits f Z Input the polar code encoder to calculate the ciphertext c;
[0009] S4: The obtained ciphertext is transmitted through a non-degradable channel, and both the legitimate and illegitimate receivers 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 to 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 the shared key k;
[0016] According to the pseudo-random sequence r, a one-to-one mapping is used to a permutation matrix P of size N*N;
[0017] Enter the shared key k into the secure hash function to obtain 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 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 .
[0020] According to the permutation matrix P and the position vector V D Generate 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 on the right 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 for 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 Delete the bits corresponding to the elements in , and then output the remaining bits as the puncturer to obtain the codeword y'.
[0029] Beneficial effects of the present invention:
[0030] Based on the original polar code, this method uses column obfuscation and random vector insertion to disrupt the codeword structure of the original polar code, improving security. The hash value of the shared key is used as a frozen bit to prevent key leakage. Specifically, channel polarization is first performed according to the original polar code scheme. The generator matrix is then right-multiplied by the permutation matrix. This generates ω random column vectors, which are then sequentially inserted into the corresponding positions, determined by the shared key. Based on the channel polarization results, the resulting matrix is divided into two sub-matrices. This destroys the systematic structure of the polar code generator matrix. The shared key is used as the input to a secure hash function, which outputs its hash value. The resulting hash value, used as the frozen bit, is multiplied with the sub-matrix along with the plaintext information to obtain two row vectors. Finally, the vector XOR result is taken and transmitted as ciphertext.
[0031] For legitimate receivers, using the shared key, they can reverse the above process to recover the plaintext. However, an eavesdropper can only guess the positions of the ω random vectors and the value of the permutation matrix. Then, they need to guess the value of the frozen bits and use them as input to the decoder. However, none of these steps can be solved in polynomial time. This demonstrates the high confidentiality of this scheme.
[0032] From a coding perspective, since no channel state information needs to be estimated, significant computational overhead is reduced. This scheme achieves a code rate close to that of the original polar code and complies with the relevant standards for polar codes in 5G communications. Therefore, this scheme can be used in real-time applications and low-power platforms that use the 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 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.
[0034] Figure 1 Flowchart of the present invention.
[0035] Figure 2 This is a diagram showing the information confidentiality effect of the method of the present invention in degraded channels and non-degraded channels. DETAILED DESCRIPTION
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention 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, it is necessary to consider the channel capacity of N channels after channel splitting. In a typical BAWGN channel, the Gaussian approximation calculation method is used to estimate the channel reliability. 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 the permutation matrix P and hash value h based on the shared key k D and position vector V D ; and according to the permutation matrix P and position vector V D Generate secret generator matrix G s ; At the same time, the 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 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 on the right 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, size is N*1); these column vectors are arranged according to the position vector V D Insert G' to get G s :
[0048]
[0049] S3: According to 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 bits f Z Input the polar code encoder to calculate the ciphertext c;
[0050]
[0051] S4: The obtained ciphertext is transmitted through a non-degradable channel, and both the legitimate and illegitimate receivers 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 Delete the bits corresponding to the elements in , and then output the remaining bits as the puncturer to obtain the codeword y'.
[0053] S6: Input the code word y' and the permutation matrix P into the position permutator to 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 incorrect information.
[0056] In this example, an improved SCL decoding algorithm is adopted. The concept of path metric is added to the original SC decoding principle of continuous elimination. The state transition probability of different paths is measured. The larger the state transition probability, the smaller the path metric obtained on the path. After all paths are calculated, the path with the smallest metric value is selected as the decoding result.
[0057] Before decoding begins, the legitimate receiver 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 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 expansion continues to the next layer.
[0059] The path metric is a measure of the posterior probability of the path Logarithmization gives in
[0060] In actual decoding, frozen bits and information bits are considered: in,
[0061] Therefore, the decision formula for the information bit is:
[0062] The decoder determines the number of layers of likelihood ratio calculation and the actual number of bits executed based on the code length. It fills the decoded information into the information bits according to the frozen bit pattern, fills the frozen bits with a random sequence, and recursively performs the next layer of calculation.
[0063] After all layers are calculated and 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 one 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] Therefore, 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) Bitrate Upper Limit Analysis (taking a binary erasure channel with an 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 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 completely split when the code length approaches 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 practice, L = 4 or 8 is often taken 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 a brute force attack:
[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 an attack by following these steps:
[0091] 1. Generate two plaintexts m1 and m2 that differ only in bit i.
[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] Ⅲ Message replay attack:
[0096] The adversary launches an 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 correctly decode it 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,1,0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0,1,1,0,1,1,0,1,1,1,1 ,1,0,1,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,1,1,0,0,1,0,0,0,1,1,1,1,1,1,0,1,0,0,0,0,1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0,0,0,0,0,0,0,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,0,0,1,]
[0144] Use the shared key k as input to 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 of length ω 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,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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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]
[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,0,1,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0
[0216] 1,0,0,0,0,1,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,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,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,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0249] BP=[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,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 is combined with 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 both communicating parties share a 256-bit original key, the encrypted elements generated during each encoding are unique, and the average ciphertext change rate is a maximum of 1 / 2, resulting in excellent physical layer resilience. When legitimate users use SCL for decoding, the block error rate is approximately 0.07%, while illegitimate users experience a 100% block error rate using random probing. Furthermore, the system is resistant to brute force attacks, differential attacks, chosen plaintext attacks, and message replay attacks.
[0259] In order to measure the information confidentiality effect of the present invention in degraded 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 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 Indicates the eavesdropping channel signal-to-noise ratio, SNR M Indicates the signal-to-noise ratio of the main channel.
[0263] Through Figure 2 The experimental results shown can lead to the following conclusions:
[0264] 1) The present invention has high reliability for legitimate users
[0265] like Figure 2 As shown, the bit error rate of legitimate users always remains 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 eavesdropper's bit error rate (BER) does not change as the advantage increases, but instead remains around 0.5. This means that it cannot correctly decode the message. In other words, the present invention maintains high confidentiality in both non-degraded and degraded channels.
[0268] In traditional schemes, the eavesdropper's bit error rate decreases rapidly as the 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 scope of protection of the present invention.
Claims
1. A secure physical layer dynamic elastic polarization code encoding method applicable to 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 based on the channel polarization of the original polar code. C ; S2: Generate the permutation matrix P and hash value h based on the shared key k D and position vector V D ; and according to the permutation matrix P and position vector V D Generate secret generator matrix G s ; At the same time, the hash value h D Then concatenate the all-zero vector to get the frozen bit f Z ; S3: According to 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 bits f Z Input the polar code encoder to calculate the ciphertext c; S4: The obtained ciphertext is transmitted through a non-degradable channel, and both the legitimate and illegitimate receivers 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 to 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 the shared key k; According to the pseudo-random sequence r, a one-to-one mapping is used to a permutation matrix P of size N*N; Enter the shared key k into the secure hash function to obtain 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 on the right 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 for 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 Delete the bits corresponding to the elements in , and then output the remaining bits 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