## Beamforming for Secure Communication via Untrusted Relay Nodes Using Artificial Noise

Siddhartha Sarma

## Abstract

A two-phase beamforming solution for secure communication using untrusted relay nodes is presented. To thwart eavesdropping attempts of relay nodes, we deliberately introduce artificial noise in the source message. After pointing out the incongruity in evaluating secrecy rate in our model for certain scenarios, we provide an SNR based frame work for secure communication. We intend to bring down the SNR at each of the untrusted relay nodes below a certain predefined threshold, whereas, using beamforming we want to boost the SNR at the destination. With this motive optimal scaling vector is evaluated for beamforming phase which not only nullifies the artificial noise transmitted initially, but also maximizes the SNR at the destination. We discuss both the total and individual power constraint scenarios and provide analytical solution for both of them.

## I. INTRODUCTION

Recently omnipresence of wireless devices prompted the researchers and engineers to delve into the security issues of wireless communication. As compared to wired medium, ensuring security for wireless medium is more challenging mainly due to the broadcast nature of the transmission. But the ongoing research on physical layer security promises robust and reliable security schemes for wireless communication. Contrary to conventional cryptographic schemes physical layer security techniques are impregnable as the security is ensured by inherent randomness present in the wireless medium.

Physical layer security came to existence through the seminal work of Wyner [1], where he explored the possibility of secure communication without relying on private keys. Later Leung

S. Sarma is with the Department of Electronic Systems Engineering, Indian Institute of Science, Bangalore, Karnataka 560012, India (e-mail: { siddharth } @dese.iisc.ernet.in).

and Hellman [2] extended this idea to Gaussian channels. Following their works, in last decade several researchers have devised techniques for secure communication in single-hop single and multi-antenna systems. Recently a considerable amount of research is ongoing to extend those schemes to multi-hop network scenarios. In fact, several works have demonstrated that cooperative relaying [3, 4] can significantly improve the performance of secure communication. One such cooperative scheme is beamforming, where multiple transmitters adjust their gain and phase to improve the signal strength at the destination. Though beamforming was initially developed for multi-antenna systems, but due to energy and hardware constraints distributed beamforming solution using multiple single antenna node is proposed [3, 4]. In those papers authors have assumed that relay nodes are trustworthy and they beamform towards the destination to defeat (an) external eavesdropper(s). But due to the unprotected nature of public ad hoc network ( e.g. sensor network), an adversary can wiretap those relay nodes to obtain the information transmitted by source. This prompted us to look for a solution of one of the worst adversarial scenarios of secure communication, where one have to maintain the secrecy of data from the participating relay nodes. Secure transmission using untrusted relay nodes has appeared before in [5-8], where secure communication is obtained by simultaneously transmitting two or more signals. But multiple simultaneous transmission in the above mentioned papers were possible due to mutiple sources and/or multiple jammers. In absence of mutiple sources or jammers source has to rely on artificial noise [9]. Authors in [10] considered artificial noise based beamforming solution for AF relay network, but unlike them we have untrusted relay nodes and artificial noise is introduced by the source itself.

In our work we have considered multiple amplify-and-forward (AF) untrusted relay nodes, who help the source to deliver the message at destination, but at the same time can eavesdrop the ongoing transmission. To prevent eavesdropping the source adds artificial noise in the message and broadcast it in first phase. In second phase source and relay nodes beamform to deliver the signal at the destination. Though secrecy rate is the conventional metric to evaluate the performance of such system, but for our model in certain scenarios maximizing secrecy rate results in removal of artificial noise. Therefore, we consider a pragmatic approach based on SNR criteria, where we intend keep the SNR at the untrusted relay nodes below certain predefined threshold. Assuming perfect channel state information (CSI), we evaluate the optimal scaling factor for all the transmitting nodes which not only nullifies the artificial noise but also maximizes

Fig. 1. Simple two hop network with multiple relays

