# Optimal Cooperative Relaying Schemes for Improving Wireless Physical Layer Security

## Abstract

^{1}

## 1Introduction

Privacy and security issues play an important role in wireless networks. Although security is typically addressed via cryptographic approaches, there have been several attempts at addressing security at the physical layer, following the pioneering work of [8]. Recently wireless physical (PHY) layer based security from a information-theoretic point of view has received considerable attention, e.g., [3]-[7]. The wiretap channel, first introduced and studied by Wyner [8], is the most basic physical layer model that captures the problem of communication security. Wyner showed that when an eavesdropper’s channel is a degraded version of the main channel, the source and destination can achieve a positive perfect information rate (*secrecy rate*). The maximal secrecy rate from the source to the destination is defined as the *secrecy capacity* and for the degraded wiretap channel is given as the difference between the rate at the legitimate receiver and the rate at the eavesdropper. The Gaussian wiretap channel, in which the outputs at the legitimate receiver and at the eavesdropper are corrupted by additive white Gaussian noise (AWGN), was studied in [9]. Along the same lines, the Gaussian MIMO wiretap channel was investigated and the secrecy capacity of the MIMO wiretap channel was established in terms of an optimization problem over all possible input covariance matrices [10], [13]. There have also been some recent works focusing on secrecy rates based on partial CSI or channel statistics [3]. In [15], the authors derived the ergodic secrecy capacity of Gaussian MIMO wiretap channel and showed that a circularly symmetric Gaussian input is optimal.

The secrecy rate is affected by channel conditions between the source and the destination and also channel conditions between the source and the eavesdroppers. A low cost approach to increase the achievable secrecy rate by exploiting/mitigating channel effects is node cooperation via relays [16]-[21]. A two-stage cooperative approach was recently proposed in [22], and their extended version [24]. In [24], the source first transmits locally to a set of trusted relays, and subsequently, the relays retransmit a weighted version of the signal that they heard (amplify-and-forward (AF)), or a weighted version of the decoded signal (decode-and-forward (DF)). Alternatively, the relays can transmit weighted noise to confound the eavesdropper while the source is transmitting (cooperative jamming (CJ)). In all cases, the objective is to select the weights so as to maximize the secrecy rate under total power constraints, or to minimize the total power under a secrecy rate constraint. The results in [22]-[24] contain sub-optimal weights for both a single eavesdropper and multiple eavesdroppers, due to the difficulty of solving the associated optimization problems. In particular, several criteria for sub-optimal weight design were proposed such as completely nulling out the message signal at all eavesdroppers for DF and AF, and completely nulling out the jamming signal at the destination for CJ. These sub-optimal weights may yield a reduction in the achievable secrecy rate or minimization of total power.

In this paper, we consider the same scenario and problem as in [22]-[24], but focus on obtaining the optimal solution for the DF and CJ schemes. Obtaining the solution for the AF scheme is a more difficult problem and will be addressed in future work. Exploiting certain properties of the objective functions and the constraints, enables us to either obtain closed form solutions, or, if a closed form solution is not possible, propose algorithms to search for the solution.

The remainder of this paper is organized as follows. The mathematical model is introduced in § ?. In § ? we derive the optimal relay weights that maximize the achievable secrecy rate subject to a total power constraint in the presence of a single eavesdropper for the DF and CJ protocols, and multiple eavesdroppers for DF protocol. In §Section 4 we study the optimal weights that minimize the total power under a secrecy rate constraint for the DF and CJ protocols. Numerical results in § ? are presented to illustrate the proposed solutions. Finally, § ? provides some concluding remarks.

### 1.1Discussion of related work

Our work falls under the general scenario where the source-destination communication is aided by a relay or a helper. Relevant results include the work of [16], where multiple users communicate with a common receiver in the presence of an eavesdropper, and the transmit power allocation policy is determined that maximizes the secrecy sum-rate. In [17], a source, destination, eavesdropper and relay model is considered, in which the relay transmits a noise signal in order to jam the eavesdropper. The rate-equivocation region is derived to show gains and applicable scenarios for cooperation, with the equivocation denoting the uncertainty of the eavesdropper about the source message.

A generalization of [16] and [17] was proposed in [18], in which the helper transmits signals from another source encoder. In [19], inner and outer bounds on the rate-equivocation region were derived for the four-node model for both discrete memoryless and Gaussian channels. In [21], the secrecy rate of orthogonal relay and eavesdropper channels was studied.

