WO2017177614A1 - 编码方法及装置、译码方法及装置 - Google Patents

编码方法及装置、译码方法及装置 Download PDF

Info

Publication number
WO2017177614A1
WO2017177614A1 PCT/CN2016/098867 CN2016098867W WO2017177614A1 WO 2017177614 A1 WO2017177614 A1 WO 2017177614A1 CN 2016098867 W CN2016098867 W CN 2016098867W WO 2017177614 A1 WO2017177614 A1 WO 2017177614A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
codeword
check matrix
sent
matrix
Prior art date
Application number
PCT/CN2016/098867
Other languages
English (en)
French (fr)
Inventor
胡婧婷
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017177614A1 publication Critical patent/WO2017177614A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0057Block codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators

Definitions

  • Embodiments of the present invention relate to, but are not limited to, the field of communications, and in particular, to an encoding method and apparatus, a decoding method, and an apparatus.
  • Random boxing means that the sent message is in one-to-one correspondence with a codebook (a collection of codewords).
  • a codebook a collection of codewords.
  • the sender sends a specific message, it first finds the codebook corresponding to the message, and then randomly selects a codeword in the codebook to send out, and the codeword serves as the output of the encoder.
  • the eavesdropping channel model is proposed, constructing the actual codeword that can approach the safe capacity becomes a new research direction in the field of coding.
  • the eavesdropping channel is Gaussian noise and the main channel is noiseless
  • the coset encoding scheme is adopted, and the subcode is any "good code" dual code that can reach the eavesdropping channel capacity, and the information theory meaning can be achieved.
  • Wyner's research on eavesdropping channel is mainly for discrete noiseless and Gaussian noise. It is necessary to point out that the above two noise scenarios are quite different from the actual wireless channel.
  • the actual wireless channel is a time varying fading channel, and the skilled artisan typically employs a Rayleigh fading channel to simulate the actual wireless channel.
  • Liang et al. studied the safety capacity of the time-varying fading eavesdropping channel model. In the proof of the existence of safety capacity, Liang et al. also used random packing coding techniques.
  • the embodiment of the invention provides an encoding method and device, a decoding method and a device, so as to at least solve the problem that the encoding technology in the related art cannot achieve the information theory meaning security.
  • an encoding method including:
  • Obtaining a to-be-sent message where the to-be-sent message includes: a k-bit real message, a (1-k)-bit random message, where l, k are natural numbers;
  • the diag(h b ) is a fading coefficient matrix of a main channel
  • an element h b,i in the diag(h b ) is a complex Gaussian random variable, and a variance of the h b,i is Among them, 1 ⁇ i ⁇ n.
  • generating the check matrix H according to the fading coefficient matrix diag(h b ) and the preset check matrix H * includes: calculating the check matrix H by using the following formula:
  • H diag -1 (h b )H * .
  • the preset check matrix H * is a check matrix of a low-density parity check code LDPC code with a codeword length of n+k bits and a message length of 1 bit, where k ⁇ l ⁇ n +k.
  • determining the (lk)-bit random message by randomly generating a (lk)-bit random message; generating the (lk)-bit random message by using a generation matrix of a linear block code The codeword corresponding to the random message.
  • the method before the sending the codeword r n+k , the method further includes one of the following:
  • the actual transmission rate of the codeword rn +k is less than the channel capacity of the primary channel, and the actual transmission rate of the subcode is equal to the channel capacity of the eavesdropping channel.
  • the actual transmission rate of the codeword r n+k is determined to be smaller than the channel capacity of the primary channel, and the actual transmission rate of the subcode is equal to the channel capacity of the eavesdropping channel:
  • the actual transmission rate of the subcode is The actual transmission rate of the codeword r n+k is
  • the diag(h e ) is a matrix of fading coefficients of the eavesdropping channel, and the element h e,i in the diag(h e ) is a complex Gaussian random variable, and the variance of the h e,i is Where ⁇ i ⁇ n;
  • the SNR 1 is the signal to noise ratio of the primary channel, and the SNR 2 is the signal to noise ratio of the eavesdropping channel.
  • the value of SNR 1 is greater than the value of SNR 2 .
  • encrypting, by using the preset key, the to-be-sent message includes:
  • the s k is the real message vector
  • the d lk is the random message vector
  • the preset key (p k , q lk ) is a key obtained by:
  • the feedback vector of the legitimate user corresponding to the message sent before the message to be sent is mapped to a preset key (p k , q lk ), and the preset key length is 1 bit.
  • the manner of solving the codeword r n+k includes:
  • a r n + k H T 0 stars Solving c n+kl , wherein the c n+kl represents a parity bit of the n+k1 bits after encoding;
  • mapping the feedback vector of the legitimate user corresponding to the message sent before the message to be sent to a preset key (p k , q lk ) comprises: mapping 2 n feedback vectors to 2 k On the real message vector, each of the real message vectors corresponds to 2 nk feedback vectors, wherein each of the feedback vectors has a length of n bits.
  • a decoding method including:
  • the to-be-sent message includes: a k-bit real message, a (lk)-bit random message, where l, k are natural numbers, the n is a codeword length of the real message, and the check matrix H
  • the codeword r n+k is decrypted using a preset key.
  • an encoding apparatus including:
  • the first obtaining module is configured to obtain a to-be-sent message, where the to-be-sent message includes: a k-bit real message, and a (1-k)-bit random message, where l, k are natural numbers;
  • An encryption module configured to encrypt the to-be-sent message by using a preset key
  • a second obtaining module configured to encode the encrypted message to be sent according to the check matrix H, to obtain a codeword r n+k , where n is a codeword length of the real message, the school
  • the sending module is configured to send the codeword r n+k .
  • a decoding apparatus including:
  • the receiving module is configured to receive the codeword r n+k , wherein the codeword r n+k is a codeword obtained by encoding the encrypted message to be sent according to the check matrix H to obtain a codeword.
  • r n+k wherein the to-be-sent message includes: a k-bit real message, a (lk)-bit random message, where l, k are natural numbers, and n is a codeword length of the real message,
  • a decryption module is arranged to decrypt the codeword rn +k using a preset key.
  • the to-be-sent message is obtained, where the to-be-sent message includes: a k-bit real message, a (lk)-bit random message, where l, k are natural numbers; and the preset message is used for the to-be-sent message.
  • FIG. 1 is a flow chart of an encoding method in accordance with an embodiment of the present invention.
  • FIG. 2 is a flow chart of a decoding method in accordance with an embodiment of the present invention.
  • FIG. 3 is a structural block diagram of an encoding apparatus according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing the structure of a decoding apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a channel model of an arrangement in accordance with an alternative embodiment of the present invention.
  • FIG. 6 is a graph 1 in accordance with an alternative embodiment of the present invention.
  • Figure 7 is a graph 2 of an alternative embodiment of the present invention.
  • Figure 8 is a graph three in accordance with an alternate embodiment of the present invention.
  • FIG. 1 is a flowchart of an encoding method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 Acquire a to-be-sent message, where the to-be-sent message includes: a k-bit real message, a (1-k)-bit random message, where l, k are natural numbers;
  • Step S104 encrypting the to-be-sent message by using a preset key
  • Step S106 encoding the encrypted message to be sent according to the check matrix H, to obtain a code word r n+k , where n is the code word length of the real message, and the check matrix H is a matrix according to the fading coefficient.
  • a matrix generated by diag(h b ) and a preset check matrix H * , the check matrix H satisfies the following condition: r n+k H T 0;
  • Step S108 transmitting the codeword r n+k .
  • the diag(h b ) is a fading coefficient matrix of the main channel
  • the element h b,i in the diag(h b ) is a complex Gaussian random variable
  • the variance of the h b,i is Among them, 1 ⁇ i ⁇ n.
  • the check matrix H is generated according to the fading coefficient matrix diag(h b ) and the preset check matrix H * , including: calculating the check matrix H by the following formula:
  • H diag -1 (h b )H * .
  • the preset check matrix H * is a check matrix of a low-density parity check code LDPC code whose codeword length is n+k bits and whose message length is 1 bit, where k ⁇ l ⁇ n+k.
  • the (l-k)-bit random message is determined by:
  • the (l-k)-bit random message is generated by the generation matrix of the linear block code to generate a codeword corresponding to the random message.
  • the method before sending the codeword r n+k , the method further includes one of the following:
  • the actual transmission rate of the codeword r n+k is less than the channel capacity of the primary channel, and the actual transmission rate of the subcode is equal to the channel capacity of the eavesdropping channel.
  • the actual transmission rate of the codeword r n+k is determined to be smaller than the channel capacity of the primary channel, and the actual transmission rate of the subcode is equal to the channel capacity of the eavesdropping channel;
  • the actual transmission rate of the subcode is The actual transmission rate of the codeword r n+k is
  • the diag(h e ) is a matrix of fading coefficients of the eavesdropping channel, and the element h e,i in the diag(h e ) is a complex Gaussian random variable, and the variance of the h e,i is Among them, 1 ⁇ i ⁇ n.
  • the value of SNR 1 is greater than the value of SNR 2 , wherein the SNR 1 is the signal to noise ratio of the primary channel, and the SNR 2 is the signal to noise ratio of the eavesdropping channel.
  • the using the preset key for encrypting the to-be-sent message includes:
  • the s k is the real message vector
  • the d lk is the random message vector
  • the preset key (p k , q lk ) is a key obtained by:
  • the feedback vector of the legitimate user corresponding to the message sent before the message to be sent to a preset key (p k , q lk ), the preset key length being 1 bit, and the message sent before the message is to be sent It may be the previous message of the message to be sent, that is, the feedback vector is the feedback vector of the legitimate user corresponding to the previous message.
  • the manner of solving the codeword r n+k includes:
  • mapping the feedback vector of the legitimate user corresponding to the message sent before the message to be sent to a preset key (p k , q lk ) includes:
  • the 2 n feedback vectors are mapped onto 2 k of the real message vectors, each of the real message vectors corresponding to 2 nk feedback vectors, wherein each of the feedback vectors has a length of n bits.
  • FIG. 2 is a translation according to an embodiment of the present invention.
  • the flow chart of the code method is shown in Figure 2. The process includes the following steps:
  • step S204 the codeword r n+k is decrypted using a preset key.
  • the codeword r n+k is received, wherein the codeword r n+k is a codeword obtained by encoding the encrypted message to be transmitted according to the check matrix H, and obtaining the codeword r n +k , wherein the to-be-sent message includes: a k-bit real message, a (lk)-bit random message, where l, k are natural numbers, and n is a codeword length of the real message, and the check matrix H
  • the decryption of n+k solves the problem that the coding and decoding technology cannot achieve the security in the sense of information theory, and realizes secure coding and decoding.
  • a codec device is also provided, which is used to implement the above-mentioned embodiments and optional embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 3 is a structural block diagram of an encoding apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes:
  • the first obtaining module 32 is configured to obtain a to-be-sent message, where the to-be-sent message includes: a k-bit real message, and a (1-k)-bit random message, where l, k are natural numbers;
  • the encryption module 34 is connected to the first obtaining module 32 and configured to encrypt the to-be-sent message by using a preset key.
  • the second obtaining module 36 is connected to the encryption module 34 and configured to encode the encrypted message to be sent according to the check matrix H to obtain a codeword r n+k , where the n is a codeword of the real message.
  • the sending module 38 is connected to the second obtaining module 36 and configured to transmit the codeword r n+k .
  • FIG. 4 is a structural block diagram of a decoding apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes:
  • the receiving module 42 is configured to receive the codeword r n+k , wherein the codeword r n+k is a codeword obtained by encoding the encrypted message to be sent according to the check matrix H to obtain a codeword.
  • the decryption module 44 coupled to the receiving module 42, is configured to decrypt the codeword rn +k using a predetermined key.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are respectively located. Different processors.
  • the mathematical model of the Rayleigh fading eavesdropping channel with feedback can be expressed as
  • v b and v e in the above formula respectively represent the noise of the legitimate user and the eavesdropper channel, and they all have a mean of 0, and the variances are respectively Gaussian noise.
  • diag(h b ), diag(h e ) is a matrix of channel fading coefficients, and is a diagonal matrix as follows.
  • h b,i ,h e,i (1 ⁇ i ⁇ n) are complex Gaussian random variables, and their variances are respectively It is not difficult to know from the above definition that
  • the message to be transmitted is represented as u
  • the encryption key generated by the feedback is represented as k
  • the generated generation matrix is represented as M
  • the coded codeword is encoded.
  • the obtained new generation matrix can be used as the Rayleigh fading eavesdropping channel security coding scheme with feedback.
  • Generate a matrix along with the design idea of the Gaussian eavesdropping channel model coding scheme with feedback, the secure coding and coding scheme of the Rayleigh fading eavesdropping channel with feedback can be set.
  • An alternative embodiment of the present invention provides a secure codec method based on Low Density Parity Check (LDPC).
  • LDPC Low Density Parity Check
  • the theoretical basis for the setting of the secure coding scheme In the existence proof of the security coding theorem of the eavesdropping channel model, Wyner pointed out that to design a coding and decoding scheme that achieves information theory security, it is necessary to use a code called "random packing". technology.
  • the encoding technique corresponds one-to-one correspondence between the transmitted message and the stack of codewords. When a message to be transmitted is given, a codeword is randomly selected from the codeword box corresponding to the message and sent out. In order for the eavesdropper to not correctly translate the sent message, it is necessary to consume the ability of the eavesdropper to decode.
  • Wyner points out that if the eavesdropper knows the specific message sent, if the eavesdropper can correctly find it from the codeword box corresponding to the specific message.
  • the "random" codeword is sent ("translated"), the eavesdropper's decoding ability is consumed. If the codeword box corresponding to the specific message is also regarded as a new codeword, it is desirable that the transmission rate corresponding to the new codeword is equal to the channel capacity of the eavesdropping channel, because this represents the entire eavesdropper.
  • the decoding capability is consumed by translating the new codeword so that the eavesdropper has no additional ability to translate which one is sent. The news is on.
  • the settable security coding scheme needs to have the following three characteristics:
  • the codeword can be divided into 2 k subcodes, each subcode corresponding to one transmitted k bit long message bit;
  • the noise-contaminated codeword fed back by the legitimate user is regarded as the key shared between the legitimate user and the sender, and is used to encrypt The message to be sent. This requires constructing a mapping of the contaminated codeword and the transmitted message set, and then mapping 2n contaminated codewords to 2k messages.
  • a check matrix of LDPC code with a codeword length of n+k bits and a message length of 1 bit is set, which is denoted as H * , and the matrix has n+kl rows and n+k columns.
  • Reuse fading coefficient matrix diag (h b) H * and conventional to generate a new parity check matrix H diag -1 (h b) H *.
  • the l-bit message contains a k-bit real transmission message and a 1-k-bit random message. Obviously, l satisfies the following constraint k ⁇ l ⁇ n + k.
  • the encoding method of randomly selecting a codeword from its corresponding codeword box needs to firstly the check matrix of said set is H, a length of n + k bits of the LDPC code is divided into 2 sub-codes k k bits in accordance with a real message, the length of each sub-code is n bits.
  • This type of subcode is also a linear block code, and the message bits of the subcode are lk-bit random messages.
  • the encoding method of "randomly selecting one codeword transmission from subcodes” is implemented in the following manner: (a) randomly generating a lk-bit random message by a random number generator; (b) linearly grouping the lk-bit random message by linear grouping
  • the code generation matrix generates a codeword corresponding to it one by one, and then the codeword is transmitted.
  • the actual transmission rate of the above subcode is
  • the check matrix is H
  • the codeword length is n+k bits
  • the actual transmission rate of the LDPC code with a message length of 1 bit is
  • the check matrix is H
  • the codeword length is n+k bits
  • the LDPC code with the message length of 1 bit is set as follows: (a) the check matrix H is reduced to [A
  • the B matrix is a matrix with a row number of n+kl and a column number of l.
  • c n+kl represents the parity of the n+k1 bits after encoding.
  • Equation 4 gives the message when the encryption is known And encrypted randomly generated messages
  • the code word r n + k in the actual transfer rate It is smaller than the channel capacity of the primary channel, so the legitimate user can simultaneously decode the real message s k and the randomly generated message d lk with a decoding error probability close to zero.
  • the eavesdropper first of all, he hopes that he will consume all of his decoding ability on the correct translation subcode r n , here,
  • r n is the encrypted real message sent in r n+k Deleted, that is, r n is a subcode of r n+k .
  • the encrypted message is I hope that the eavesdropper can correctly translate And all of its decoding capabilities are consumed in the translation Above, this requires the transfer rate of the subcode r n :
  • Equation 7 shows the actual transmission rate of the codeword r n+k for the eavesdropper It is greater than the channel capacity of the eavesdropping channel. It is known from Shannon's theorem that the eavesdropper's decoding error probability cannot be close to zero.
  • BP Belief Propagation
  • the prior probability of the information bits is preset for the Rayleigh fading channel; (2) the posterior probability of each check node is obtained by the information probability of the information node according to the belief propagation algorithm; (3) by the check node The posterior probability is used to derive the posterior probability of the information node; (4) the posterior probability of the information node is compared with the decision condition as a hard decision, and if it is satisfied, the decoding ends; if not, the above (2) to (4) are repeated. Step, iteratively iterative until the condition is met, and the decoding result is obtained. If the number of iterations reaches a preset maximum number of times (for example, 100) and the condition is still not met, then the decoding fails.
  • a preset maximum number of times for example, 100
  • the eavesdropper Since the legitimate user knows the key p k , he can be translated And the key p k directly gets the real message s k . The eavesdropper does not know the key p k , he needs to directly use the BP decoding algorithm to translate the real message s k .
  • FIG. 5 is a schematic diagram of a channel model set according to an alternative embodiment of the present invention, as shown in FIG. This includes senders, encoders, channels, legitimate users, and eavesdroppers.
  • the simulation results show that the bit error rate of the legitimate user at this time is 1 ⁇ 10 -9 , which is lower than the bit error rate of the legitimate user without feedback (the legal user error bit rate corresponding to the code word without feedback is 2 ⁇ 10 -9 ), and this shows that feedback can improve the decoding accuracy of legitimate users.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course It can be done through hardware, but in many cases the former is a better implementation.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic).
  • the disc, the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • S1 Acquire a to-be-sent message, where the to-be-sent message includes: a k-bit real message, a (1-k)-bit random message, where l, k are natural numbers;
  • the storage medium is further arranged to store program code for performing the method steps of the above-described embodiments:
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs the method steps of the foregoing embodiments according to the stored program code in the storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Error Detection And Correction (AREA)