![image](https://ac.marcodsn.me/arxiv-markdown-images/1408.0339v1-figure-972fdd5e-ca4d-4b5a-a489-83afe915066e.jpg)

the SNR at the destination. We consider both the total and individual power constraints scenario for all transmitting nodes and provide analytical approach for optimal solutions.

## II. SYSTEM MODEL &amp; PROBLEM FORMULATION

We consider a two-hop network shown in Figure 1 containing multiple relay nodes ( M = { 1 2 , , . . . , M } ) aiding the transmission from source node S to destination D . Adversary is using the relay nodes to passively eavesdrop the on going transmission. To prevent such eavesdropping source transmits artificial noise along with the actual signal to confuse the adversary. In next phase source along with the relay nodes performs beamforming to deliver the message to the destination. We are interested in maximizing the information rate which can be transmitted from the source to the destination securely.

In first phase source transmits a linear combination of two messages √ αP x 1 + √ (1 -α P u ) 1 using power P 1 , where α ∈ [0 , 1] , x is the Gaussian distributed message with zero mean and unit variance and u is statistically independent Gaussian distributed artificial noise with identical distribution as x . The message received at relay and the destination can be written as:

$$y _ { i } = h _ { s i } ( \sqrt { \alpha P _ { 1 } } x + \sqrt { ( 1 - \alpha ) P _ { 1 } } u ) + z _ { i }, \, i \in \mathcal { M } \bigcup \{ D \}$$

where z i are complex Gaussian noise distributed according to CN (0 , σ 2 ) . In second phase relay nodes along with the source performs beamforming at destination to nullify the artificial noise. In amplify-and-forward (AF) relaying scheme nodes transmit the received noisy message after scaling it by appropriate factor, w i ∈ C . Source simultaneously transmits √ αP w x 1 0 -

√ (1 -α P ) 1 M ∑ i =1 w h i si h id h sd u . Therefore, the received message at destination can be written as:

$$y _ { d } = \sqrt { \alpha P _ { 1 } } ( w _ { 0 } h _ { s d } + \sum _ { i = 1 } ^ { M } w _ { i } h _ { s i } h _ { i d } ) x + \sum _ { i = 1 } ^ { M } h _ { i d } w _ { i } z _ { i } + z _ { d }$$

Assuming Maximum Ratio Combining (MRC) [3], capacity of the source to destination channel can be written as:

$$C _ { d } = \frac { 1 } { 2 } \log \left ( 1 + \frac { | h _ { s d } | ^ { 2 } \alpha P _ { 1 } } { \sigma ^ { 2 } + | h _ { s d } | ^ { 2 } ( 1 - \alpha ) P _ { 1 } } + \frac { | \mathbf h ^ { \dagger } \mathbf w | ^ { 2 } \alpha P _ { 1 } } { \sigma ^ { 2 } ( 1 + \mathbf w ^ { \dagger } \mathbf D _ { \mathbf h } \mathbf w ) } \right )$$

where w = [ w , w , 0 1 · · · , w M ] † , h = [ h sd , h s 1 h 1 d , · · · , h sM

h Md ] † , and D h is ( M +1) × ( M +1) matrix with diagonal elements [0 , | h 1 d | 2 , | h 2 d | 2 , · · · , | h Md | 2 ] .

As the relays can receive only during the first phase, so the capacity of the source to relay channel is:

$$C _ { i } = \frac { 1 } { 2 } \log \left ( 1 + \frac { | h _ { s i } | ^ { 2 } \alpha P _ { 1 } } { \sigma ^ { 2 } + | h _ { s i } | ^ { 2 } ( 1 - \alpha ) P _ { 1 } } \right )$$

The total power consumed during the second phase can be calculated in following manner:

$$\alpha P _ { 1 } | w _ { 0 } | ^ { 2 } + ( 1 - \alpha ) P _ { 1 } \left | \sum _ { i = 1 } ^ { M } \frac { h _ { s i } h _ { i d } } { h _ { s d } } w _ { i } \right | ^ { 2 } + \sum _ { i = 1 } ^ { M } ( | h _ { s, i } | ^ { 2 } P _ { 1 } + \sigma ^ { 2 } ) | w _ { i } | ^ { 2 } = \mathbf w ^ { \dagger } \mathbf D \mathbf w$$

where D =   αP 1 0 t 0 (1 -α P ) 1 gg † + T   , g is M length vector with i th element g i = h si h id h sd and

T is a diagonal matrix with diagonal elements [ | h s, 1 | 2 P 1 + σ , 2 · · · , | h s,M | 2 P 1 + σ 2 ] . Therefore, the total power constraint can be expressed as

$$\text{w} ^ { \dagger } D \text{w} \leq P _ { t o t }$$

For several scenarios individual constraint is more relevant than total constraint. Those constraints can be written as:

$$\mathbf w ^ { \dagger } \mathbf D _ { s } \mathbf w \leq P _ { s }$$

$$| w _ { i } | ^ { 2 } \leq \frac { P _ { i } } { | h _ { s i } | ^ { 2 } P _ { 1 } + \sigma ^ { 2 } }, \, \forall i \in \{ 1, 2, \cdots, M \}$$

$$\text{where} \, D _ { s } = \begin{bmatrix} \alpha P _ { 1 } & 0 ^ { t } \\ 0 & ( 1 - \alpha ) P _ { 1 } \text{gg} ^ { \dagger } \end{bmatrix}. \text{Now for a given total or individual power budget maximum}$$

achievable secrecy rate can be formulated as following optimization problem:

$$\max \, \min _ { i } R _ { s i } ( \alpha, \mathbf w ) = C _ { d } - C _ { i }$$

Subject to: (1) or (2)

$$\alpha \in [ 0, 1 ]$$

We denote the SNR at i th relay node as Γ i = | h si | 2 αP 1 σ 2 + | h si | 2 (1 -α P ) 1 . One can easily see that Γ i is an increasing function in | h si | 2 , ∀ α ∈ [0 , 1] . Therefore, if we order the source to relay channel gains according to their absolute values, then the one with the highest value will have maximum SNR. Formally,

$$\Gamma _ { e } \geq \Gamma _ { i }, \text{ where } e = \arg \max _ { i } \left [ | h _ { s 1 } | ^ { 2 }, \dots, | h _ { s M } | ^ { 2 } \right ]$$

Therefore, the objective of the problem (3) can be rephrased as maximize C d -C e for the same constraint set. We rewrite C d -C e in following manner:

$$\text{sounds} \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \col. \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \col: \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \col. \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \col.: \, \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \, \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \colon \col. \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \colon \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \text{s} \, \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \text{s } \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \Text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \, \text{s} \\ \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s } \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s}" \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s}\text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \\ \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{ s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \text{s} \$$