Our work in this paper is different from the aforementioned works in the sense that we address the more general case of multiple relays and multiple eavesdroppers. Also, existing works primarily focus on rate-achieving relaying strategies. In our work, we consider pre-defined cooperative schemes without claiming that those schemes are optimal, and determine relay weight and power allocation design that optimize the achievable secrecy rate subject to a power constraint, or minimize the transmit power subject to a secrecy rate constraint.

### 1.2Notation

Upper case and lower case bold symbols denote matrices and vectors, respectively. Superscripts , and denote respectively conjugate, transposition and conjugate transposition. denotes the trace of matrix . means that is a Hermitian positive semi-definite matrix. denotes the rank of matrix . denotes Euclidean norm of vector . denotes the identity matrix of order (the subscript is dropped when the dimension is obvious). and denote first- and second- order derivatives of , respectively.

## 2System Model and Problem Statement

We consider a wireless network model depicted in Figure 1, consisting of one source node , a set of relay nodes , a destination node , and a set of passive eavesdroppers . The symbols used in the paper are listed in Table 1.

number of relays | |

number of eavesdroppers | |

total power (source power plus the relays’ power) | |

transmit power at the source | |

noise variance | |

baseband complex channel gain between the source and the destination | |

baseband complex channel gain between the th relay and the destination | |

baseband complex channel gain between the source and the th relay | |

baseband complex channel gain between the source and the th eavesdropper | |

baseband complex channel gain between the th relay and the th eavesdropper | |

weight vector at the relays, | |

Notes: |
The index is dropped when . |

The source message is uniformly distributed over the message set , which is transmitted in channel uses. Here, denotes the source rate (unit: bits per channel use) and the message has entropy bits. A stochastic encoder at the source maps each message to a codeword from an alphabet of length-. For the purpose of evaluating the achievable secrecy rate, we assume that the codewords used at the source are Gaussian. We consider a time division multiple access system, in which there are time units in each transmission slot. In a time unit, the average power of an encoded source symbol is normalized to unity. The noise at any node is assumed to be zero-mean white complex Gaussian with variance . Each node is equipped with a single omni-directional antenna and operates in a half-duplex mode.

All channels are assumed to be flat fading. We assume that global channel state information (CSI) is available, including the eavesdroppers’ channels. This corresponds to the cases where the eavesdroppers are active in the network and their transmissions can be monitored [25]. We should note that there have been some recent works focusing on secrecy rates based on partial CSI or channel statistics (e.g., chapter 5 in [7], and [4]). Adapting the proposed work to cooperative schemes that uses partial CSI or channel statistics will be considered in future work.

Similarly as in [20], [24], we assume that the source encoding scheme, the decoding methods at destination and eavesdroppers, and the cooperative protocol, are all public information.

Let us fix the relay weight vector and the source transmission power . Then the following expressions give the rates with the destination and the eavesdroppers as a function of , , the noise , and the various channel gains. For the *DF-based protocol*, the rate at the destination and the th eavesdropper are, respectively

where the scalar factor is due to the fact that two time units are required in two stages. Here we have assumed an additional constraint, i.e., where is the minimum source power requirement for cooperative nodes to correctly decode the source message with high probability. We assume is known a priori. For the *CJ-based protocol*, the rate at the destination and the th eavesdropper are, respectively

For both the DF and CJ protocols, the achievable secrecy rate in the presence of eavesdroppers is given by [26]

In particular, when , i.e., a single eavesdropper, the secrecy rate in (Equation 3) becomes [13]

We consider the practical case in which the system can be designed so that the secrecy rate is positive. In that case, the achievable secrecy rate can be rewritten as

Achievability of the above rates can be shown based on existing results for MIMO wire-tap channels, such as [11], [14], [12], for one eavesdropper, and [26] for multiple eavesdroppers.

The CJ scheme can be viewed as a SIMO system, so that MIMO results are directly applicable. As discussed in [24], for the DF scheme, MIMO results are applicable if we assume that the received signal at destination/eavesdropper at time depends only on the relays’ transmitted encoded signals at time (though a relay’s transmitted signal at time depends on its received signal before time ). This is usually referred to as the “memoryless relay channel” [17], [19]. For convenience, as in [24] we focus on case in which the relays use the same codewords as the source to re-encode the signal before transmission; in that case the rates of source-destination and source-eavesdropper links admit simple closed-form expressions [24].

The problems addressed in this paper are described as follows.

The solution of Problem 1 for one eavesdropper is provided in Section ?, and for multiple eavesdroppers in Section ?.

