1. Introduction

Cooperative communications, in which multiple nodes help each other transmit messages, has been widely acknowledged as an effective way to improve system performance [13]. However, due to the broadcast property of radio transmission, wireless communication is vulnerable to eavesdropping which consequently makes security schemes of great importance as a promising approach to communicate confidential messages.

The traditional secure communication schemes rely on encryption techniques where secret keys are used. However, as the high-layer secure protocols have attracted growing attacks in recent years, the implementation of security schemes at physical layer becomes a hotspot. It was first proved by Wyner that it is possible to communicate perfectly at a non-zero rate without a secret key if the eavesdropper has a worse channel than the destination [4]. This work was extended to Gaussian channels in [5] and to fading channels in [6]. Recently, there has been considerable work on secure communication in wireless relay networks (WRNs) [715]. A widely acknowledged measurement of system security in WRNs is the maximal rate of secret information exchange between source and destination which is defined as secrecy capacity. A decode-and-forward (DF)-based cooperative beamforming scheme which completely nulls out source signal at eavesdropper(s) was proposed in [7], and this work was extended to the amplify-and-forward (AF) protocol and cooperative jamming in [8]. Hybrid beamforming and jamming was investigated in [9] where one relay was selected to cooperate and the other to make intentional interference in a DF network. Combined relay selection and cooperative beamforming schemes for DF networks were proposed in [10] where two best relays were selected to cooperate. The authors of [11, 12] considered the scenario where the relay(s) could not be trusted in cooperative MIMO networks. Additionally, a new metric of system security is brought up in [13] as intercept probability and optimal relay selection schemes for AF and DF protocols based on the minimization of intercept probability were proposed.

In earlier works, it is widely assumed that the relays have access to instantaneous channel state information (CSI) of relay-eavesdropper (RE) channels [7, 8, 1315]. This assumption is ideal but unpractical in a real-life wiretap attack since the malicious eavesdropper would not be willing to share its instantaneous CSI. Thus, security schemes using instantaneous CSI of the eavesdropper cannot be adopted anymore. However, the instantaneous CSI of relay-destination (RD) channels is available since the destination is positive. The statistical information of the RE channels is also available through long-term supervision of the eavesdropper's transmission [9]. It is worth mentioning that even if the relays do not have access to the perfect CSI of RD channels, they can still estimate these channels by training sequences and perform beamforming based on the estimated CSI [16].

Our focus is on secrecy capacity, and we are interested in maximizing it with appropriate weight designs of relays. The remainder of this paper is organized as follows. Section 2 introduces system model under AF and DF protocols using relay beamforming. The optimization problem in an AF network is addressed and solved in Section 3 along with some analyses of secrecy capacity. Section 4 provides the optimal beamforming design for a DF network along with a surprising finding that considering the eavesdropper sometimes may not be necessary. Numerical results are given in Section 5 to compare the performances of different designs, and Section 6 provides some concluding remarks.

2. System model

Consider a cooperative wireless network consisting of a source node S, a legitimate destination D, an eavesdropper E, and M relays R i , i = 1,…, M as shown in Figure 1. Each node is equipped with single antenna working in half-duplex mode. Assume that there is no direct link between the source and the destination/eavesdropper, i.e., neither the destination nor the eavesdropper is in the coverage area of the source. For notational convenience, we denote the source-relay (SR) channels as f i , the RD channels as g i , and the RE channels as h i . All the channels are modeled as independent and identically distributed (i.i.d.) Rayleigh fading channels, i.e., f i ~ CN 0 , σ f i 2 , g i ~ CN 0 , σ g i 2 , and h i ~ CN 0 , σ h i 2 . Considering the path loss effect and setting the path loss exponent to 4 (for an urban environment), we have σ f i 2 = d SR i - 4 , σ g i 2 = d R i D - 4 , and σ h i 2 = d R i E - 4 , where dAB is the distance between nodes A and B. We assume the relays to know instantaneous CSI of SR channels and RD channels, but only statistical information of RE channels. Without loss of generality, we also assume the additive noises to be i.i.d. and follow a CN 0 , 1 distribution.