$$\bigcup 1$$

By differentiating the objective function with respect to α , we have the following observation.

Observation. C d -C e is an increasing function of α in [0 , 1] if

$$f ( \mathbf w ) \geq \frac { ( \rho _ { d } - \rho _ { e } ) \rho _ { d } } { ( \rho _ { d } - 1 ) ^ { 2 } ( \rho _ { e } - 2 ) }$$

glyph[negationslash]

assuming ρ e = 2 .

But if we use α = 1 , then in absence of artificial noise, relay nodes can properly decode the message. So, we consider an SNR based approach, where an SNR upto γ results in significant amount of BER in eavesdropping relay nodes and therefore, for all practical purposes we can assume that the message is undecodable at relay nodes. The Optimization problem (3) can be rewritten as:

$$\max C _ { d }$$

$$\text{subject to} \colon \, \Gamma _ { e } \leq \gamma$$

,

(1) or (2)

(3b)

## III. ANALYSIS &amp; SOLUTION

From the optimization problem (4) one can easily see that to maximize C d , Γ e should be equal to γ . Therefore, we can calculate the corresponding α and also using the constraint (3b) we can bound the γ value.

$$\alpha ( \gamma ) = \frac { 1 + \frac { \sigma ^ { 2 } } { | h _ { s e } | ^ { 2 } P _ { 1 } } } { ( 1 + \frac { 1 } { \gamma } ) }, \text{ where } \gamma \leq \frac { | h _ { s e } | ^ { 2 } P _ { 1 } } { \sigma ^ { 2 } } \\. \quad \hat { \ }. \quad \hat { \ }. \quad \hat { \ }. \quad \hat { \ }. \quad \hat { \ }. \quad \hat { \ }.$$

Total Power Constraint: Once α is fixed the first term in the destination SNR is constant, therefore, optimization problem (4) can be reduced to:

$$\max \left ( \frac { | h ^ { \dagger } w | ^ { 2 } } { ( 1 + w ^ { \dagger } D _ { h } w ) } \right )$$

$$\text{subject to} \colon w ^ { \dagger } D w \leq P _ { t o t }$$

One can check that the constraint will be satisfied with equality at optima and the objective function can be written as: w † ( hh † ) w w Dw † ˜ , where ˜ D = 1 P tot D + D h . This is indeed the well known generalized Rayleigh Quotient problem [11, p. 176] for which the maximum value of the objective function corresponds to the maximum eigenvalue of matrix ˜ D -1 hh † . The solution can be expressed as w ∗ = µ v where v = ˜ D -1 h and µ = √ P tot v Dv ′ .

Individual Power Constraints: : The individual power constraint problem for AF relaying can be written as:

$$\max \left ( \frac { | h ^ { \dagger } w | ^ { 2 } } { ( 1 + w ^ { \dagger } D _ { h } w ) } \right )$$

subject to: (2)

It can be seen that the angles of the scaling factors should be chosen in following manner to obtain the optimal value.

$$\arg ( w _ { 0 } ) = - \arg ( h _ { s d } ), \, \arg ( w _ { i } ) = - ( \arg ( h _ { s i } ) + \arg ( h _ { i d } ) ), \forall i$$

Therefore, if we denote c = [ | h sd | , | h s 1 | , · · · , | h sM | ] t and u = [ | w , w h 0 | | 1 1 d | , · · · , | w M Md h | ] t , then the optimization problem (6) can be essentially written as:

$$\max \left ( \frac { ( c ^ { t } u ) ^ { 2 } } { ( 1 + u ^ { t } I _ { 0 } u ) } \right )$$

$$\text{subject to} \colon u ^ { t } \widehat { D } _ { s } u \leq P _ { s }$$

$$0 \leq u _ { i } \leq u _ { m a x, i }, \, \forall i \in \mathcal { M }$$

$$& \text{where } I _ { 0 } = \begin{bmatrix} 0 & 0 ^ { t } \\ 0 & I \end{bmatrix}, \widehat { D } _ { s } = \begin{bmatrix} \alpha P _ { 1 } & 0 ^ { t } \\ 0 & \frac { ( 1 - \alpha ) P _ { 1 } } { | h _ { s 1 } | ^ { 2 } P _ { 1 } + \sigma ^ { 2 } } } { h _ { s } h _ { s } ^ { 2 } } \end{bmatrix}, u _ { m a x, i } = \sqrt { \frac { P _ { i } } { | h _ { s 1 } | ^ { 2 } P _ { 1 } + \sigma ^ { 2 } } }, \text{I is a } M \times M \text{ identity}$$

Proposition 1. The optimal solution for problem (7) with only source constraint i.e. (7b) is given by: u ∗ 1 = √ η 1 -η 2 || c 〈 2 〉 || 2 r ∗ 2 , u ∗ 〈 2 〉 = c 〈 2 〉 || c 〈 2 〉 || r ∗ where r ∗ = √ || c 〈 2 〉 || 2 η 1 || c 〈 2 〉 || 4 η 2 +( η 1 + || c 〈 2 〉 || 2 η 2 ) 2 c 2 1

Proof: We denote the vector [ u , u 2 3 , · · · , u M +1 ] as u 〈 2 〉 , then the objective function can be rewritten as:

$$\frac { ( c _ { 1 } u _ { 1 } + c _ { \langle 2 \rangle } ^ { t } \mathbf u _ { \langle 2 \rangle } ) ^ { 2 } } { 1 + | | \mathbf u _ { \langle 2 \rangle } | | ^ { 2 } }$$

Now it is easy to see that, if || u 〈 2 〉 || = r , then maximum value of c t 〈 2 〉 u 〈 2 〉 = c 〈 2 〉 || c 〈 2 〉 || r . As the objective function is an increasing function of u 1 , so in absence of individual constraints i.e. (7c), the source constraint (7b) will be satisfied with equality. From that we can calculate the value of u 1 in terms of r .

$$u _ { 1 } = \sqrt { \eta _ { 1 } - \eta _ { 2 } | | { \mathbf c } _ { \langle \varepsilon \rangle } | | ^ { 2 } r ^ { 2 } }, \text{ where } \eta _ { 1 } = \frac { P _ { s } } { \alpha P _ { 1 } }, \, \eta _ { 2 } = \frac { ( 1 - \alpha ) } { \alpha | c _ { 1 } | ^ { 2 } }$$

We can write the objective function (7a) in terms of r in following manner: ( c 1 √ η 1 -η r 2 2 + || c 〈 2 〉 || r ) 2 1+ r 2 By differentiating with respect to r and equating it to 0, we get the above result.

If the solution obtained in the above manner satisfy all the individual constraints, then we have indeed solved the problem (7). But, if for any u i individual constraint is violated, then we solve the problem using the following iterative approach.

- 1) Initialize parameters t 1 = 0 and t 2 = 1 .
- 2) Sort the relay nodes in descending order based on u /u ∗ i max,i , ∀ i ∈ { 2 , · · · , M } . Sort the vector c 〈 2 〉 and u max accordingly. In sorted list let us denote the first variable as u (2) . Update the parameter t 1 = t 1 + c (2) u (2) and t 2 = t 2 + u 2 (2) . Now we have to solve the following optimization problem:

$$\max \left ( \frac { ( t _ { 1 } + c _ { 1 } u _ { 1 } + \widehat { c } ^ { t } \widehat { u } ) ^ { 2 } } { t _ { 2 } + | | \widehat { u } | | ^ { 2 } } \right ) _ { v _ { 1 } \right ) v _ { 2 } } \right ) ^ { ( 8 a ) }$$

$$\text{s.t.} \ \alpha P _ { 1 } u _ { 1 } ^ { 2 } + \frac { ( 1 - \alpha ) P _ { 1 } } { | h _ { s d } | ^ { 2 } } ( t _ { 1 } + \widehat { \mathfrak { c } } ^ { t } \widehat { \mathfrak { u } } ) ^ { 2 } = P _ { s }$$

where ̂ u and ̂ c are the vectors obtained after removing u (2) and c (2) , respectively.

- 3) If the solution of problem (8) satisfies all the individual constraints, then optimal solution is obtained, otherwise repeat step 2 &amp; 3 until the solution obtained satisfy their individual constraints.

Remark: The rationale behind picking the variable u (2) corresponding to arg max i u /u ∗ i max,i in step 2 is: for increasing P s , u (2) is the first variable to violate its individual constraint and (7a) increases with u (2) till it reaches the optimum corresponding to that P s value.

Proposition 2. The optimal solution of the problem (8) is given by u ∗ 1 = √ η 1 -η 2 ( t 1 + || ̂ u || r ∗ ) 2 , ̂ u ∗ = ̂ c || ̂ c || r ∗ where r ∗ satisfies the following quadratic polynomial:

$$q _ { 0 } r ^ { 4 } + q _ { 1 } r ^ { 3 } + q _ { 2 } r ^ { 2 } + q _ { 3 } r + q _ { 4 } = 0$$

where q 0 = η η t τ 2 3 2 1 2 , q 1 = -2 η t τ 2 1 ( η c 1 2 1 + η 3 ( t 2 τ 2 -t 2 1 )) , q 2 = η 3 ( η t 1 2 1 -η 2 (( t 2 1 -t 2 τ 2 ) 2 -2 t 2 1 t 2 τ 2 )) -η c 1 2 1 ( η 1 -η t 2 2 1 +2 η t τ 2 2 2 ) , q 3 = 2 t 1 t 2 τη 3 ( η 1 -η t 2 2 1 + η t τ 2 2 2 ) , q 4 = t 2 2 τ 2 ( η 1 -η η t 2 3 2 1 ) η 3 = (1 + η c 2 2 1 ) , τ = || ̂ c ||

Proof: Following the argument of Proposition (1) we can write ̂ ̂ c u t = || ̂ c || r , where || ̂ u || = r . Now due to equality constraint (8b), we can express u 1 in terms of r as: u 1 = √ η 1 -η 2 ( t 1 + || ̂ c || r ) 2 Therefore, optimization problem (8) can be rewritten as:

$$\max _ { r } \frac { ( t _ { 1 } + | | \widehat { c } | | r + c _ { 1 } \sqrt { \eta _ { 1 } - \eta _ { 2 } ( t _ { 1 } + | | \widehat { c } | | r ) ^ { 2 } } ) ^ { 2 } } { t _ { 2 } + r ^ { 2 } }$$

By differentiating it with respect to r and equating it to 0, we get the above polynomial equation in terms of r .

Corollary 1. If r ∗ is the real positive root of equation (9) which maximizes the objective function of problem (10) , then the solution of problem (8) is obtained using that r ∗ .

Proof: As u 1 and ̂ u calculated using r ∗ satisfy the constraint (8b) and maximizes (10), hence it is indeed the optimal solution of problem (8).

## IV. RESULTS

In Figure 2 we plot the capacity ( C d ) of source to destination channel with respect to transmit power at first stage ( P 1 ) for multiple α values. Source to relay and relay to destination channel gains were generated from complex Gaussian distribution with mean 0 and variance 1. The

distribution used for source to destination channel is CN (0 , 0 25) . . While plotting the results we averaged C d over 100 such network instances. For individual power constraints we considered P s = 5 and P i = 0 1 . , ∀ i , whereas, for total power constraint we used P tot = P s + M ∗ P i . As the SNR value at the destination is an increasing function of P 1 and α , so the channel capacity increases as we increase both the parameters. In Figure 3 we plot the capacity for both total

