Abstract

We present a joint scheme that combines both error correction and security at the physical layer. In conventional communication systems, error correction is carried out at the physical layer while data security is performed at an upper layer. As a result, these steps are done as separate steps. However there has been a lot of interest in providing security at the physical layer. As a result, as opposed to the conventional system, we present a scheme that combines error correction and data security as one unit so that both encryption and encoding could be carried out at the physical layer. Hence, in this paper, we present an Error Correction-Based Cipher (ECBC) that combines error correction and encryption/decryption in a single step. Encrypting and encoding or decoding and decrypting in a single step will lead to a faster and more efficient implementation. One of the challenges of using previous joint schemes in a communications channel is that there is a tradeoff between data reliability and security. However, in ECBC, there is no tradeoff between reliability and security. Errors introduced at the transmitter for randomization are removed at the receiver. Hence ECBC can utilize its full capacity to correct channel errors. We show the result of randomization test on ECBC and its security against conventional attacks. We also present the nonpipelined and pipelined hardware architecture of ECBC, and the result of the FPGA implementation of the ECBC encryption. We also compare these results with non-ECBC schemes.

1. Introduction

Due to the rapid increase in the applications that can be carried out on portable wireless devices, it becomes necessary to secure data transmitted through these devices. Even though early work from [1] showed the existence of secrecy-achieving codes, error correction and data security schemes are still viewed as two different processes in a contemporary communication system. Error correction is carried out at the physical layer while security is performed at upper layers. Many security protocols today are designed and implemented with the assumptions that physical layer provides an error-free information. However with the emergence of resource constraint wireless devices and ad hoc network, encryption at higher layer become difficult to implement. As a result, there has been a lot interest in implementing encryption at the physical layer. The authors in [2] pointed out that the best and often the only way to secure data in a wireless sensor network is to encrypt the data using a secure encryption algorithm before it is transmitted over the air ways. They pointed out that the cost of software-based encryption procedure could outweigh the risks of the transmission being intercepted because of the constraint nature of resources, memory, and clock speeds on the sensor nodes.

Authors in [3, 4] have proposed physical layer encryption. However these encryption modules are visualized as a separate module from the error correction module. Contrary to their models, we propose a joint scheme that combines encryption and error correction in one step for physical layer encryption. In such a case, the secrecy achieving characteristics of channel codes could be exploited. This leads to improved efficiency, speeds and savings in hardware usage because of hardware reuse. This also gives flexibility in terms of design and technology used for fabrication. It is also difficult to build lower layer analyzers in terms of attacks.

The conventional secure communication model with the sender (Alice), legitimate receiver (Bob), and the eavesdropper (Eve) [1] is shown in Figure 1. Alice would like to send a confidential and reliable message ๐ฎ to Bob with whom they share a secret key while making sure that Eve has no knowledge of ๐ฎ. She does this by encrypting ๐ฎ with the secret key ๐ค to obtain a ciphertext ๐œ. The ciphertext ๐œ is encoded by introducing redundancy into ๐œ to obtain ๐ฑ so that channel errors could be detected and corrected at the receiver by Bob. Upon receiving ๐ฒ, the legitimate receiver (Bob) decodes it to obtain ๐‘๎…ž and he then decrypts with the aid of ๐ค to obtain the message ๐‘ข๎…ž intended for Bob. It is important to note that eavesdropper (Eve) has a knowledge of the decoder, hence she can obtain an error-free ciphertext as shown in Figure 1. The knowledge of the decoder does not decrease Shannon's entropy of ๐ฆ given ๐‘๎…ž=๐œ which can be expressed as ๐‡(๐ฎ/๐œ)=๐‡(๐ฎ).