Abstract

本发明实施例提供了一种编码方法及装置、译码方法及装置,其中,该编码方法包括:获取待发送消息,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;对该待发送消息使用预设密钥进行加密;依据校验矩阵H对加密后的该待发送消息进行编码,得到码字rn+k,其中,该n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;发送该码字rn+k

Description

编码方法及装置、译码方法及装置 技术领域
本发明实施例涉及但不限于通信领域,具体而言,涉及一种编码方法及装置、译码方法及装置。
背景技术
在相关技术中,对无线通信系统物理层安全的研究起源于怀纳(Wyner)著名的关于窃听信道的论文。在该论文中,Wyner研究了点对点通信系统被一个窃听者窃听的信道模型。Wyner用条件熵来定义窃听者对机密消息的疑惑度,并给出了当窃听者的疑惑度最大时信息传输效率的最大值,即安全容量。在安全容量的存在性证明中,Wyner提出了随机装箱(random binning)的编码技术。
在考虑安全的信道模型中,该编码技术已经成为一种最常见的编码技术。随机装箱是指:发送的消息和一个码本(一堆码字组成的集合)一一对应。当发送方发送一个具体的消息时,首先找出和此消息相对应的码本,然后随机在此码本中选取一个码字发送出去,该码字就作为编码器的输出。在窃听信道模型提出之后,构造实际的能逼近安全容量的码字就成为了编码领域一个新的研究方向。
Wyner指出,在窃听信道是高斯噪声、主信道无噪声的情况下,采用陪集编码方案、且子码是任意一种可达窃听信道容量的“好码”的对偶码时,可以达到信息论意义上的安全。Wyner对窃听信道的研究主要针对离散无记忆和高斯噪声两种噪声情况,这里必须指出上述两种噪声情况和实际无线信道有着较大的区别。实际的无线信道是时变衰落的信道,相关技术人员通常采用瑞利衰落信道来模拟实际的无线信道。基于Wyner的研究工作,Liang等人研究了时变衰落窃听信道模型的安全容量,在安全容量的存在性证明中,Liang等人同样使用了随机装箱的编码技术。
针对相关技术中,相关技术中的编码技术不能达到信息论意义安全的问题,目前还没有有效地解决方案。
发明内容
本发明实施例提供了一种编码方法及装置、译码方法及装置,以至少解决相关技术中编码技术不能达到信息论意义安全的问题。
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
根据本发明实施例的一个方面,提供了一种编码方法,包括:
获取待发送消息,其中,所述待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;
对所述待发送消息使用预设密钥进行加密;
依据校验矩阵H对加密后的所述待发送消息进行编码,得到码字rn+k,其中,所述n为所述真实消息的码字长度,所述校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,所述校验矩阵H满足以下条件:rn+kHT=0;
发送所述码字rn+k
可选地,所述diag(hb)为主信道的衰落系数矩阵,所述diag(hb)中的元素hb,i为复高斯随机变量,所述hb,i的方差为
Figure PCTCN2016098867-appb-000001
其中,1≤i≤n。
可选地,依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成校验矩阵H,包括:通过以下公式计算得到所述校验矩阵H:
H=diag-1(hb)H*
可选地,所述预设校验矩阵H*为码字长度为n+k比特,并且消息长度为l比特的低密度奇偶校验码LDPC码的校验矩阵,其中,k<l<n+k。
可选地,通过以下方式确定所述(l-k)比特的随机消息:随机产生一个(l-k)比特的随机消息;将所述(l-k)比特的随机消息通过线性分组码的生成矩阵生成与所述随机消息对应的码字。
可选地,发送所述码字rn+k之前,所述方法还包括以下之一:
将所述码字rn+k划分为2k个子码,每一个所述子码对应一个k比特长度的消息;
从所述k比特真实消息所对应的子码中随机选取一个码字发送;
确定所述码字rn+k的实际传输速率小于主信道的信道容量,以及所述子码的实际传输速率等于窃听信道的信道容量。
可选地,通过以下方式确定所述码字rn+k的实际传输速率小于主信道的信道容量,以及所述子码的实际传输速率等于窃听信道的信道容量:
Figure PCTCN2016098867-appb-000002
Figure PCTCN2016098867-appb-000003
其中,所述子码的实际传输速率为
Figure PCTCN2016098867-appb-000004
所述码字rn+k的实际传输速率为
Figure PCTCN2016098867-appb-000005
所述diag(he)为窃听信道的衰落系数矩阵,所述diag(he)中的元素he,i为复高斯随机变量,所述he,i的方差为
Figure PCTCN2016098867-appb-000006
其中,1≤i≤n;所述SNR1为主信道的信噪比,所述SNR2为窃听信道的信噪比。
可选地,SNR1的值大于SNR2的值。
可选地,对所述待发送消息使用预设密钥进行加密包括:
将sk和dl-k使用预设密钥(pk,ql-k)加密为
Figure PCTCN2016098867-appb-000007
所述sk为所述真实消息向量,所述dl-k为所述随机消息向量,其中,所述预设密钥(pk,ql-k)为通过以下方式得到的密钥:将在所述待发送消息之前发送的消息所对应的合法用户的反馈向量映射为一个预设密钥(pk,ql-k),所述预设密钥长度为l比特。
可选地,求解所述码字rn+k的方式包括:
由rn+kHT=0得出
Figure PCTCN2016098867-appb-000008
解得cn+k-l,其中,所述cn+k-l表示编码之后的n+k-l比特的校验位;
Figure PCTCN2016098867-appb-000009
可选地,将在所述待发送消息之前发送的消息所对应的合法用户的反馈向量映射为一个预设密钥(pk,ql-k)包括:将2n个反馈向量映射到2k个所述真实消息向量上,每一个所述真实消息向量对应2n-k个反馈向量,其中,每个所述反馈向量的长度为n比特。
根据本发明实施例的一个方面,提供了一种译码方法,包括:
接收码字rn+k,其中,所述码字rn+k为通过以下方式得到的码字:依据校验矩阵H对加密后的待发送消息进行编码,得到码字rn+k,其中,所述待发送 消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数,所述n为所述真实消息的码字长度,所述校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,所述校验矩阵H满足以下条件:rn+kHT=0;
使用预设密钥对所述码字rn+k进行解密。
根据本发明实施例的另一方面,提供了一种编码装置,包括:
第一获取模块,设置为获取待发送消息,其中,所述待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;
加密模块,设置为对所述待发送消息使用预设密钥进行加密;
第二获取模块,设置为依据校验矩阵H对加密后的所述待发送消息进行编码,得到码字rn+k,其中,所述n为所述真实消息的码字长度,所述校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,所述校验矩阵H满足以下条件:rn+kHT=0;
发送模块,设置为发送所述码字rn+k
根据本发明实施例的另一方面,提供了一种译码装置,包括:
接收模块,设置为接收码字rn+k,其中,所述码字rn+k为通过以下方式得到的码字:依据校验矩阵H对加密后的待发送消息进行编码,得到码字rn+k,其中,所述待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数,所述n为所述真实消息的码字长度,所述校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,所述校验矩阵H满足以下条件:rn+kHT=0;
解密模块,设置为使用预设密钥对所述码字rn+k进行解密。
通过本发明实施例,获取待发送消息,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;对该待发送消息使用预设密钥进行加密;依据校验矩阵H对加密后的该待发送消息进行编码,得到码字rn+k,其中,该n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;发送该码字rn+k,解决了编码技术不能达到信息论意义上安全的问题,实现了安全编码译码。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是根据本发明实施例的一种编码方法的流程图;
图2是根据本发明实施例的一种译码方法的流程图;
图3是根据本发明实施例的一种编码装置的结构框图;
图4是根据本发明实施例的一种译码装置的结构框图;
图5是根据本发明可选实施例的设置的信道模型示意图;
图6是根据本发明可选实施例的曲线图一;
图7是根据本发明可选实施例的曲线图二;
图8是根据本发明可选实施例的曲线图三。
本发明的实施方式
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明实施例的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
在本实施例中提供了一种编码方法,图1是根据本发明实施例的一种编码方法的流程图,如图1所示,该流程包括如下步骤:
步骤S102,获取待发送消息,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;
步骤S104,对该待发送消息使用预设密钥进行加密;
步骤S106,依据校验矩阵H对加密后的该待发送消息进行编码,得到码 字rn+k,其中,该n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;
步骤S108,发送该码字rn+k
通过上述步骤,获取待发送消息,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;对该待发送消息使用所述预设密钥进行加密;依据校验矩阵H对加密后的该待发送消息进行编码,得到码字rn+k,其中,该n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;发送该码字rn+k,解决了编码技术不能达到信息论意义上安全的问题,实现了安全编码译码。
在本实施例中,该diag(hb)为主信道的衰落系数矩阵,该diag(hb)中的元素hb,i为复高斯随机变量,该hb,i的方差为
Figure PCTCN2016098867-appb-000010
其中,1≤i≤n。
在本实施例中,依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成校验矩阵H,包括:通过以下公式计算得到该校验矩阵H:
H=diag-1(hb)H*
在本实施例中,该预设校验矩阵H*为码字长度为n+k比特,并且消息长度为l比特的低密度奇偶校验码LDPC码的校验矩阵,其中,k<l<n+k。
在本实施例中,通过以下方式确定该(l-k)比特的随机消息:
随机产生一个(l-k)比特的随机消息;
将该(l-k)比特的随机消息通过线性分组码的生成矩阵生成与该随机消息对应的码字。
在本实施例中,发送该码字rn+k之前,该方法还包括以下之一:
将该码字rn+k划分为2k个子码,每一个该子码对应一个k比特长度的消息;
从该k比特真实消息所对应的子码中随机选取一个码字发送;
确定该码字rn+k的实际传输速率小于主信道的信道容量,以及该子码的实 际传输速率等于窃听信道的信道容量。
在本实施例中,通过以下方式确定该码字rn+k的实际传输速率小于主信道的信道容量,以及该子码的实际传输速率等于窃听信道的信道容量;
Figure PCTCN2016098867-appb-000011
Figure PCTCN2016098867-appb-000012
其中,该子码的实际传输速率为
Figure PCTCN2016098867-appb-000013
该码字rn+k的实际传输速率为
Figure PCTCN2016098867-appb-000014
该diag(he)为窃听信道的衰落系数矩阵,该diag(he)中的元素he,i为复高斯随机变量,该he,i的方差为
Figure PCTCN2016098867-appb-000015
其中,1≤i≤n。
在本实施例中,SNR1的值大于SNR2的值,其中,该SNR1为主信道的信噪比,该SNR2为窃听信道的信噪比。
在本实施例中,对该待发送消息使用预设密钥进行加密包括:
将sk和dl-k使用预设密钥(pk,ql-k)加密为
Figure PCTCN2016098867-appb-000016
该sk为该真实消息向量,该dl-k为该随机消息向量,其中,该预设密钥(pk,ql-k)为通过以下方式得到的密钥:
将在该待发送消息之前发送的消息所对应的合法用户的反馈向量映射为一个预设密钥(pk,ql-k),该预设密钥长度为l比特,待发送消息之前发送的消息可以是待发送消息的前一个消息,即该反馈向量是前一个消息所对应的合法用户的反馈向量。
在本实施例中,求解该码字rn+k的方式包括:
由rn+kHT=0得出
Figure PCTCN2016098867-appb-000017
解得cn+k-l,其中,该cn+k-l表示编码之后的n+k-l比特的校验位;
Figure PCTCN2016098867-appb-000018
在本实施例中,将在该待发送消息之前发送的消息所对应的合法用户的反馈向量映射为一个预设密钥(pk,ql-k)包括:
将2n个反馈向量映射到2k个该真实消息向量上,每一个该真实消息向量对应2n-k个反馈向量,其中,每个该反馈向量的长度为n比特。
在本实施例中提供了一种译码方法,图2是根据本发明实施例的一种译 码方法的流程图,如图2所示,该流程包括如下步骤:
步骤S202,接收码字rn+k,其中,该码字rn+k为通过以下方式得到的码字:依据校验矩阵H对加密后的待发送消息进行编码,得到码字rn+k,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数,所述n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;
步骤S204,使用预设密钥对该码字rn+k进行解密。
通过上述步骤,接收码字rn+k,其中,该码字rn+k为通过以下方式得到的码字:依据校验矩阵H对加密后的待发送消息进行编码,得到码字rn+k,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数,所述n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;使用预设密钥对该码字rn+k进行解密,解决了编码译码技术不能达到信息论意义上安全的问题,实现了安全编码译码。
本实施例中的相关参数的具体确定方式可参照如图1所示的编码方法进行理解,此处不再赘述。
在本实施例中还提供了一种编码译码装置,该装置用于实现上述实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本发明实施例的一种编码装置的结构框图,如图3所示,该装置包括:
第一获取模块32,设置为获取待发送消息,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;
加密模块34,与第一获取模块32连接,设置为对该待发送消息使用预设密钥进行加密;
第二获取模块36,与加密模块34连接,设置为依据校验矩阵H对加密后的该待发送消息进行编码,得到码字rn+k,其中,所述n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;
发送模块38,与第二获取模块36连接,设置为发送该码字rn+k
图4是根据本发明实施例的一种译码装置的结构框图,如图4所示,该装置包括:
接收模块42,设置为接收码字rn+k,其中,该码字rn+k为通过以下方式得到的码字:依据校验矩阵H对加密后的待发送消息进行编码,得到码字rn+k,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数,该n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;
解密模块44,与接收模块42连接,设置为使用预设密钥对该码字rn+k进行解密。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述各个模块均位于同一处理器中;或者,上述各个模块分别位于不同的处理器中。
下面结合本发明可选实施例进行详细说明。
在本发明可选实施例中,带反馈的瑞利衰落窃听信道的数学模型可以表述为
yn=diag(hb)xn+vb,zn=diag(he)xn+ve,
上述公式中的vb和ve分别表示合法用户和窃听者信道的噪声,它们都是均值为0,方差分别为
Figure PCTCN2016098867-appb-000019
的高斯噪声。而diag(hb),diag(he)为信道衰落系数矩阵,且为如下对角矩阵,
Figure PCTCN2016098867-appb-000020
上述表达式中,hb,i,he,i(1≤i≤n)为复高斯随机变量,且它们的方差分别为
Figure PCTCN2016098867-appb-000021
由以上定义不难得知|hb,i|,|he,i|是服从瑞利衰落分布的。将待发送的消息表示为u,由反馈生成的加密密钥表示为k,编码的生成矩阵表示为M,则编码后的码字
Figure PCTCN2016098867-appb-000022
代入公式1,得到:
Figure PCTCN2016098867-appb-000023
定义M*=diag(hb)M,上述表达式可以改写为
Figure PCTCN2016098867-appb-000024
从上式可见,如果信道衰落系数矩阵diag(hb),diag(he)能被发送方和接收方都获取的话,则可以利用无衰落时的生成矩阵M和衰落系数矩阵diag(hb)来产生一个新的编码生成矩阵M*=diag(hb)M。而由上式可知,如果利用M*来进行编码,则合法用户的信道可以等价为一个高斯信道。而窃听者的信道还是衰落信道,只不过其衰落系数变成了diag(he)diag-1(hb)。由上可知,当利用衰落系数矩阵来对带反馈的高斯窃听信道编码方案的生成矩阵进行预处理之后,所得到的新生成矩阵就可以用来作为带反馈的瑞利衰落窃听信道安全编码方案的生成矩阵。这样,沿着带反馈的高斯窃听信道模型编码方案的设计思路,就能设置出带反馈的瑞利衰落窃听信道的安全编译码方案。
本发明可选实施例提供了一种基于低密度奇偶校验码(LDPC)的安全编译码方法。本发明可选实施例的编码方案的设置如下:
安全编译码方案设置的理论依据:在窃听信道模型的安全编码定理的存在性证明中,Wyner指出要设计出达到信息论安全的编译码方案,需要使用一种被称为“随机装箱”的编码技术。该编码技术将发射的消息和一堆码字所组成的箱子一一对应,当给定要传输的消息时,随机的从该消息所对应的码字箱子中选取一个码字发送出去。为了让窃听者不能正确译出发送的消息,需要消耗窃听者的译码能力,Wyner指出假设窃听者知道发送的具体消息时,如果窃听者能从该具体消息所对应的码字箱子中正确找到(“译出”)发送的那个随机码字时,则窃听者的译码能力就得到了消耗。如果将该具体消息所对应的码字箱子也看成是一种新的码字的话,则希望该新的码字所对应的传输速率等于窃听信道的信道容量,因为这代表着窃听者的全部译码能力都消耗在译出该新码字上,这样窃听者就没有额外的能力去译出究竟发送的是哪个 消息上了。
基于Wyner的安全编码定理证明的上述思想,假设发送的消息是k比特,码字的长度为n比特,则可设置的安全编码方案需要具备以下三个特点:
(a)该码字可划分为2k个子码,每一个子码对应一个发送的k位长的消息比特;
(b)该码字的实际传输速率
Figure PCTCN2016098867-appb-000025
要小于主信道的信道容量C(SNR1),而子码的实际传输速率要等于窃听信道的信道容量C(SNR2);
(c)给定发送的消息比特k,要随机的从消息比特k所对应的子码中选取一个码字发送出去。
此外,在带反馈的窃听信道模型的理论上的编译码方案设计中,合法用户反馈回的被噪声污染后的码字被当作合法用户和发送方之间共享的密钥,被用来加密待发送的消息。这就需要构造一个被污染后的码字和发送的消息集的映射,再将2n个被污染后的码字映射到2k个消息上。
安全编译码方案设置的参数说明:假设发送的消息是k比特的,通过随机数产生器随机生成一个l-k比特的随机消息。此外,假设码字的长度是n+k比特。
安全编译码方案的设置步骤:
按照经典的LDPC码的设计思路设置一个码字长度为n+k比特,消息长度为l比特的LDPC码的校验矩阵,记为H*,该矩阵有n+k-l行,有n+k列。再利用衰落系数矩阵diag(hb)和已有的H*生成一个新的校验矩阵H=diag-1(hb)H*
l比特的消息中包含了k比特的真实的发送消息和l-k比特的随机消息。显而易见,l满足如下约束条件k<l<n+k。
构造一个映射,均匀的将2n个n长向量映射到2k个消息向量上,即每一个消息向量对应了2n-k个n长向量。
为了实现Wyner在窃听信道模型的安全编码定理证明中所描述的编码方法,即当发送的k比特消息确定时,随机的从其对应的码字箱子中选取一个码字这种编码方式,首先需要将上述所设置的校验矩阵为H,长度为n+k比 特的LDPC码按照k比特的真实消息划分为2k个子码,每一个子码的长度为n比特。该类子码也是一种线性分组码,该子码的消息比特即是l-k比特的随机消息。采用如下方式实现“随机从子码中选取一个码字传送”的编码方式:(a)通过随机数生成器随机产生一个l-k比特的随机消息;(b)将该l-k比特的随机消息通过线性分组码的生成矩阵生成一个和其一一对应的码字,然后该将码字传送。
上述子码的实际传输速率为
Figure PCTCN2016098867-appb-000026
校验矩阵为H,码字长度为n+k比特,消息长度为l比特的LDPC码的实际传输速率为
Figure PCTCN2016098867-appb-000027
为了满足前面所述的安全编码方案的特点(b),需要令:
Figure PCTCN2016098867-appb-000028
在给出了上述n,k,l的约束关系之后,校验矩阵为H,码字长度为n+k比特,消息长度为l比特的LDPC码设置方法如下:(a)将该校验矩阵H通过高斯消元法化为[A|B]型矩阵,这里注意H矩阵为n+k-l行,n+k列的矩阵,A矩阵为单位矩阵,其行数和列数均为n+k-l。B矩阵为一个行数为n+k-l,列数为l的矩阵。当给定发送的真实消息sk,随机生成的消息为dl-k时,首先将前一个发送的消息所对应的合法用户的反馈向量映射为一个密钥(pk,ql-k),该密钥长度为l比特。将sk和dl-k加密为
Figure PCTCN2016098867-appb-000029
由校验矩阵的定义,得到:
Figure PCTCN2016098867-appb-000030
这里cn+k-l表示编码之后的n+k-l比特的校验位。
将H=[A|B]代入(公式1)中,得到:
Figure PCTCN2016098867-appb-000031
将(公式2)整理,可得
Figure PCTCN2016098867-appb-000032
进一步整理(公式3),得到:
Figure PCTCN2016098867-appb-000033
(公式4)给出了当知道加密后的消息
Figure PCTCN2016098867-appb-000034
和加密后的随机生成的消息
Figure PCTCN2016098867-appb-000035
时,计算码字的校验位的公式。知道了校验位之后,通过校验矩阵 H而得到的码字rn+k可表示为
Figure PCTCN2016098867-appb-000036
对于合法用户来说,码字rn+k的实际传输速率
Figure PCTCN2016098867-appb-000037
是小于主信道的信道容量的,所以合法用户可以以趋近于0的译码错误概率同时译出真实消息sk和随机生成的消息dl-k。对于窃听者而言,首先希望他将其全部的译码能力都消耗在正确译出子码rn上,这里,
Figure PCTCN2016098867-appb-000038
将rn和rn+k相比,很容易发现rn是将rn+k中发送的加密后的真实消息
Figure PCTCN2016098867-appb-000039
删掉,即rn是rn+k的子码。对于rn而言,其中的加密后的消息为
Figure PCTCN2016098867-appb-000040
希望窃听者能正确译出
Figure PCTCN2016098867-appb-000041
且将其全部的译码能力都消耗在译出
Figure PCTCN2016098867-appb-000042
上,这就需要子码rn的传输速率:
Figure PCTCN2016098867-appb-000043
Figure PCTCN2016098867-appb-000044
以及k<l<n+k,可以得出:
Figure PCTCN2016098867-appb-000045
(公式7)说明对于窃听者而言,码字rn+k的实际传输速率
Figure PCTCN2016098867-appb-000046
是大于窃听信道的信道容量的,由香农定理可知,窃听者的译码错误概率是不能趋近于0的。
合法用户和窃听者的译码器均采用经典置信传播(Belief Propagation,简称为BP)译码算法来译出
Figure PCTCN2016098867-appb-000047
该译码算法分为以下步骤:
(1)首先对瑞利衰落信道预设信息比特的先验概率;(2)由信息节点的信息概率按照置信传播算法得出各校验节点的后验概率;(3)由校验节点的后验概率推算出信息节点的后验概率;(4)将信息节点的后验概率对照判决条件作硬判决,若满足则译码结束;若不满足,则重复以上的(2)~(4)步骤,反复迭代,直到满足条件,得出译码结果。如果迭代次数达到一个预设的最大次数(例如100),条件仍然不满足,则宣布译码失败。由于合法用户知道密钥pk,他可由译出的
Figure PCTCN2016098867-appb-000048
和密钥pk而直接得到真实的消息sk。窃听者不知道密钥pk,他需要直接用BP译码算法来译出真实的消息sk
图5是根据本发明可选实施例的设置的信道模型示意图,如图5所示, 包括发送方、编码器、信道、合法用户以及窃听者。
本发明可选实施例的提供的具体实施方式
实例:采用BP译码算法的规则(3,2)LDPC安全码
首先,当n=280,k=20,l=100(此时实际的码字速率为0.33),且合法用户的信噪比为14时,仿真结果表明此时合法用户的误比特率为4×10-9,这和不带反馈时合法用户的误比特率一样(不带反馈时该码字所对应的合法用户误比特率也为4×10-9)。图6是根据本发明可选实施例的曲线图一,如图6所示,给出了当n=280,k=20,l=100,主信道和窃听信道信噪比的比值和窃听者误比特率之间的关系。由仿真结果以及图6可以看出,反馈可以增加窃听者的译码错误概率,从而提高系统的安全性。
接下来,降低码字的传输速率,令n=380,k=20,l=50(此时实际的码字速率为0.125),且合法用户的信噪比为14时,仿真结果表明此时合法用户的误比特率为3×10-9,这比不带反馈时合法用户的误比特率要低(不带反馈时该码字所对应的合法用户误比特率为4×10-9),而这说明反馈可以提高合法用户的译码正确率。图7是根据本发明可选实施例的曲线图二,如图7所示,给出了当n=380,k=20,l=50,主信道和窃听信道信噪比的比值和窃听者误比特率之间的关系。由仿真结果以及图7可以看出,反馈可以增加窃听者的译码错误概率,从而提高系统的安全性。
最后,如果进一步降低码字的速率,例如:采用n=980,k=20,l=100的规则(3,2)LDPC码,此时码字的实际速率为0.1。仿真结果表明此时合法用户的误比特率为1×10-9,这比不带反馈时合法用户的误比特率要低(不带反馈时该码字所对应的合法用户误比特率为2×10-9),而这说明反馈可以提高合法用户的译码正确率。
图8是根据本发明可选实施例的曲线图三,如图8所示,给出了当n=980,k=20,l=100,主信道和窃听信道信噪比的比值和窃听者误比特率之间的关系。不难看出反馈可以增加窃听者的译码错误概率,从而提高系统的安全性。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也 可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:
S1,获取待发送消息,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;
S2,对该待发送消息使用预设密钥进行加密;
S3,依据校验矩阵H对加密后的该待发送消息进行编码,得到码字rn+k,其中,该n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0。
S4,发送该码字rn+k
可选地,存储介质还被设置为存储用于执行上述实施例的方法步骤的程序代码:
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例的方法步骤。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程 序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
本发明实施例提供了一种编码方法及装置、译码方法及装置,其中,该编码方法包括:获取待发送消息,其中,该待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;对该待发送消息使用预设密钥进行加密;依据校验矩阵H对加密后的该待发送消息进行编码,得到码字rn+k,其中,该n为该真实消息的码字长度,该校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,该校验矩阵H满足以下条件:rn+kHT=0;发送该码字rn+k。采用上述技术方案,解决了编码技术不能达到信息论意义上安全的问题,实现了安全编码译码。