Fig. 2. Plot of C d with respect to P 1 for several α values in case of both total and individual constraints.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1408.0339v1-figure-7b8123cc-707a-4169-87e0-3d11bad33d7e.jpg)

and individual constraint scenario with respect to number of the relay nodes. As the number of relay nodes increases the second term in the destination SNR also increases, which results in increase of C d .

## V. CONCLUSION

In the current article we have presented a beamforming solution for secure communication using untrusted relay nodes. After justifying SNR based approach, we formulated and solved two optimization problems - one for total power constraint and other for individual power constraints. Our current model assumes a perfect CSI for evaluation of optimal scaling vector which may not be available in several practical scenarios. Therefore, in future we would like to study the performance of our model for delayed CSI.

## REFERENCES

[1] A. Wyner, 'The Wire-tap Channel,' Bell Systems Technical Journal , vol. 54, no. 8, pp. 1355-1387, Jan 1975.

Fig. 3. Plot of C d with respect to number of relays for several P 1 values in case of both total and individual constraints.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1408.0339v1-figure-03774285-097c-4a12-8bf2-a589bed18da5.jpg)

- [2] S. Leung-Yan-Cheong and M. Hellman, 'The Gaussian Wire-tap Channel,' IEEE Transactions on Information Theory , vol. 24, no. 4, pp. 451-456, Jul 1978.
- [3] Lun Dong and Zhu Han and Petropulu, A.P. and Poor, H.V., 'Amplify-and-forward based cooperation for secure wireless communications,' in Acoustics, Speech and Signal Processing, 2009. ICASSP 2009. IEEE International Conference on , 2009, pp. 2613-2616.
- [4] J. Zhang and M. C. Gursoy, 'Collaborative relay beamforming for secrecy,' in Communications (ICC), 2010 IEEE International Conference on . IEEE, 2010, pp. 1-5.
- [5] X. He and A. Yener, 'Two-Hop Secure Communication Using an Untrusted Relay: A Case for Cooperative Jamming,' in IEEE Global Telecommunications Conference (GLOBECOM 08) , Dec 2008, pp. 1-5.
- [6] R. Zhang, L. Song, Z. Han, B. Jiao, and M. Debbah, 'Physical Layer Security for Two Way Relay Communications with Friendly Jammers,' in IEEE Global Telecommunications Conference (GLOBECOM 2010) , Dec 2010, pp. 1-6.
- [7] C. Jeong, I.-M. Kim, and D. I. Kim, 'Joint secure beamforming design at the source and the relay for an amplify-and-forward mimo untrusted relay system,' IEEE Transactions on Signal Processing , vol. 60, no. 1, pp. 310-325, Jan 2012.
- [8] X. He and A. Yener, 'Cooperation with an Untrusted Relay: A Secrecy Perspective,' IEEE Transactions on Information Theory , vol. 56, no. 8, pp. 3807-3827, 2010.

- [9] R. Negi and S. Goel, 'Secret Communication using Artificial Noise,' in Proceeding IEEE 62nd Vehicular Technology Conference (VTC-2005-Fall) , vol. 3, Sep 2005, pp. 1906-1910.
- [10] Y. Yang, Q. Li, W.-K. Ma, J. Ge, and M. Lin, 'Optimal Joint Cooperative Beamforming and Artificial Noise Design for Secrecy Rate Maximization in AF Relay Networks,' in IEEE 14th Workshop on Signal Processing Advances in Wireless Communications (SPAWC), 2013 , June 2013, pp. 360-364.
- [11] R. A. Horn and C. R. Johnson, Eds., Matrix Analysis . New York, NY, USA: Cambridge University Press, 1986.
Siddhartha Sarma
Beamforming for Secure Communication via Untrusted Relay Nodes Using Artificial Noise
A two-phase beamforming solution for secure communication using untrusted
relay nodes is presented. To thwart eavesdropping attempts of relay nodes, we
deliberately introduce artificial noise in the source message. After pointing
out the incongruity in evaluating secrecy rate in our model for certain
scenarios, we provide an SNR based frame work for secure communication. We
intend to bring down the SNR at each of the untrusted relay nodes below a
certain predefined threshold, whereas, using beamforming we want to boost the
SNR at the destination. With this motive optimal scaling vector is evaluated
for beamforming phase which not only nullifies the artificial noise transmitted
initially, but also maximizes the SNR at the destination. We discuss both the
total and individual power constraint scenarios and provide analytical solution
for both of them.