In Figure 2, we show the alternative secure communication model for our scheme. When Alice wants to send a message ๐ฎ to Bob with whom they share a secret key while making sure that Eve has no knowledge of ๐ฎ. She does this by passing the message through the Error Correction-Based Cipher (ECBC) to obtain encoded ciphertext ๐ฑ with the aid of secret key ๐ค. Upon receiving ๐ฒ, the legitimate receiver (Bob) decodes and decrypts in a single step using ECBC with the aid of ๐ค to obtain the message ๐‘ข๎…ž intended for Bob. The eavesdropper (Eve) does not have a knowledge of the key to ECBC, hence the ciphertext she receives is not error-free as shown in Figure 2. Shannon's entropy of ๐ฎ for our model is therefore larger than that of the conventional model which can be expressed as (๐‡(๐ฎ/๐œ))ecbc>๐‡(๐ฎ).

This research combines the encryption and channel coding as one process thereby resulting in a potential reduction in hardware usage. This will potentially lead to reduction in hardware usage which in turn leads to an increase in power savings [5] as power consumption reduction and area efficiency are of utmost importance in modern wireless communication [6]. Also, there is no tradeoff between data reliability and security in ECBC as opposed to previous schemes [7โ€“9]. The ECBC scheme, cryptanalysis of ECBC, the result of the randomization test on ECBC, and the hardware implementation of ECBC are presented in this paper. The ECBC carries out both encryption and error correction in a single step as opposed to two separate steps.

The authors in [3] considered an architecture for physical layer encryption that first converts information sequences to longer channel codewords and then encrypts them using classical stream cipher. They pointed out that even though their architecture requires longer encryption sequences, it could use the natural randomness of the communication channel against known-plaintext. In our scheme, the order of the two processes is not of concern since they are done in one step by one unit. The authors in [2] pointed out how physical layer encryption is taking significant importance in wireless network security. They propose an efficient physical layer encryption that relies on implementation of OFB mode just after error correction.

The use of error correcting code as a public-key cryptosystem was introduced by [8]. McEliece scheme is based on algebraic coding theory using ๐‘ก-error correcting Goppa code. However, his scheme requires large block length (๐‘›=1000) in order to correct large number of errors (๐‘ก=50โ€‰bits). This results in very large computational overhead [9]. The author in [10] proposed a private key algebraic-code using McEliece scheme where he suggested that the generator matrix be made private. Their scheme provides better security with simpler error-correcting code thereby making it less computational intensive compared with McEliece. However, the author in [9] showed that it could be easily broken by a chosen-plaintext attack. They introduced a private key cryptosystem that requires simpler error correcting codes with distance โ‰ค6 and block length ๐‘›โ‰ค250. If these schemes are used for error-correction based ciphers, there is a tradeoff between reliability and security. The authors in [7] presented the Secret Error Correcting Code (SECC) using nonlinear Preparata code. Their two schemes preserve full error correcting capability while providing data secrecy. However there scheme I does not incorporate the error vector into the process. However, in our scheme, the error vector is added to the plaintext for randomization, thereby increasing the security of our system. The most recent joint scheme for error correction and cryptography was presented in [11] where they used High Diffusion (HD) codes. They built their cipher using the structure of Advanced Encryption Standard (AES) [12] replacing the high diffusion layer of the AES with error correcting code. Though their scheme provides data security and error correction, it is higher in complexity compared to McEliece-based scheme. They [5, 11] even confirmed that McEliece-based schemes have advantage of low power consumption by using the same hardware components available for error correction for security. As a result, McEliece-like schemes are desired for a constraint environment. Our Error Correction-based Cipher provides data reliability, integrity, and security. The full error correcting capability of the error correcting code is preserved.

3. Error Correction-Based Cipher (ECBC)