Figure 1
figure 1

A cooperative wireless network model in the presence of an eavesdropper.

2.1 Amplify-and-forward

In an AF protocol, the source broadcasts P s s in the first hop where the information symbol s is selected from a codebook and is normalized as E|s|2 = 1, and Ps is the transmit power. The received signal at R i is

r i = f i P s s + v i
(1)

where v i is the additive noise at R i .

In the second hop, each relay forwards a weighted version of the noisy signal it just received. More specifically, R i normalizes r i with a scaling factor ρ i = 1 / 1 + f i 2 P s and then transmits a weighted signal t i  = w i ρ i r i . The transmit power of R i is P i  = |w i |2. The received signal at the destination is

y D = i = M g i t i + v D = P s w T ρ fg s + w T diag ρ g v + v D
(2)

where w = (w1, …, w M )T, ρ fg  = (ρ1f1g1, …, ρ M f M g M )T, ρ g  = (ρ1g1, …, ρ M g M )T, v = (v1, …, v M )T, and vD represents additive white Gaussian noise (AWGN) at the destination. The total relay transmit power is wHw = P.

Meanwhile, the eavesdropper also gets a copy of s:

y E = i = 1 M h i t i + v E = P s w T ρ fh s + w T diag ρ h v + v E
(3)

where ρ fh  = (ρ1f1h1, …, ρ M f M h M )T, ρ h  = (ρ1h1, …, ρ M h M )T, and vE represents AWGN at the eavesdropper.

2.2 Decode-and-forward

In a DF protocol, the first hop is the same as in an AF protocol. While in the second hop, instead of simply amplifying the received signal, R i decodes the message s and multiplies it with a weighted factor w i to generate the transmit signal t i  = w i s. The transmit power of R i is still P i  = |w i |2. The received signals at the destination and the eavesdropper can be expressed, respectively, as

y D = i = 1 M g i t i + v D = w T g s + v D
(4)

and

y E = i = 1 M h i t i + v E = w T h s + v E
(5)

where g = (g1, …, g M )T and h = (h1, …, h M )T.

3. Distributed beamforming design for AF

In the following sections, we consider the security issue of the above relay network. The metric of interest is secrecy capacity which is defined as

C S = max C D - C E , 0
(6)

where C D = 1 2 log 2 1 + γ D , C E = 1 2 log 2 1 + γ E , and γD and γE are received signal-to-noise ratios (SNRs) at the destination and the eavesdropper, respectively. We aim to improve CS by exploiting appropriate beamforming designs. The following subsection describes the proposed beamforming design for an AF network.

3.1 Proposed design for AF (P-AF)

In distributed beamforming schemes, the relays compute the received SNRs at the destination and the eavesdropper from Equations 2 and 3, respectively, as

γ D = E s P s w T ρ fg s * P s w T ρ fg s E v , v D w T diag ρ g v + v D * w T diag ρ g v + v D = P s w H ρ fg ρ fg H w 1 + w H Γ g w
(7)

and

γ E = E s , h P s w T ρ fh s * P s w T ρ fh s E v , v E w T diag ρ h v + v E * w T diag ρ h v + v E = P s w H Γ fh w 1 + w H Γ h w
(8)

where Γ g  = diag(ρ12|g1|2, …, ρ M 2|g M |2), Γ fh = diag ρ 1 2 f 1 2 σ h 1 2 , , ρ M 2 f M 2 σ h M 2 , and Γ h = diag ρ 1 2 σ h 1 2 , , ρ M 2 σ h M 2 . Now we discuss how to design w to maximize CS, and the proposed solution is denoted by w p AF . It is obvious that maximizing CS is equivalent to maximizing 1 + γ D 1 + γ E . Hence, in what follows, the objective function will be 1 + γ D 1 + γ E .

Substituting Equations 7 and 8 into 1 + γ D 1 + γ E , we have

w p AF = arg max w H w = P 1 + P s w H ρ fg ρ fg H w 1 + w H Γ g w 1 + P s w H Γ fh w 1 + w H Γ h w = arg max w H w = P w H P s ρ fg ρ fg H + Γ g + P - 1 I w w H D h + P - 1 I w · w H Γ h + P - 1 I w w H Γ g + P - 1 I w
(9)