Claims (14)

  1. 一种编码方法,该方法包括:
    获取待发送消息,其中,所述待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;
    对所述待发送消息使用预设密钥进行加密;
    依据校验矩阵H对加密后的所述待发送消息进行编码,得到码字rn+k,其中,所述n为所述真实消息的码字长度,所述校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,所述校验矩阵H满足以下条件:rn+kHT=0;
    发送所述码字rn+k
  2. 根据权利要求1所述的方法,其中,
    所述diag(hb)为主信道的衰落系数矩阵,所述diag(hb)中的元素hb,i为复高斯随机变量,所述hb,i的方差为
    Figure PCTCN2016098867-appb-100001
    其中,1≤i≤n。
  3. 根据权利要求1所述的方法,其中,所述依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成校验矩阵H,包括:
    通过以下公式计算得到所述校验矩阵H:
    H=diag-1(hb)H*
  4. 根据权利要求1所述的方法,其中,
    所述预设校验矩阵H*为码字长度为n+k比特,并且消息长度为l比特的低密度奇偶校验码LDPC的校验矩阵,其中,k<l<n+k。
  5. 根据权利要求1所述的方法,其中,通过以下方式确定所述(l-k)比特的随机消息:
    随机产生一个(l-k)比特的随机消息;
    将所述(l-k)比特的随机消息通过线性分组码的生成矩阵,生成与所述随机消息对应的码字。
  6. 根据权利要求1所述的方法,所述发送所述码字rn+k之前,所述方法还包括以下之一:
    将所述码字rn+k划分为2k个子码,每一个所述子码对应一个k比特长度的消息;
    从所述k比特真实消息所对应的子码中随机选取一个码字发送;
    确定所述码字rn+k的实际传输速率小于主信道的信道容量,以及确定所述子码的实际传输速率等于窃听信道的信道容量。
  7. 根据权利要求6所述的方法,其中,通过以下方式确定所述码字rn+k的实际传输速率小于主信道的信道容量,以及确定所述子码的实际传输速率等于窃听信道的信道容量:
    Figure PCTCN2016098867-appb-100002
    Figure PCTCN2016098867-appb-100003
    其中,所述子码的实际传输速率为
    Figure PCTCN2016098867-appb-100004
    所述码字rn+k的实际传输速率为
    Figure PCTCN2016098867-appb-100005
    所述diag(he)为窃听信道的衰落系数矩阵,所述diag(he)中的元素he,i为复高斯随机变量,所述he,i的方差为
    Figure PCTCN2016098867-appb-100006
    其中,1≤i≤n;所述SNR1为主信道的信噪比,所述SNR2为窃听信道的信噪比。
  8. 根据权利要求7所述的方法,其中,
    SNR1的值大于SNR2的值。
  9. 根据权利要求7所述的方法,其中,对所述待发送消息使用预设密钥进行加密,包括:
    将sk和dl-k使用预设密钥(pk,ql-k)加密为
    Figure PCTCN2016098867-appb-100007
    所述sk为所述真实消息向量,所述dl-k为所述随机消息向量,其中,所述预设密钥(pk,ql-k)为通过以下方式得到的密钥:
    将在所述待发送消息之前发送的消息所对应的合法用户的反馈向量映射为一个预设密钥(pk,ql-k),所述预设密钥长度为l比特。
  10. 根据权利要求9所述的方法,其中,所述求解所述码字rn+k的方式包括:
    由rn+kHT=0得出
    Figure PCTCN2016098867-appb-100008
    解得cn+k-l,其中,所述cn+k-l表示编码之后的n+k-l比特的校验位;
    Figure PCTCN2016098867-appb-100009
  11. 根据权利要求9所述的方法,其中,将在所述待发送消息之前发送的消息所对应的合法用户的反馈向量映射为一个预设密钥(pk,ql-k),包括:
    将2n个反馈向量映射到2k个所述真实消息向量上,每一个所述真实消息向量对应2n-k个反馈向量,其中,每个所述反馈向量的长度为n比特。
  12. 一种译码方法,该方法包括:
    接收码字rn+k,其中,所述码字rn+k为通过以下方式得到的码字:依据校验矩阵H对加密后的待发送消息进行编码,得到码字rn+k,其中,所述待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数,所述n为所述真实消息的码字长度,所述校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,所述校验矩阵H满足以下条件:rn+kHT=0;
    使用预设密钥对所述码字rn+k进行解密。
  13. 一种编码装置,该装置包括:
    第一获取模块,设置为获取待发送消息,其中,所述待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数;
    加密模块,设置为对所述待发送消息使用预设密钥进行加密;
    第二获取模块,设置为依据校验矩阵H对加密后的所述待发送消息进行编码,得到码字rn+k,其中,所述n为所述真实消息的码字长度,所述校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,所述校验矩阵H满足以下条件:rn+kHT=0;
    发送模块,设置为发送所述码字rn+k
  14. 一种译码装置,该装置包括:
    接收模块,设置为接收码字rn+k,其中,所述码字rn+k为通过以下方式得到的码字:依据校验矩阵H对加密后的待发送消息进行编码,得到码字rn+k,其中,所述待发送消息包括:k比特的真实消息,(l-k)比特的随机消息,其中l,k均为自然数,所述n为所述真实消息的码字长度,所述校验矩阵H为依据衰落系数矩阵diag(hb)和预设校验矩阵H*生成的矩阵,所述校验矩阵H满 足以下条件:rn+kHT=0;
    解密模块,设置为使用预设密钥对所述码字rn+k进行解密。