The solution of Problem 2 for one eavesdropper is provided in Section ?.

The solution of Problem 3 is provided in Section ?.

The solution of Problem 4 is provided in Section ?.

Before proceeding, we provide Lemma ? and ?, which will be the basis of the results to follow. Please see Appendix Section 7 and Section 8 for details.

## 3Secrecy Rate Maximization under Power Constraint

In this section, we address Problems ? and ?.

### 3.1One Eavesdropper ()

In this subsection we address Problem ? for the case of a single eavesdropper. Since we drop the superscript from .

#### DF-based protocol

Problem ? can be recast as

Denote , and . Let be the argument of . The solution of Problem ? is given in the following theorem. The proof is given in Appendix Section 9.

*Remarks:* In particular, Theorem ? states that, depending on the relative values of and , the optimal solution is either i) the source uses minimum power and the relay weights are a linear combination of the normalized relay and eavesdropper channel vectors, or ii) the source uses all the power and the relays are unused.

#### CJ-based protocol

Problem ? is recast as

By denoting , , , the problem of (Equation 6) can be rewritten as

Let be a feasible point. Denote , . For fixed , a larger results in a larger objective value. With this and from Lemma ?, we know that the optimal equals where , . With these, we can rewrite the optimization of (Equation 7) as

where , , and .

The problem of (Equation 8) makes sense when the maximum is greater than zero, i.e., when positive secrecy rate is achieved. The conditions under which positive secrecy rate is achieved are given in the following lemma. The proof is given in Appendix Section 10.

*Remarks*: The second condition means that if the source-destination channel is weaker than source-eavesdropper channel, direct transmission can not achieve positive secrecy rate, at that time, relays should be used and the total power (source plus relay) should be greater than a threshold.

In the following analysis, we assume the conditions in Lemma ? hold. Denote the objective in (Equation 8) as . It is easy to show that . Thus, is not the optimal point. Before proceeding, we give a suboptimal solution which turns out to be the suboptimal solution proposed in [24] which is a special case corresponding to (please see Appendix Section 11 for details).

Now we proceed. The methodology to solve the problem of (Equation 8) is: 1) fix , find the optimal ; 2) fix , find the optimal . Based on this, we propose an algorithm to search for the optimal and as follows.

The algorithm ? is not complete without providing the methods to find the optimal for fixed and the optimal for fixed . Next, we provide such methods. , we consider the problem: find the optimal for fixed . This corresponds to an optimization problem of a single variable , and the maximum is achieved at either , , or the points with zero derivative. Setting the derivative of the objective to zero leads to the following quadratic equation

where , , , , , and . We can obtain explicitly as a function of . , we consider the problem: when is fixed, find the optimal . This corresponds to an optimization problem of a single variable , and the maximum is achieved at one of the following points: , and the points with zero derivative. The problem to solve can now be rewritten as

where , , and . The derivative of given by

It is easy to verify that , . Thus, the optimal must be the points with zero derivative. Note that holds only when , which determines an interval . Here and can be expressed in closed form from the fact: if has real roots over , then its roots can be expressed as where . With these, we can restrict our attention to the root of (Equation 11) over .

To proceed, we need the following result. The proof is given in Appendix Section 12.

According to Property ?, we know that the equation (Equation 11) has a unique root such that when , and when , . This property ensures that the Newton method would be very effective in searching for and would enjoy quadratic convergence.

### 3.2Multiple Eavesdroppers

We now turn to the case of multiple eavesdroppers (). We restrict our attention to the DF protocol. The CJ protocol case with multiple eavesdroppers is a more difficult problem and will be addressed in future work.

Problem ? now becomes

where , is defined as in the case of a single eavesdropper. By letting , we can rewrite the above problem as

Before proceeding, we give a suboptimal solution which turns out to be the suboptimal solution in [24]. In [24], if , a suboptimal solution is obtained when an additional constraint is added: where . This additional constraint means nulling the energy to the eavesdroppers, and this requires so that we have enough degrees of freedom to ensure this is possible. The proof is given in Appendix Section 13.

Now we proceed. The methodology to solve the problem of (Equation 13) is: 1) fix , find the optimal ; 2) fix , find the optimal . Based on this, we propose an algorithm to search for the optimal and as follows.

*Remarks*: We will see later that: for , the procedure always converges to the optimal and , while for the procedure does not necessarily converge to the optimal solution. We will discuss this in the sequel.