We present a private key algebraic-based system for physical layer encryption called Error Correction-Based Cipher (ECBC) that combines encryption and error correction into a single step. The scheme is based on the block chaining technique. In ECBC, a ๐‘˜-bit plaintext block ๐‘€ is enciphered into ๐‘›-bit ciphertext block ๐ถ. A detailed explanation of ECBC is presented in this section.(i)A stream of data is divided into ๐‘˜-bit blocks ๐‘€๐‘–, ๐‘– = 1, 2, 3, and so forth. (ii)Plaintext ๐‘€๐‘– is XORed with a randomization vector to obtain ๐‘‘๐‘–. The first plaintext block ๐‘€1 at time 1 is randomized by XORing it with a ๐‘˜-bit initialization vector (๐‘„โˆ—0 = initialization vector (IV)).(iii)A nonlinear function ๐‘“ transforms ๐‘‘๐‘– into ๐‘‹๐‘–. The reason for the use of nonlinear function will be explained in the cryptanalysis section of this paper. (iv)The output of the nonlinear function ๐‘‹๐‘– is encoded with the aid of the generator matrix ๐บ to obtain ๐‘๐‘–. ๐‘‹๐‘– is also stored in a register for obtaining a delay version which is then used to produce randomly generated vector ๐‘๐‘– with the aid of an expansion function (๐‘”). (v)The encoded data ๐‘๐‘– is permuted with the aid of permutation matrix ๐‘ƒ to produce ๐‘„๐‘–. The first ๐‘˜-bit of ๐‘„๐‘– is denoted as ๐‘„โˆ—๐‘– and is delayed with the aid of a register to produce ๐‘„โˆ—๐‘–โˆ’1 which will be XORed with the next block ๐‘€๐‘–+1. (vi)The randomly generated error vector ๐‘๐‘– is then added to ๐‘„๐‘– to form ciphertext ๐ถ๐‘– which is then sent through the channel.

A ciphertext ๐ถ๐‘– is expressed mathematically as ๐ถ๐‘–=๎€ท๐‘‹๐‘–๐บ๐‘ƒ+๐‘๐‘–๎€ธ.(1)

The block diagram representing the encryption process of ECBC is shown in Figure 3. Ciphertexts ๐ถ๐‘– for ๐‘– = 1, 2, 3, and so forth, are shown as ๐ถ1๎€ท๐‘€=๐‘“1+๐‘„0๎€ธ๐บ๐‘ƒ+๐‘1,(2) where ๐‘„0=IV1 and ๐‘1=๐‘”(IV2), ๐ถ2๎€ท๐‘€=๐‘“2+๐‘„โˆ—1๎€ธ๐บ๐‘ƒ+๐‘2,(3) where ๐‘„1=๐‘“(๐‘€1+๐‘„0)๐บ๐‘ƒ and ๐‘2=๐‘”(๐‘‹1),โ€‰โ€‰๐‘‹1=๐‘“(๐‘€1+๐‘„0), and ๐ถ3๎€ท๐‘€=๐‘“3+๐‘„โˆ—2๎€ธ๐บ๐‘ƒ+๐‘3,โ‹ฎ๐ถ(4)๐‘–๎€ท๐‘€=๐‘“๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ๐‘ƒ+๐‘๐‘–,(5) where ๐‘„โˆ—๐‘–โˆ’1=๐‘“(๐‘€๐‘–โˆ’1+๐‘„๐‘–โˆ’2)๐บ๐‘ƒ and ๐‘๐‘–=๐‘”(๐‘‹๐‘–โˆ’1), ๐‘‹๐‘–โˆ’1=๐‘“(๐‘€๐‘–โˆ’1+๐‘„โˆ—๐‘–โˆ’2).

The block chaining effect of this scheme allows the same plaintext block to be enciphered into different ciphertexts. Block chaining is a mechanism where each block of plaintext is XORed with the previous ciphertext block being encrypted. Similarly, the decryption of a block of ciphertext depend on all the preceding ciphertext block. From the encryption algorithm, the cryptanalysis would be difficult. The cryptanalyst cannot construct a combinatorially equivalent generator matrix of the code from the ciphertexts because the ciphertexts are not codewords. Hence, the cryptanalyst cannot correct errors systematically. The cipher also employs double randomization since the plaintext is XORed with ๐‘„โˆ—๐‘–โˆ’1 and the permuted codeword is XORed with ๐‘๐‘–. This also prevents construction of the generator matrix from the ciphertext.