where D h = diag σ h 1 2 , , σ h M 2 . This is a product of two correlated Rayleigh quotients [17] which is generally difficult to maximize. However, it would be much easier to get a suboptimal solution if we approximate the objective function to a single Rayleigh quotient.

Rewrite the optimization problem as

w p AF = arg max w H w = P w H P s ρ fg ρ fg H + Γ g + P - 1 I w w H D h + P - 1 I w · w H Γ g + P - 1 I w w H Γ h + P - 1 I w .
(10)

Denote the matrices D h  + P- 1I, Γ g  + P- 1I, and Γ h  + P- 1I as A, B, and C, respectively. For simplicity, we also let a i , b i , and c i represent the i th diagonal entry of A, B, and C, respectively, and define p = (P1, …, P M )T.

Since P i  = |w i |2, the denominator can be rewritten as f p = i = 1 M a i P i · i = 1 M b i P i / i = 1 M c i P i . According to the Taylor series expansion f x = f x 0 + k f x 0 x k x k - x 0 , k + ο x - x 0 ,

f p f p 0 + i = 1 M f p 0 P i P i - P M
(11)

if we expand f(p) at p 0 = P M , , P M . Since

f p = a i P i + j = 1 , j i M a j P j b i P i + j = 1 , j i M b j P j c i P i + j = 1 , j i M c j P j = a i b i c i P i + K 1 + K 2 c i P i + j = 1 , j i M c j P j
(12)

where K 1 = a i c i j = 1 , j i M b j P j + b i c i j = 1 , j i M a j P j - a i b i c i 2 j = 1 , j i M c j P j and K 2 = j = 1 , j i M a j P j · j = 1 , j i M b j P j - K 1 j = 1 , j i M c j P j , we have f P i a i b i c i . Substituting this partial derivative into (11), we further have f p i = 1 M a i b i c i P i + K where K = P M tr A tr B tr C - tr AB C - 1 . It can be proved that K is negligible either with small P or large P if we make a commonly used assumption that the SR distances are about the same (see Appendix for details). Thus, we omit this part and rewrite f(p) approximately as

f p i = 1 M a i b i c i P i = w H AB C - 1 w
(13)

So the optimization problem in (9) can be approximated to

w p AF = arg max w H w = P w H P s ρ fg ρ fg H + Γ g + P - 1 I w w H AB C - 1 w
(14)

This is a single Rayleigh quotient problem. It has been reported in [17] that if U is Hermitian and V is positive definite Hermitian, for any non-zero column vector x, we have x H Ux x H Vx λ max V - 1 U where λmax(V-1U) is the largest eigenvalue of V-1U. The equality holds if x = c umax(V-1U) where c can be any non-zero constant and umax(V-1U) is the unit-norm eigenvector of V-1U corresponding to λmax(V-1U). As a result, the optimal solution to (14) is

w p AF = P u λ max Φ
(15)

where Φ = A- 1B- 1C(Psρ fg ρ fg H + Γ g  + P- 1I).

To show the agreement of the approximated denominator and the exact denominator, we calculated them numerically, and the results are shown in Figure 2. The channel information we used are listed in Table 1 where f = (f1, …, f M )T, g = (g1, …, g M )T, and σ h = σ h 1 2 , , σ h M 2 T . f and g are generated randomly.

Figure 2
figure 2

Comparison of the approximated denominator and the exact denominator.

Table 1 Channel coefficients used in Figure 2

For comparison purpose, we present two other beamforming designs. First, for the optimization of a product of two correlated Rayleigh quotient problems, a method was proposed recently in [8] to maximize the upper and lower bounds. Note that η min w H Γ h + P - 1 I w w H Γ g + P - 1 I w η max where η min = min i ρ i 2 σ h i 2 + P - 1 ρ i 2 g i 2 + P - 1 and η max = max i ρ i 2 σ h i 2 + P - 1 ρ i 2 g i 2 + P - 1 . 1 + γ D 1 + γ E is bounded as