The algorithm ? is not complete without providing the methods to find the optimal for fixed and find the optimal for fixed . Next, we provide such methods.

, we consider the problem: find the optimal for fixed . We need to solve

Note that denotes a polygonal line whose vertices are located at the points , , , . An example is plotted in Figure 2. Note that the objective in (Equation 14) is a linear fractional function and hence quasi-linear [27] in each line segment , . Thus, the optimal is one of the vertices of the polygonal, i.e., , . It is easy to find .

, we consider the problem: find the optimal for fixed . We need to solve

We can show that the problem of (Equation 15) is equivalent to

where

Let the solution of (Equation 16) be . Then, the solution of (Equation 15) is given by . The proof is given in Appendix Section 14.

The problem of (Equation 16) belongs to the quadratic constrained quadratic programs (QCQP) which is in general difficult [30], [31]. Denote which enables us to rewrite it as

Dropping the constraint , the semi-definite relaxation (SDR) of the problem of (Equation 17) is given by

This is a semi-definite program (SDP) and can be effectively solved by CVX [32].

If the problems of (Equation 16) and (Equation 18) achieve the same objective value, we say the SDR of (Equation 18) is tight (its solution does not necessarily have rank one). Obviously, if the solution of (Equation 18) has rank one, the SDR (Equation 18) is tight and the optimal solution of the problem of (Equation 16) can be obtained by simply eigen-decomposing . If does not have rank one, the problem for the solution of (Equation 16) is in general difficult [30], [31]. But for the special case , the problem can be solved in polynomial time [30], [31]. We state it as the following theorem.

For , if does not have rank one, we use Gaussian randomization procedure (GRP) to obtain an approximate solution based on the SDR solution [28]. In detail, we calculate the eigen-decomposition of and generate for , where is a vector of zero-mean, unit-variance complex circularly symmetric uncorrelated Gaussian random variables, is chosen such that (i.e., the constraint of (Equation 16) holds). Suppose

Then select as an approximation solution.

## 4Transmit Power Minimization under Secrecy Rate Constraint

In this section, we address Problems ? and ?.

### 4.1DF-based protocol

Problem ? is to solve

We provide a closed form solution to this problem which reveals that the optimal weight vector is a linear combination of and . We give the main result of the problem as a theorem. The proof is given in Appendix Section 15.

Before ending of this subsection, we should point out that the results in [22]-[24] address only the case , thus our analysis here is more complete. Further, our analysis reveals that has only two nonzero eigenvalues (one positive, and one negative) and, unlike [22]-[24], provides simple expression for them.

### 4.2CJ-based protocol

Problem ? is to solve

By denoting , , , , the problem of (Equation 20) can be rewritten as

Let be a feasible point, and , . For fixed and , a larger results in a smaller . With this and from Lemma ?, we know that the optimal equals where , . With this in mind, we can rewrite (Equation 20) as

where , , and . Further, we can rewrite the problem of (Equation 22) as

Before proceeding, we give a suboptimal solution which is turns out to be the same as the the suboptimal solution of [24]. Please see Appendix Section 16 for details.

Now we proceed. The methodology to solve the problem of (Equation 23) is: 1) fix , find the optimal ; 2) fix , find the optimal . Based on this, we propose an algorithm to search for the optimal and as follows.

The algorithm ? is not complete without providing the methods to find the optimal for fixed and find the optimal for fixed . Next, we provide such methods.

, we consider the problem: find the optimal for fixed . This corresponds to an optimization problem of a single variable , and the maximum is achieved at one of the following points: and the points with zero derivative. With this, we obtain

where . We can obtain explicitly as a function of (in this sense, we in fact reduce the original problem to a single variable optimization explicitly).

, we consider the problem: when is fixed, find the optimal . Let us denote the left side of the first constraint in (Equation 22) by , namely

We know that the optimal must maximize which results in the minimal (see (Equation 22)). The derivative of given by

It is easy to verify that , . Thus, is not the optimal point, and the optimal must be the points with zero derivative. Note that (i.e., ) holds only when which determines an interval . Here and can be expressed in closed form from the fact: if has real roots over , then its roots can be expressed as where . With these, we can restrict our attention to the root of (Equation 26) over .

To proceed, we need the following result. The proof is given in Appendix Section 17.

According to Property ?, we know that the equation (Equation 26) has a unique root such that when , and when , . This property ensures that the Newton method would be very effective in searching for and would enjoy quadratic convergence.

## 5Numerical Simulations