For decryption, we assume that the receiver has to agree with the transmitter. This means that they have to agree on the initial ๐‘„0 and ๐‘‹0 vector (initialization vectors). For this section, we also assume that the decoding is done correctly in order to decrypt. The decoding process is outlined below.(i)The initialization vector is fed into the expansion function ๐‘” to produce error vector ๐‘๐‘–.(ii)The vector (๐‘๐‘–) is XORed with the ciphertext ๐ถ๐‘– to produce ๐‘„๐‘–. (iii)๐‘„๐‘– is multiplied by the transpose of the permutation matrix P to produce ๐‘๐‘–. (iv)๐‘๐‘– is decoded into ๐‘‹๐‘–. (v)The inverse of the nonlinear function ๐‘“โˆ’1 is applied to ๐‘‹๐‘– to produce ๐‘‘๐‘–. (vi)๐‘‘๐‘– is XORed with ๐‘„๐‘–โˆ’1 to obtain the plaintext ๐‘€๐‘–.

The decryption process is shown mathematically in (6), (7), (8), (9), (10), and (11). The block diagram representing the decryption process is shown in Figure 4.

To show the decryption process in a noiseless channel, let the received ciphertext be ๐ถ๐‘– (assuming no error due to the channel),๐ถ๐‘–๎€ท๐‘€=๐‘“๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ๐‘ƒ+๐‘๐‘–.(6) Applying the decryption process toโ€‰โ€‰(5) we get๐‘„๐‘–=๎€บ๐‘“๎€ท๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ๐‘ƒ+๐‘๐‘–๎€ป+๐‘๐‘–๎€ท๐‘€=๐‘“๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ๐‘ƒ.(7) Multiplying with the transpose of the permutation matrix, we have๐‘๐‘–=๎€บ๐‘“๎€ท๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๎€ป๐‘ƒ๐บ๐‘ƒ๐‘‡๎€ท๐‘€=๐‘“๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ.(8) Applying the decoding algorithm to ๐‘๐‘– depending on the code employed, then๐‘‹๐‘–๎€ท๐‘€=๐‘“๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ.(9) Applying the inverse of the nonlinear function ๐‘“โˆ’1, then๐‘‘๐‘–=๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1.(10) Adding the error vector ๐‘„โˆ—๐‘–โˆ’1 to ๐‘‘๐‘–, we get๐‘‘๐‘–+๐‘„โˆ—๐‘–โˆ’1=๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1+๐‘„โˆ—๐‘–โˆ’1=๐‘€๐‘–,(11) where ๐‘€๐‘– is the message block ๐‘–.

For the case of noisy channel with error vector ๐‘๐‘ due to the channel, we assume that ๐‘๐‘ is within the error correcting capability of the code. The received ciphertext with the channel error is๐ถ๐‘–=๐ถ๐‘–+๐‘๐‘.(12) From (12), we know that๐ถ๐‘–=๎€บ๐‘“๎€ท๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ๐‘ƒ+๐‘๐‘–๎€ป+๐‘๐‘.(13) Applying the decryption process (we use ๐‘„๎…ž๐‘– because of the effect of the channel error), we have๐‘„๎…ž๐‘–=๎€บ๐‘“๎€ท๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ๐‘ƒ+๐‘๐‘–๎€ป+๐‘๐‘+๐‘๐‘–๎€ท๐‘€=๐‘“๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ๐‘ƒ+๐‘๐‘.(14) Multiplying with the transpose of the permutation matrix, we get๐‘๐‘–=๎€บ๐‘“๎€ท๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ๐‘ƒ+๐‘๐‘๎€ป๐‘ƒ๐‘‡๎€ท๐‘€=๐‘“๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ๐บ+๐‘๐‘’๐‘ƒ๐‘‡.(15) Note that ๐‘ƒ๐‘‡ does not change the weight of ๐‘๐‘’. Let ๐‘Š๐ป represent the hamming weight, hence๐‘Š๐ป๎€ท๐‘๐‘’๎€ธ=๐‘Š๐ป๎€ท๐‘๐‘’๐‘ƒ๐‘‡๎€ธ.(16) Applying the decoding algorithm to ๐‘๐‘–, then๐‘‹๐‘–๎€ท๐‘€=๐‘“๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ธ.(17) Applying the inverse of the nonlinear function ๐‘“โˆ’1, then๐‘‘๐‘–=๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1.(18) Adding the error vector ๐‘„โˆ—๐‘–โˆ’1 to ๐‘‘๐‘–, we have๐‘‘๐‘–=๎€บ๐‘€๐‘–+๐‘„โˆ—๐‘–โˆ’1๎€ป+๐‘„โˆ—๐‘–โˆ’1=๐‘€๐‘–.(19)