η min w H P s ρ fg ρ fg H + Γ g + P - 1 I w w H D h + P - 1 I w 1 + γ D 1 + γ E η max w H P s ρ fg ρ fg H + Γ g + P - 1 I w w H D h + P - 1 I w .
(16)

As a result, the bounds maximization design for AF (B-AF) should be

w b AF = P u max D h + P - 1 I - 1 P s ρ fg ρ fg H + Γ g + P - 1 I .
(17)

We also address the traditional design for AF (T-AF) where the eavesdropper is ignored and the goal is to maximize CD. It can be easily proved that the optimal solution is w t AF = c AF Γ g + P - 1 I - 1 ρ fg where cAF is a constant chosen to satisfy w t AF H w t AF = P .

3.2 Discussion about secrecy capacity in AF networks

It is natural to conjecture that secrecy capacity would grow as the eavesdropper moved away or as the total relay transmit power increased. However, we find that this conjecture is not always right.

For simplicity, we assume the distances between relays are much smaller than those between the relays and the source, so the path losses of the SR channels are almost the same. The same assumption is also made to the destination/eavesdropper. Denote the SR, RD, and RE distances as dSR, dRD, and dRE, respectively, and the corresponding channel variances as σ f 2 , σ g 2 , and σ h 2 , respectively.

Proposition 1. If the destination is much nearer to the relays than the eavesdropper is in an AF network, C S does not always grow as the total relay transmit power increases, and a suboptimal value of the total relay transmit power is found as

P subopt = d RD 2 d RE 2 1 + d SR - 4 P s
(18)

Proof. Recall that 1 + γ D 1 + γ E w H P s ρ fg ρ fg H + Γ g + P - 1 I w w H AB C - 1 w . No matter how we design the beamforming vector w, w H P s ρ fg ρ fg H + Γ g + P - 1 I w w H AB C - 1 w is bounded as

λ min Φ w H P s ρ fg ρ fg H + Γ g + P - 1 I w w H AB C - 1 w λ max Φ .
(19)

Due to the difficulty of calculating the eigenvalues of Φ, we replace the non-diagonal elements in Φ with their mean value 0 and the i th diagonal element ρ i 2 σ h 2 P + 1 g i 2 P + 1 σ h 2 P + 1 ρ i 2 g i 2 P + 1 with λ P = ρ 2 σ h 2 P + 1 σ g 2 P + 1 σ h 2 P + 1 ρ 2 σ g 2 P + 1 where ρ 2 = 1 1 + σ f 2 P s . Thus, Φ becomes λ(P)I after replacement.

Define C S P = 1 2 log 2 λ P . Now we investigate the monotonicity of CS(P). The first-order derivatives of CS(P) and λ(P) can be computed, respectively, as

C S P = 1 2 ln 2 · λ P λ P
(20)

and

λ P = σ h 2 - σ g 2 1 - ρ 2 ρ 2 σ h 2 σ g 2 P 2 - 1 σ h 2 P + 1 2 ρ 2 σ g 2 P + 1 2 .
(21)

By setting C S P = 0 , we obtain the positive stationary point of CS(P) as described in (18).

If dRE > dRD ( σ h 2 < σ g 2 ), ∀P∈(0, Psubopt), we have C S P > 0 ; ∀P∈(Psubopt, + ), we have C S P < 0 . Hence, if the destination is much nearer than the eavesdropper is, CS(P) is an increasing function over (0, Psubopt) and a decreasing function over (Psubopt, + ), which means that CS(Psubopt) is the maximum of CS(P).

This monotonicity of CS and the accuracy of Psubopt under the case of dRE > dRD will be verified in the next section. It needs to be pointed out that the above analysis is not for any certain design, so the optimal value of P for a certain design would be different from but around Psubopt. It also needs to be pointed out that the replacement of the channel coefficients in Φ with their mean values may result in the loss of the security benefit that is supposed to be achieved by exploiting the perfect CSI of SR and RD channels. This loss does not affect the monotonicity of CS greatly under the case of dRE > dRD because the destination is much nearer and therefore much more advantageous in communication than the eavesdropper is. However, when dRE < dRD (or dRE = dRD), such replacement becomes inappropriate, since the instantaneous CSI of f i and g i improves the system security significantly.