In this section we provide some numerical simulations to illustrate the proposed solutions. We use the same system configuration as that in [24], where source, relays, destination and eavesdroppers are placed along a line. Channels between any two nodes are modeled as a line-of-sight (LOS) channel , where is the distance between two nodes, is a constant, is the path loss exponent, and is the phase uniformly distributed within . In our simulations we set and . We assume the distances between relays are much smaller than the distances between relays and source/desination, such that the path loss between different relays and source/destination can be taken as approximately the same. Similarly, the path loss between different eavesdroppers and source/destination/relay are approximately the same as well. The results are obtained using Monte-Carlo simulations consisting of independent trials.

First, we vary the position of the destination so that the source-destination distance changes from to , as shown in the upper row of Figure 3. The source-relay distances are fixed at , the number of relays is , the source-eavesdropper distances are fixed at , the power constraint is fixed at , the secrecy rate constraint is fixed at . The secrecy rate for a single eavesdropper and multiple eavesdroppers is depicted in Figs. Figure 4 and Figure 5, respectively. From these two figures, one can see that when the destination moves past the eavesdropper direct transmission cannot sustain positive secrecy rate. On the other hand, both DF and CJ maintain positive secrecy rate even when the destination is further away from the source than the eavesdropper. The fact that there is a cooperation advantage even when the destination is at the same location as the eavesdropper is because of the phases differences of the corresponding channels. Although the propagation environment would be the same for both destination and eavesdropper in that case, the phases will be different due to different receiver phase offsets. The DF scheme yields the higher secrecy rate, while the optimal and suboptimal CJ schemes produce the same average rate.

Similar observations can be drawn from Figure 5 for the case of multiple eavesdropper as far as the advantage of cooperation over direct transmission is concerned.

In Figure 6, the secrecy rate for a fixed configuration and variable number of eavesdroppers is shown. It can be seen from Figure 6 that, when the number of eavesdroppers increases, the suboptimal solution for DF in Lemma ? becomes inferior as compared to the optimal solution. The minimal transmit power is depicted in Figure 7. For comparison purposes, the suboptimal solution for CJ in Lemma ? and the direct transmission result are also shown on the same figure.

Second, in Figure 8, we show the performance when the eavesdroppers’ positions change while the source-destination distance is fixed at and the source-relay distances are fixed at . When the source-eavesdropper distance changes from to as shown in the lower row of Figure 3, the minimum transmit power for CJ first increases a little, and then decreases, while the minimum transmit power for DF always decreases. The results show that cooperation can significantly improve the system performance as compared to direct transmission. In particular, when the source-eavesdropper distance is smaller than m, using direct transmission there is no level of transmit power than can meet the secrecy rate constraint. Also, for source-eavesdropper distance greater than m direct transmission and the CJ scheme are equivalent in terms of the minimum required transmit power. The DF approach requires significantly smaller power to meet the secrecy rate constraint. It is interesting to note that in the average sense, the suboptimal solution for CJ in Lemma ? and Lemma ? is a very good approximation of the optimal solution.

## 6Conclusion

We have given explicit constructions for the optimal relay weights and source transmission power for maximizing the secrecy rate or minimizing the total transmit power (source transmission power plus relay power) under secrecy rate constraint using the DF and CJ protocols in the presence of a single eavesdropper or multiple eavesdroppers. We present numerical results to compare the secrecy rate under our optimal solutions with the secrecy rate under the sub-optimal solutions in [22]-[24]. Numerical results illustrate that cooperation can significantly improve the system performance as compared to direct transmission.

## 7Proof of Lemma

Let be the eigenvalue of associated with the eigenvector . Thus we have which leads to . Thus, has the form of a linear combination of and . With this, we let where and will be determined as follows. Since has unit norm, we have

On the other hand, by inserting into , we get

Since and are linearly uncorrelated, we have

which leads to

From Cauchy inequality, we get . Thus, The equation (Equation 27) has a positive root and a negative root. As a result, we obtain and the corresponding and .

## 8Proof of Lemma

The solution of ( ?) is a linear combination of and , which follows from its optimality condition or further where and are Lagrange multipliers. Note that is also solution of ( ?), where is the argument of . Consequently, we can restrict . Inserting into the constraints and objective, results in

From ( ?), we need to minimize . From (Equation 28) and ( ?), we get which leads to . By denoting where is the argument of , we can rewrite (Equation 28) as

It is not difficult to show that the optimal given by

and the optimal is given by

With these, we obtain the optimal . Further, from ( ?), we obtain