From the above proof, the error-correction ability of the code is fully preserved for possible channel errors because error introduced intentionally at the sender can be removed because of synchronization of the initialization vector. Hence error due to the channel can be removed. In summary, the decryption process is shown in Figure 4 and expressed mathematically:๐ท๐ถ๎€ท๎€ท๐‘–+๐‘๐‘–๎€ธ๐‘ƒ๐‘‡๎€ธ๐‘“โˆ’1=๐‘€๐‘–,(20) where ๐‘๐‘– = g (๐‘‹๐‘–โˆ’1),๐ท๐ถ๎€ท๎€ท1+๐‘๐‘–๎€ธ๐‘ƒ๐‘‡๎€ธ=๐‘‹๐‘–,๐‘“โˆ’1๎€ท๐‘‹๐‘–๎€ธ+๐‘„๐‘–โˆ’1=๐‘€๐‘–.(21)

In this scheme, errors due to intruders tampering which cannot be removed by the error-correcting code will propagate to the later blocks due to the block-chaining technique. Hence, this scheme could be used as a checksum to detect illegal tampering or modification [13]. However, the transmitter will have to resend the data if the error-correcting code cannot correct the modification. Based on this features, ECBC does not only provide error detection and correction, but also data integrity.

4. Cryptanalysis

Cryptanalysis will be more difficult because the same plaintext block will be encrypted to different ciphertext. The cryptanalyst cannot construct an equivalent generator matrix combinatorially [7], since the ciphertexts are not codewords, as a result, errors cannot be corrected systematically. We analyze the security that this scheme provides in this section.

In a case where ๐‘‹๐‘– is fed forward and ๐‘„๐‘–โˆ’1 is not fed back, then the encryption process can be expressed as๐ถ๐‘–๎€ท๐‘€=๐‘“๐‘–๎€ธ๐บ๐‘ƒ+๐‘๐‘–๐‘1๎€ท=๐‘”IV2๎€ธ,๐ถ๐‘–+1๎€ท๐‘€=๐‘“๐‘–+1๎€ธ๎€ท๐‘“๎€ท๐‘€๐บ๐‘ƒ+๐‘”๐‘–,๐ถ๎€ธ๎€ธ๐‘–+2๎€ท๐‘€=๐‘“๐‘–+2๎€ธ๎€ท๐‘“๎€ท๐‘€๐บ๐‘ƒ+๐‘”๐‘–+1,๐ถ๎€ธ๎€ธ๐‘–+3๎€ท๐‘€=๐‘“๐‘–+3๎€ธ๎€ท๐‘“๎€ท๐‘€๐บ๐‘ƒ+๐‘”๐‘–+2,๐ถ๎€ธ๎€ธ๐‘–๎€ท๐‘€=๐‘“๐‘–๎€ธ๎€ท๐‘‹๐บ๐‘ƒ+๐‘”๐‘–โˆ’1๎€ธ.(22)

A chosen plaintext attack will break ๐บ๐‘ƒ if the expansion function ๐‘” is a linear function that has a left inverse based on the equations. To see this, let ๐‘€๐‘–=๐‘€๐‘–+1, and ๐‘€๐‘–+2 = ๐‘€๐‘–+3, then๐ถ๐‘–+1+๐ถ๐‘–+2๎€ท๐‘€=๐‘“๐‘–+1๎€ธ๎€ท๐‘€+๐‘“๐‘–+2๎€ธ๐ถ๐บ๐‘ƒ,๐‘–+2+๐ถ๐‘–+3๎€ท๐‘“๎€ท๐‘€=๐‘”๐‘–+1๎€ท๐‘“๎€ท๐‘€๎€ธ๎€ธ+๐‘”๐‘–+2.๎€ธ๎€ธ(23)