We can further compute the second-order derivatives of CS(P) and λ(P), respectively, as

C S P = 1 2 ln 2 · λ P λ P - λ P 2 λ 2 P
(22)

and

λ P = 2 σ h 2 - σ g 2 1 - ρ 2 - ρ 4 σ h 4 σ g 4 P 3 + 3 ρ 2 σ h 2 σ g 2 P + σ h 2 + ρ 2 σ g 2 σ h 2 P + 1 3 ρ 2 σ g 2 P + 1 3 .
(23)

It can be observed from (22) that the positivity of C S P depends on the value of P. Thus, CS(P) is neither convex nor concave.

Remark 1. In an AF network, if the total relay transmit power is large, the AWGNs in the second hop are negligible compared to the forwarded versions of the AWGNs in the first hop. Thus, 1 + γ D 1 + γ E can be approximately written as

1 + γ D 1 + γ E w H P s ρ fg ρ fg H + Γ g w P · w H diag ρ 1 2 , , ρ M 2 w w H Γ g w .
(24)

This equation does not involve σ h 2 , which implies CS is a constant in this case wherever the eavesdropper is.

4. Distributed beamforming design for DF

This section focuses on the security-oriented beamforming design for DF protocol. Similar to the design for AF protocol, the mission is to find the optimal design under a total relay transmit power constraint to maximize secrecy capacity.

4.1 Proposed design for DF (P-DF)

From Equations 4 and 5, the received SNRs at the destination and the eavesdropper are obtained, respectively, as follows:

γ D = E s w T g s * w T g s E v D v D * v D = w H g g H w
(25)
γ E = E s , h w T h s * w T h s E v E v E * v E = w H D h w .
(26)

Let w p DF be the optimal solution of the proposed design, then

w p DF = arg max w H w = P 1 + w H g g H w 1 + w H D h w = arg max w H w = P w H I + P g g H w w H I + P D h w = P u max I + P D h - 1 I + P g g H .
(27)

For comparison purpose, we also address the traditional design for DF (T-DF) and denote the solution by w t DF . The optimization problem is formulated as w t DF = arg max w H w = P w H g g H w , and the optimal solution is obviously w t DF = c DF g where cDF is a constant chosen to satisfy the power constraint w t DF H w t DF = P .

4.2 Discussion about secrecy capacity in DF networks

It is a natural thought that no matter under what channel assumption, secrecy capacity achieved by security-oriented designs would be higher than that achieved by traditional designs. However, the fact is that these designs may have the same performance which means that sometimes we can just ignore the eavesdropper.

Remark 2. In a DF network, if the RE distances are about the same (which is widely assumed), it is unnecessary to consider the eavesdropper as the security-oriented design and the traditional design are indeed the same.

Noticing that in this scenario, we can write D h as σ h 2 I . Thus, one can rewrite (27) as w p DF = P u max I + P g g H 1 + P σ h 2 = P u max I + P g g H . Since

I + P g g H · u max P g g H = 1 + λ max P g g H · u max P g g H = λ max I + P g g H · u max P g g H ,
(28)

we have umax(I + P ggH) = umax(P ggH). Thus, w p DF = c DF g which is the same as w t DF .

5. Numerical results

In this section, we investigate the performance of the above beamforming designs numerically. The simulation environment follows the model of Section 2. We perform Monte Carlo experiments consisting of 10,000 independent trials to obtain the average results.

Assume the number of relays is M = 6, and the source transmit power is Ps = 10 dB. In order to show the influence of the RE distance in AF protocol, we fix the source at (0,0), the destination at (2,0), and the relays at (1,0) and move the eavesdropper from (1.25,0) to (5,0). We assume that the distances between relays are much smaller than SR/RD/RE distances. Therefore, the SR channels and RD channels follow a CN 0 , 1 distribution, and the RE distance dRE varies from 0.25 to 4.