PCT/CN2016/098867 2016-04-11 2016-09-13 编码方法及装置、译码方法及装置 WO2017177614A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610225024.6A CN107294651A (zh) 2016-04-11 2016-04-11 编码方法及装置、译码方法及装置
CN201610225024.6 2016-04-11

Publications (1)

Publication Number Publication Date
WO2017177614A1 true WO2017177614A1 (zh) 2017-10-19

Family

ID=60042334

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/098867 WO2017177614A1 (zh) 2016-04-11 2016-09-13 编码方法及装置、译码方法及装置

Country Status (2)

Country Link
CN (1) CN107294651A (zh)
WO (1) WO2017177614A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119178A (zh) * 2006-08-01 2008-02-06 华为技术有限公司 信号发送、接收方法及信号发送、接收装置
WO2008111824A2 (en) * 2007-03-15 2008-09-18 Lg Electronics Inc. Method of encoding and decoding data using ldpc code
US20110103580A1 (en) * 2009-11-02 2011-05-05 International Business Machines Corporation Compressing encrypted data without the encryption key
CN103546166A (zh) * 2013-10-31 2014-01-29 中国科学院微电子研究所 一种喷泉码的校验矩阵构造方法、编解码方法及装置
CN104780022A (zh) * 2015-04-10 2015-07-15 清华大学 基于信道编码矩阵动态变化的物理层安全传输方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973314A (zh) * 2013-01-24 2014-08-06 中国科学院声学研究所 一种基于ldpc的信号编解码方法、及接收端和发送端
CN103414540A (zh) * 2013-08-14 2013-11-27 南京邮电大学 一种基于Polar码的退化窃听信道速率兼容方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119178A (zh) * 2006-08-01 2008-02-06 华为技术有限公司 信号发送、接收方法及信号发送、接收装置
WO2008111824A2 (en) * 2007-03-15 2008-09-18 Lg Electronics Inc. Method of encoding and decoding data using ldpc code
US20110103580A1 (en) * 2009-11-02 2011-05-05 International Business Machines Corporation Compressing encrypted data without the encryption key
CN103546166A (zh) * 2013-10-31 2014-01-29 中国科学院微电子研究所 一种喷泉码的校验矩阵构造方法、编解码方法及装置
CN104780022A (zh) * 2015-04-10 2015-07-15 清华大学 基于信道编码矩阵动态变化的物理层安全传输方法及系统