If ๐‘” is linear,๐‘”๎€ท๐‘“๎€ท๐‘€๐‘–+1๎€ท๐‘“๎€ท๐‘€๎€ธ๎€ธ+๐‘”๐‘–+2๎€ท๐‘“๎€ท๐‘€๎€ธ๎€ธ=๐‘”๐‘–+1๎€ท๐‘€๎€ธ๎€ธ+๐‘“๐‘–+2๎€ธ.(24)

From (24),๐‘“๎€ท๐‘€๐‘–+1๎€ธ๎€ท๐‘€+๐‘“๐‘–+2๎€ธ=๐‘”โˆ’1๎€ท๐ถ๐‘–+2+๐ถ๐‘–+3๎€ธ.(25)

๐บ๐‘ƒ can be derived if the cryptanalyst could obtain ๐‘˜ such distinct pairs. However, ๐บ๐‘ƒ is a permutated version of ๐บ which increases the work factor of deriving ๐บ. This is one of that features that differentiate previous schemes. Also, if ๐‘” is a secret nonlinear function, then this attack will not work at all and ECBC uses ๐‘” as a nonlinear function.

We analyze the case where ๐‘„๐‘– is fed back and ๐‘‹๐‘– is not fed forward. The encryption sequence is shown below:๐ถ1๎€ท๐‘€=๐‘“1+๐‘„0๎€ธ๐บ๐‘ƒ,๐‘„0=IV1,๐ถ2๎€ท๐‘€=๐‘“2+๐‘„1๎€ธ๐บ๐‘ƒ,where๐‘„1๎€ท๐‘€=๐‘“1+๐‘„0๎€ธ๐ถ๐บ๐‘ƒ,3๎€ท๐‘€=๐‘“3+๐‘„2๎€ธโ‹ฎ๐ถ๐บ๐‘ƒ,๐‘–๎€ท๐‘€=๐‘“๐‘–+๐‘„๐‘–โˆ’1๎€ธ๐บ๐‘ƒ,where๐‘„๐‘–โˆ’1๎€ท๐‘€=๐‘“๐‘–โˆ’1+๐‘„๐‘–โˆ’2๎€ธ๐บ๐‘ƒ.(26)

The cryptanalyst would have to search for equivalent ciphertexts where ๐ถ๐‘– = ๐ถ๐‘—, as a result, ๐‘“(๐‘€๐‘–+๐‘„๐‘–โˆ’1) = ๐‘“(๐‘€๐‘—+๐‘„๐‘—โˆ’1) which means that ๐‘„๐‘–=๐‘„๐‘—. If ๐‘“ is a linear transformation, then ๐ถ๐‘–+1+๐ถ๐‘—+1=๐‘“(๐‘€๐‘–+1)๐บ๐‘ƒ+๐‘“(๐‘€๐‘—+1)๐บ๐‘ƒ. As a result ๐‘“๐บ๐‘ƒ can be figured out by a known plaintext attack. However if ๐‘“ is a nonlinear transformation, the line of attack will not work. The cryptanalyst can collect ๐‘˜ linearly independent equivalent codewords to construct ๐บ๎…ž=๐‘“๐บ๐‘ƒ which is combinatorially equivalent to ๐บ. It will be computationally infeasible to estimate the matrix ๐บ if ๐‘˜ is large enough.

The ECBC scheme withstands chosen-plaintext attacks [14] because of the nonlinear function ๐‘“ that transforms the plaintext. As a result, the cryptanalyst cannot construct unit vectors from chosen plaintext to construct the ๐บ.

5. Architecture of Error Correction-Based Cipher

The architecture of the ECBC scheme for encryption is shown in Figure 5. The shift register contains received stream data. Each block of data is shifted into the ๐‘˜-bit buffer. The output of the buffer (message block) is randomized with the output of the multiplexer MuxA through an XOR gate. The inputs to the multiplexer is a random Initial Vector (IV) and a delayed version of the permutated encoded data. The control unit outputs the selector (selA) for the multiplexer as shown in Figure 5.