Figure 3 shows the relationship between average secrecy capacity and total relay transmit power with the eavesdropper in different locations using P-AF design. We can see that if the eavesdropper is nearer to the relays than the destination is, the relays should use the maximal power to transmit. However, if the destination is much nearer, there is an optimal value of total relay transmit power which is about 12 dB under the case of dRE = 2, while the theoretical value in (18) is 4 1 + 10 11.23 dB which is not very accurate but close. The reason is that Psubopt satisfies d 1 2 log 2 λ P / dP = 0 while the optimal power for P-AF design should satisfy d 1 2 log 2 λ max Φ / dP = 0 . However, it is difficult to express λmax(Φ) in terms of the total relay transmit power and the channel coefficients, not to mention to solve the latter equation analytically. It can also be seen that as the total relay transmit power increases, the secrecy capacity tends to keep constant no matter where the eavesdropper is.

Figure 3
figure 3

Secrecy capacity versus total relay transmit power using P-AF design.

Figure 4 compares different AF beamforming designs. It can be seen that the B-AF design shows a slight advantage over the T-AF design only when the total relay transmit power is small in the dRE = 1/2 case, while our proposed design always performs the best.

Figure 4
figure 4

Secrecy capacity versus total relay transmit power using different AF designs.

The relationship between average secrecy capacity and total relay transmit power with the eavesdropper in different locations using P-DF design is demonstrated in Figure 5. We still assume the RE distances to be the same. Results show that the secrecy capacity of a DF network grows as the total relay transmit power increases or as the eavesdropper moves away.

Figure 5
figure 5

Secrecy capacity versus total relay transmit power using P-DF design.

To verify Remark 2, we now examine the P-DF design and T-DF design under different variance assumptions of the RE channels.

Case 1: σ h = 1 0 5 1 0.1 0.05 0.01 T

Case 2: σ h = 3 2 1 0.5 0.1 0.05 T

Case 3: σ h = 1.1 1.05 1 0.95 0.9 0.85 T

The average secrecy capacities of P-DF and T-DF designs under different RE channel assumptions are demonstrated in Figure 6. Our design outperforms the traditional design in case 1 and case 2. While in case 3, the two designs have the same performance. This indicates that the greater the RE channels differ from each other, the more superior the P-DF design is. If the RE distances are almost the same, the eavesdropper can be ignored.

Figure 6
figure 6

Secrecy capacity versus total relay transmit power under different DF designs.

6. Conclusions

In this paper, we focused on security-oriented distributed beamforming designs for relay networks in the presence of a passive eavesdropper. We provided two beamforming designs under a total relay transmit power constraint, one of which is for AF and the other is for DF. Each design is to maximize secrecy capacity by exploiting information of SR, RD, and RE channels. To derive the beamforming solution for AF requires approximating the optimization objective by using the Taylor series expansion, while the solution for DF is obtained much more easily. We also found that secrecy capacity does not always grow if the relays use more power to transmit or if the eavesdropper gets farther from the relays, and that taking the eavesdropper into consideration is not always necessary. Moreover, for AF, we derived a suboptimal value of the total relay transmit power if the destination is nearer than the eavesdropper is. Numerical results showed the efficiency of the proposed designs.

Appendix

Noticing that

K = 1 M i = 1 M σ h i 2 P + M i = 1 M ρ i 2 g i 2 P + M i = 1 M ρ i 2 σ h i 2 P + M - i = 1 M σ h i 2 P + 1 ρ i 2 g i 2 P + 1 ρ i 2 σ h i 2 P + 1 ,
(29)

we have K 1 M M 2 M - M = 0 with small P, and

K P M i = 1 M σ h i 2 i = 1 M ρ i 2 g i 2 i = 1 M ρ i 2 σ h i 2 - i = 1 M g i 2
(30)

with large P. If we make the assumption that the SR distances are all about the same, i.e., the σ f i 2 's are about the same (which is also assumed in [8]), and replace |f i |2 in the expression of ρ i 2 with its mean value σ f 2 , we have

i = 1 M σ h i 2 i = 1 M ρ i 2 g i 2 i = 1 M ρ i 2 σ h i 2 i = 1 M g i 2 .
(31)

Thus, K ≈ 0 with large P.