Also Published As

Publication number Publication date
CN107294651A (zh) 2017-10-24

Similar Documents

Publication Publication Date Title
US8689087B2 (en) Method and entity for probabilistic symmetrical encryption
JP4862159B2 (ja) 量子鍵配送方法、通信システムおよび通信装置
JP4554524B2 (ja) 量子鍵配送方法
US10015011B2 (en) Apparatus and method for secure communication on a compound channel
US8213615B2 (en) Data encoding method
US9496897B1 (en) Methods and apparatus for generating authenticated error correcting codes
Suresh et al. Strong secrecy for erasure wiretap channels
WO2004028074A1 (ja) 量子鍵配送方法および通信装置
KR20060003329A (ko) 양자키 배송 방법 및 통신 장치
Hooshmand et al. Polar code‐based secure channel coding scheme with small key size
Esmaeili et al. New secure channel coding scheme based on randomly punctured quasi‐cyclic‐low density parity check codes
Esmaeili et al. Joint channel coding‐cryptography based on random insertions and deletions in quasi‐cyclic‐low‐density parity check codes
Tajeddine et al. Private information retrieval over random linear networks
Elleuch et al. A public-key cryptosystem from interleaved Goppa codes
Hooshmand et al. PKC‐PC: a variant of the McEliece public‐key cryptosystem based on polar codes
Hooshmand et al. Efficient secure channel coding scheme based on low‐density lattice codes
Harrison Exact equivocation expressions for wiretap coding over erasure channel models
Gyöngyösi et al. Long-distance continuous-variable quantum key distribution with advanced reconciliation of a Gaussian modulation
Al-Hassan et al. New best equivocation codes for syndrome coding
WO2017177614A1 (zh) 编码方法及装置、译码方法及装置
US20050114660A1 (en) Method for encrypting and decrypting data for multi-level access control in an ad-hoc network
WO2017177613A1 (zh) 编码方法及装置,译码方法及装置
CN107294540B (zh) 编码方法及装置,译码方法及装置
WO2017177610A1 (zh) 编码方法及装置
KR101356104B1 (ko) 도청자의 평균 모호도 산출 방법, 보안 메시지 전송 방법 및 시스템

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16898429

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16898429

Country of ref document: EP

Kind code of ref document: A1