The output from the XOR gate is fed into the SBOX unit. The SBOX [12] represents the nonlinear function f. This is a function that computes the multiplicative inverse of each input byte of the state in GF(28) followed by affine transformation. It is a nonlinear byte substitution and it is composed of two transformations:(i)multiplicative inverse in GF(28): this is the mapping of x โ†’๐‘ฅโˆ’1, where ๐‘ฅโˆ’1 is the multiplicative inverse; (ii)affine transformation over GF(2): x โ†’๐ด๐‘ฅ+๐‘, where ๐ด and ๐‘ are constants.

We implement the S-box with a multiplexer and lookup tables. In our implementation, given an ๐‘›-bit input into the ๐‘“ function, ๐‘›/8 S-boxes are applied to the ๐‘›/8 bytes of data that make up the input. Each of the ๐‘›/8 bytes from the different S-boxes are substituted by the corresponding element in the S-boxes. Each of the byte output from each S-boxes are then concatenated together to form a vector. The & sign is used to represent the concatenation unit. The architecture of the SBOX is shown in Figure 6.

The concatenated output from the SBOX is encoded using the generator matrix (G) of Low Density Parity Check Code (LDPC). LDPC codes are linear block codes. They are codes that have received major attention in recent years because of their excellent performance and error correction capability. We used LDPC code because it has good diffusion property. It has good linearity relationship between code length and the minimum weight/code distance. The random LDPC code has higher security than QC LDPC codes [15]. An (๐‘›,๐‘˜) LDPC code has ๐‘˜ information bits and ๐‘› codeword bits with code rate ๐‘Ÿ=๐‘˜/๐‘›. The parity check matrix ๐ป has a dimension of (๐‘›โˆ’๐‘˜)ร—๐‘›. LDPC encoding is based on the property๐‘ข๐ป๐‘‡=0,(27) where ๐‘ข is the ๐‘›-bit codeword bits and ๐ป is the parity check matrix. The parity check matrix ๐ป can be expressed as๎€บ๐ป๐ป=1๐ป2๎€ป,(28) where ๐ป1's dimension is (๐‘›โˆ’๐‘˜)ร—(๐‘›โˆ’๐‘˜) and ๐ป2โ€™s is (๐‘›โˆ’๐‘˜)ร—๐‘˜. The information bit could be expressed as๎€บ๎€ป๐‘ข=๐‘๐‘ ,(29) where ๐‘  is the ๐‘˜-bit information bits and ๐‘ is the ๐‘›โˆ’๐‘˜ parity bits. Based on (27),๐ป1โ‹…๐‘+๐ป2โ‹…๐‘ =0,(30) since operation is in GF(2),๐‘=๐ป1โˆ’1๐ป2โ‹…๐‘ .(31)

The architecture of the LDPC encoder is shown in Figure 7. Each parity bit is obtained by matrix-vector multiplication of matrix ๐ป2 with the output of the SBOX unit. Since matrix-vector multiplication operation is carried out in GF(2), Each row of matrix ๐ป2 is ANDed with the vector output (๐‘ ) from the SBOX. The outputs from the (๐‘›โˆ’๐‘˜) AND gate are then XORed together to produce the parity bit. Multiplication by ๐ป1โˆ’1 is not necessary if the ๐ป matrix is systematic. The codeword is reconstructed by concatenating the parity with the ๐‘˜ร—1 SBOX output with the aid of Codeword Construction Unit.

The architecture of the permutation unit is shown in Figure 8. The unit permutates the codeword output from the encoder unit. We attempt to explain the permutation unit in Figure 8 in this section. Assuming we have a permutation matrix ๐‘ƒ shown as follows:โŽ›โŽœโŽœโŽโŽžโŽŸโŽŸโŽ ๐‘=010100001.(32)

The column numbers where 1s are located in the permutation matrix are stored instead of storing the 0s and the 1s. The row number (index) is used for referencing the column. For example, from Figure 8, for row 1 (index), 1 is located in column 2, in row 2, 1 is located in column 1, and row 3, 1 is located in column 3. The column numbers are used as selectors for the multiplexer which in turn determines the output of the permutation unit. Each of the multiplexer is an n to 1 multiplexer.

The control unit for the ECBC is modeled as a Finite State Machine (FSM) as shown in Figure 9. The control unit has six states: Initial, Fetch, random, substitute, encode, and permutation. The initial state is the first state after reset where zeros are written to all the registers. If start is asserted at the initial state, the present state becomes the fetch state. At the fetch state, a block of data is read into the buffer from the stream shift register. Control is transferred to the randomization state after the fetch state where the input block is randomized. The control unit also outputs the selector for MUXA at the random state. At the substitute state, control signal is sent to the concat (&) unit in order to concatenate all the output blocks coming from the SBOX. In the encode state, codeword is generated by the encoder. The next state is the perm state where the codeword from the encoder is permutated. After perm state, an encrypted data is produced and the present state becomes the fetch state where another block is fetched. The 5-staged pipelined architecture of the ECBC is shown in Figure 10. The figure includes the 5 pipeline registers. This architecture helps to increase the throughput of ECBC.

6. Implementation and Result

The ECBC scheme was implemented in software for the purpose of verification and randomization test. The nonlinear function ๐‘“ was implemented using S-box [12]. We used the generator matrix (๐บ) of Low-Density Parity Check (LDPC) code for error correction. We used LDPC code because it has good diffusion property. It has good linearity relationship between code length and the minimum weight/code distance. The random LDPC code has higher security than QC LDPC codes [15]. The permuted output of the ECBC is XORed with the output of a pseudorandom number. The key is the seed to a pseudorandom generator that generate a random sequence of bits that is XORed with permutated codeword. In our case, KISS99 was used as a generator. We heuristically tested the ECBC by testing for randomness in the output. The ECBC was used as a pseudorandom number generator in counter mode. The TestU01 [16] was used to test the randomness of the output of ECBC in counter mode. We tested for ๐‘ƒ-values within the boundary [10โˆ’4,1โˆ’10โˆ’4]. Any ๐‘ƒ-values lying outside this range is considered as failure, while the ones within the range is considered as pass. Table 1 lists the test suites, the number of tests in each suite, and the results. A total of 319 tests were carried out and the ECBC passed all of them. It is important to point out that because the scheme passes the test of randomization, it is not a guarantee that such a scheme is secure. However, it is important that a cryptographic schemeโ€™s output should be random.

We also plotted the graph of Bit Error Rate (BER) against Signal-to-Noise Ratio (SNR) in Figure 11 to see the effect of ECBC system on the performance. The green curve (๐‘ฅ) is for the case where ECBC is not used while the blue curve (๐‘œ) is for the case where ECBC is part of the communication system. The graph shows that the performance is the same in both cases.

We implemented the ECBC on Field Programmable Gate Array (FPGA) on Xilinx Spartan 3E xc3s1200e-4ft256 using ISE Foundation 11.2. The result of implementation is shown in Table 2. For the nonpipelined architecture, 23% of the slices were used and has a maximum frequency of 130.924โ€‰MHz. For the pipelined architecture, 26% of the slices were used and has a maximum frequency of 105โ€‰MHz. Even though maximum frequency reduced, the throughput for the pipelined architecture is 8โ€‰Gb/S. The non-ECBC method combines AES and LDPC as separate unit. These results show significant reduction in hardware usage.

7. Conclusion

In this paper we have presented a physical layer encryption scheme that is capable of providing data reliability, secrecy, and integrity. The scheme is able to provide error correction and security. We also presented the architecture and the implementation of the Joint scheme. The error correcting capability of the code is fully preserved because the error deliberately introduced at the sender end can be removed at receiver because of synchronization. In the joint scheme presented, there is no tradeoff between reliability and security because errors introduced at the transmitter are removed at the receiver. Hence ECBC can utilize its full capacity to correct channel errors. The scheme is also secure against some conventional attacks. The result of implementation is also presented. This joint scheme could easily be adapted to existing protocols such as in CC2420โ€”Single-Chip 2.4โ€‰GHz IEEE 802.15.4 Compliant and ZigBee Ready RF Transceiver where AES is already implemented.