{'fraction_non_alphanumeric': 0.04074825332431823, 'fraction_numerical': 0.01104349785891368, 'mean_word_length': 3.9648651672820856, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Secure Communication Game with a Relay Helping the Eavesdropper

In this work a four terminal complex Gaussian network composed of a source, a destination, an eavesdropper and a jammer relay is studied under two different set of assumptions: (i) The jammer relay does not hear the source transmission, and (ii) The jammer relay is causally given the source message. In both cases the jammer relay assists the eavesdropper and aims to decrease the achievable secrecy rates. The source, on the other hand, aims to increase it. To help the eavesdropper, the jammer relay can use pure relaying and/or send interference. Each of the problems is formulated as a two-player, non-cooperative, zero-sum continuous game. Assuming Gaussian strategies at the source and the jammer relay in the first problem, the Nash equilibrium is found and shown to be achieved with mixed strategies in general. The optimal cumulative distribution functions (cdf) for the source and the jammer relay that achieve the value of the game, which is the Nash equilibrium secrecy rate, are found. For the second problem, the Nash equilibrium solution is found and the results are compared to the case when the jammer relay is not informed about the source message.

Security against eavesdropping using information theoretic principles was first considered in [3]. In [4], the wiretap channel was studied for the degraded case, when the eavesdropper's received signal is a degraded version of the legitimate receiver's observation. This model was extended to less noisy and more capable wire-tap channels in [5]. The Gaussian wire-tap channel was studied in [6].
Unconditional security for the relay channel with an external eavesdropper is investigated in [7], [8] and [9]. In [7], the authors suggest the noise forwarding scheme, where the relay transmits dummy codewords that can be decoded at the destination. While sending dummy codewords does not hurt the legitimate communication, it increases the confusion at the eavesdropper, and hence helps achieve a higher secrecy rate. Noise forwarding scheme is similar to cooperative jamming [10], in which one of the users in the system injects noise to increase achievable secrecy rates in multi-access and twoway channels. The paper [11] ties [7] and [10] together, and shows that the relay can choose between sending structured codewords and pure noise to increase achievable secrecy rates even further. When the relay sends dummy codewords or forwards noise, the gains in achievable secrecy rates are due to the interference the relay creates. Thus, in the rest of the paper, we will collect both schemes under the name interference assistance as in [11].
In this paper we consider a four terminal complex Gaussian network with a source-destination pair, a relay and an external eavesdropper. Unlike the above mentioned works, in which relay's transmissions aim to help the legitimate source-destination communication, we assume that the relay is captured by an adversary and aims to help the eavesdropper instead of the source-destination communication. Thus, we refer to the relay node as the jammer relay. The jammer relay is capable of helping the eavesdropper as well as jamming the destination to reach its objective of smaller secrecy rates.
Reliable communication in the presence of arbitrary jamming strategies and no eavesdropper is in general a complex problem [12]. In some special cases, the optimal jammer strategy as well as the optimal encoding at the source node can be solved. For example [13] solves for optimal transmitter and jammer strategies under a game-theory framework when the jammer is informed about the transmitter's signal. Reference [14] investigates the multiple access channel with a correlated jammer. In [15] authors study a game between a jammer and a relay, where the relay assists the source-destination communication.
In our preliminary work we analyzed the source and the jammer relay transmitting in orthogonal separate time slots [16]. Since the jammer relay is malicious, the legitimate receiver can choose not to listen to it. Hence in such a scenario interference assisted eavesdropping is not a possibility, the jammer relay does pure relaying. The eavesdropper listens to both the source and the jammer relay to decrease its equivocation.
More generally, the transmissions of the source and the jammer relay are not orthogonal and the jammer relay may acquire some knowledge of the source signal. Then both interference assisted eavesdropping and pure relaying are possible. When the jammer relay can only operate in a half-duplex fashion, there is a tradeoff between pure relaying and interference assisted eavesdropping. Pure relaying can either try to convey source information to the eavesdropper or attempt to cancel the source signal at the destination by jamming but the relay has to listen the source first and can only participate in transmission a fraction of the time. In interference assisted eavesdropping, the jammer relay does not utilize the overheard signal and can simultaneously transmit with the source, but its signal does not carry useful information about the source message and only contains interference to confuse the destination.
While solving the half-duplex jammer relay problem seems difficult, as a first step to address the general case, in this paper we investigate two extreme situations: (i) Problem 1-The jammer relay does not hear the source transmission and can therefore transmit simultaneously with the source, and (ii) Problem 2-The jammer relay knows the source signal causally. In the first problem, pure relaying is not an option, and only interference assisted eavesdropping protocols are meaningful. On the other hand, both pure relaying and interference assisted eavesdropping can be useful in the second problem.
As the jammer relay and the source have conflicting interests about the value of the secrecy rate, we formulate each of the problems as a two-player non-cooperative zero-sum continuous game and find achievable secrecy rates for the sourcedestination communication. Assuming Gaussian strategies at the source and the jammer relay in the first problem, we calculate the Nash equilibrium and show that it is achieved with mixed strategies in general. We also state the optimal cumulative distribution functions (cdf) for the source and the jammer relay that achieve the value of the game, which is the Nash equilibrium secrecy rate. For the second problem, we find the Nash equilibrium solution and compare the results to the case when the jammer relay is not informed about the source message.
In the next section the general system model is described. In Section III we solve the first problem, in which the jammer relay does not hear the source transmission. In Section IV we attack the second problem assuming the jammer relay is given the source signal causally. In Section V, numerical results are presented and in Section VI we conclude.

II. GENERAL SYSTEM MODEL
We investigate the four terminal complex Gaussian network composed of a source, a destination, an eavesdropper and a jammer relay denoted by S, D, E and JR respectively. The network under investigation is shown in Fig. 1.
The received signals at the destination and the eavesdropper are where X S,i and X R,i are the signals the source and the jammer relay transmit at time i, i = 1, ..., n. In the first problem under study, the jammer relay does not hear the source signal. In the second problem, it is assumed that the jammer relay is given the source signal causally, and hence X R,i depends on X i S,1 , where X i S,1 = (X S,1 , ..., X S,i ). The complex channel gains between node k and node l are denoted as h kl , k = S, R, l = D, E. All channel gains are fixed and assumed to be known at all nodes. The complex additive Gaussian noises at the destination and at the eavesdropper are respectively denoted as Z D,i and Z E,i and are independent and identically distributed (i.i.d.) with zero mean and variance N D = N E = N 0 . The source and the jammer relay have average power constraints P S and P R . For convenience we will write γ kl = |h kl | 2 P k /N 0 , k = S, R, l = D, E, to indicate the received power at node l due to node k.
The source aims to send the message W securely to the destination in n channel uses. The secrecy rate, R s is defined as the maximum information rate such that the secrecy constraint is satisfied; i.e. lim n→∞ H(W )/n = lim n→∞ H(W |Y n E,1 )/n, and the probability of decoding error at the destination approaches zero as n approaches infinity [4].
In this problem the source and the jammer relay have opposing interests. The former wants to increase the secrecy rate, and the latter wants the decrease it. Thus, this problem constitutes a zero-sum game, where the utility is the secrecy rate, R s . The source and the jammer relay make their decisions simultaneously, and hence the game is strategic.
If the jammer relay does not exist we have the Gaussian eavesdropper channel, for which sending Gaussian codewords at full power is optimal [6]. If the eavesdropper does not exist (h SE = h RE = 0), then the jammer relay's only objective is to jam the destination to decrease the information rate. This problem is solved in [13], for which it is shown that correlated jamming is optimal. The optimal transmission strategy for the source is to send Gaussian codewords, and the optimal strategy for the jammer is of the form where ρ ∈ C, Z i is independent of X S,i and chosen i.i.d. according to distribution CN (0, N Z ). If the jammer has enough power, then it can completely block the source-destination communication. If its power is not large enough, it shares its power in canceling the source message and sending noise. For the two settings considered in this paper, the strategy spaces for both the source and the jammer relay can be quite large, and finding the Nash equilibrium solution is very complicated in general. However, the results of [13] and [11] suggest that both correlated jamming and sending structured codewords at the jammer relay have a high potential to decrease achievable secrecy rates. Therefore, we assume that the jammer relay strategies have the same form as in (3). Different than [13] to incorporate interference assisted jamming/relaying we assume that in (3) the signal Z n 1 can be a structured codeword or Gaussian noise. If the jammer relay were a jammer only, then Z n 1 would simply be unstructured noise. However, in this paper it is not merely a jammer, but aims help the eavesdropper to ensure no secret communication takes place. Unstructured noise is useful as it harms the legitimate communication, yet it also harms the eavesdropper. Structured codewords have the potential to help the eavesdropper more as they can be potentially decoded at the eavesdropper.
In Problem 1, as the relay does not hear the source transmission, we have ρ = 0. In Problem 2, the level of source and jammer relay signal correlation can be adjusted as a function of ρ. Depending on the value of ρ, the jammer relay can try to enable decoding at the eavesdropper as in [16], or it can attempt to cancel X S at the destination. Under these assumptions, we are interested in finding a scheme attaining the Nash equilibrium of the game, which consists of a pair of optimal strategies for the source and the jammer relay.

III. PROBLEM 1: THE RELAY DOES NOT HEAR THE SOURCE
In this section we state the game theoretic formulation for the first problem. Solving this game, we suggest an achievability scheme that results in the Nash equilibrium value of the game. In Sections III-A to III-D, we assume all nodes in the system know both the source and the jammer relay's strategies, including the codebooks. In Section III-E, we will extend this study to the more realistic case where the destination does not know the jammer relay codebook. Throughout Section III, we assume the source and the jammer relay operate at full power.

A. Game Theoretic Formulation
In the first problem, the relay does not hear the source node. Therefore, its strategy cannot depend on the source signal and ρ = 0 in (3). Then, as described in Section II, the jammer relay either generates dummy codewords or simply forwards noise. When both the source and the jammer relay send structured codewords, the problem becomes similar to a multiple-access channel with an external eavesdropper. In a multiple-access channel, both transmitters need to be decoded at the destination. However, in this game, the jammer relay only sends dummy codewords, and does not need to be decoded either at the destination or at the eavesdropper.
Observe that when the jammer relay sends complex Gaussian codewords/noise with full power, the best distribution for choosing the source codebook is the complex Gaussian distribution [17] with zero mean and variance P S . On the other hand, when the source sends complex Gaussian codewords with zero mean and variance P S , then the jammer relay distribution that decreases the secrecy rate the most is the complex Gaussian distribution with zero mean and variance P R [18]. Motivated by these observations, we assume that the source and the jammer relay choose their codebooks according to i.i.d. complex Gaussian with zero mean and variances P S and P R respectively. Then, the source strategy is to choose the rate of the information it wants to convey to the destination, and the jammer relay strategy is to choose the rate of its dummy information. In the remainder of this section the source strategy ξ will denote the rate of information, while the jammer relay strategy η will denote the rate of dummy information. We argue below that structured codewords for sending dummy information at the jammer relay also include the possibility of sending pure noise. Given source and jammer relay strategies, the secrecy rate, or the payoff, is a function of both ξ and η. If a certain positive secrecy rate, R s (ξ, η) 1 is achieved, then the source node's payoff is equal to R s (ξ, η) and the relay's payoff is equal to −R s (ξ, η).
Under these assumptions, the destination can decode both the source and the jammer relay codewords if the rate pair However, the jammer relay only sends dummy codewords, and does not need to be decoded either at the destination or at the eavesdropper. If the destination cannot decode the jammer relay codeword, it can simply treat it as noise. Thus, all ξ rates in R are achievable as well. Overall, we say that the destination can decode the source information with arbitrarily small probability of error, if (ξ, η) ∈ R [D] where Note that after taking the union, the individual constraint on η in (4) is not needed anymore. We also define two other regions R N , as in (4) and (5) replacing all D with E. Then Then for a fixed source and jammer relay rate pair (ξ, η), the payoff function, R s (ξ, η), is equal to The proof of how this secrecy rate would be achieved is similar to [11] and is skipped here. An example is shown in Fig. 2 for the boundaries of the regions R [D] and R [E] with the corner points defined as For a fixed (ξ, η), the secrecy rate defined in (8) corresponds to the horizontal distance between the point (ξ, η) and the dashed line in Fig. 2, if (ξ, η) is in between the solid and dashed lines. If (ξ, η) ∈ R [E] , that is inside the dashed line, then both the destination and the eavesdropper can reliably decode the source information, and the secrecy rate is zero.
, outside the solid line, the destination cannot decode the source message reliably. The secrecy rate is zero, because there is no reliable communication between the source and the destination. Because of this immediate drop in secrecy rates beyond the boundary of R [D] , the payoff function is discontinuous.
Note that choosing the dummy information rate as η = ω R is equivalent to sending unstructured Gaussian noise at the jammer relay. Thus, the secrecy rate achieved by jammer relay sending unstructured Gaussian noise is also covered in our model, although we arrived at the R s (ξ, η) function assuming structured codewords for the jammer relay.
Depending on γ kl , the positions of the corner points with respect to each other change, and multiple cases arise. In the next subsection we investigate the case, where the conditions are all satisfied. The case shown in Fig. 2 satisfies all these conditions. We will call this Case A. There are 10 other cases B-M shown in Fig. 5 for ∆ S > δ S and Ω S > ω S , and Case N for ∆ S ≤ δ S or Ω S ≤ ω S . These other cases require similar techniques and are explained in Section III-D.

B. Solution to the Game: Case A
A zero-sum game has a pure strategy solution if However, if there is no (ξ, η) that satisfies this equation, then no pure strategy Nash equilibrium exists, and a mixed strategy solution is needed [19].

Lemma 1.
When γ kl , k = S, R, l = D, E satisfy the conditions (13)- (15), which define Case A, the two-player zerosum game does not have a pure strategy solution.
Proof: In this game max ξ min η R s (ξ, η) = 0, whereas These two values are not the same, hence a pure strategy solution does not exist.

Lemma 2.
The game defined in Lemma 1, is equivalent to a continuous game played over the square, where the source and jammer relay strategies are respectively restricted to the compact intervals ξ ∈ [Ω S , Proof: To prove this we eliminate comparable and inferior strategies for the source and the jammer relay. First note that R s (ξ, η) ≤ R s (Ω S , η), for ξ < Ω S , and 0 < η.
In other words, as both players are rational, the source never chooses rates ξ < Ω S . Similarly, the source node never chooses its rate larger than ∆ S , as the secrecy rate R s (ξ, η) = 0 no matter what the jammer relay action is. On the other hand, For the jammer relay, choosing any rate larger than Ω R is inferior to choosing rate equal to Ω R and thus we can omit the strategies η > Ω R . Similarly, The jammer relay strategies η < δ R are inferior to η = δ R and thus the jammer relay never chooses its rate less than δ R . Finally, in this reduced game, the source node does not choose its rate larger than log(1 + γ SD + γ RD ) − δ R , as this choice makes its payoff equal to zero. In other words, These strategy eliminations result in the desired reduced game.
The reduced game based on Lemma 2 is shown in Fig. 3. We next describe how to solve for the value of this reduced game.
Theorem 1. Let a be defined as a = (δ S − Ω S )/L. Suppose a ∈ [k/(k + 1), (k + 1)/(k + 2)], for some integer k ≥ 0. Then the equivalent game in Lemma 2 has the Nash equilibrium secrecy rate R * s = Lα(1 − a), where α = g k (a), and is achieved with cdfs for the source and the jammer relay F ξ (ξ) and F η (η), respectively. Here the functional forms of α, F ξ (ξ) and F η (η) depend 2 on k, and for a given k, both α and the cdfs can be readily computed. For example, for 0 ≤ a ≤ 1/2 or equivalently k = 0, we have α = g 0 (a) = e −1/(1−a) 1− a 1−a e −1 and The optimal cdf for the jammer relay F η (η) is the same as F ξ (ξ) if ξ and Ω S are replaced with η and δ R respectively.
Since there are infinitely many intervals for a in Theorem 1 (corresponding to each nonnegative integer k), it is important to find a practical way to calculate the value of the game. Theorem 2. Consider a discrete approximation of the equivalent game in Lemma 2 obtained by dividing the square into a uniform grid of (T + 1) 2 samples. The discrete source strategies are ξ i = ω S + Li/T , the relay strategies are η j = δ R + Lj/T , and the payoff matrix is A = [a ij ], where a ij = R s (ξ i , η j ), i, j = 0, 1, ..., T . The value of this discrete game can be obtained using linear programming. Furthermore, for a chosen T, difference between values of the discrete and the continuous game is at most 2 √ 2L/T .
Proof: See Appendix B. To compare the optimal strategies for the continuous and discrete games using the solutions in Theorems 1 and 2, we assume |h SD | = 1, |h RD | = 1/2, and |h SE | = |h RE | = 2/3. We make no assumptions on the phases of the channel gains as F ξ (ξ), F η (η) and R * s only depend on the magnitude of the channel gains. The source and the jammer relay power constraints are P S = P R = 10. We then have a = 0.5255, L = 0.946 and α = 0.20484. We find the Nash equilibrium secrecy rate of the continuous game as 0.092 bits/channel use. To use the discrete approximation we set T = 400. Choosing this sample size, Theorem 2 states that the difference between the value of discrete and continuous games is at most 0.007. Yet, the actual difference is much smaller and we find that the value of the discrete game as 0.0923 bits/channel use. Note that these values are much smaller than the no jammer relay case, for which the secrecy rate is equal to 1.0146 bits/channel use. The optimal cdfs for the source for the continuous and discrete games are very close to each other and are shown in Fig. 4. As argued in Lemma 2, we observe that F ξ (ξ) is zero if ξ < 1.947 = Ω S , and is 1 if ξ > 2.893 = Ω S + L. Note that in the reduced game, sending Gaussian noise with full power is still one of jammer relay's possible strategies.

C. Note on the Achievability of the Mixed Strategy Solution
If the solution of the game is a pure strategy, the achievability follows using the arguments in Section III-A. As the solution in Theorem 1 is mixed, it is also important to explain how the Nash equilibrium is attained information theoretically.
In a mixed strategy the players randomize their actions over a set of strategies with a certain probability distribution. The players act repeatedly and ignore any strategic link that may exist between plays. They also know each other's probability distribution functions, and hence formulate their own actions. In the game defined in this section, when a mixed strategy solution is needed, the source node assumes a variable rate scheme, similar to the one adopted for fading eavesdropper channels [20].
In this variable rate scheme, the source generates a total of 2 nBE(ξ) codewords, where B is the number of blocks the game is played where each block is of length n, and E(ξ) is the expected rate for the source node, expectation calculated over the joint cdf F ξ (ξ)F η (η). The source uses these codewords to form a secure code that conveys nBR * s bits of information in B blocks [4], where R * s is the value of the game or the Nash secrecy rate. In each block, the source independently chooses a rate ξ according to F ξ (ξ) and transmits nξ bits of the codeword chosen to represent the secure information. Similarly, the jammer relay chooses a rate η according to F η (η). Since the eavesdropper cannot improve its mutual information more than ξ, as in the variable rate case of [20], (8) is still valid and R * s is attained as both n and B approach infinity.

D. Other Cases: B-N
So far in Sections III-A/III-B, we have obtained a complete solution for Case A. In this subsection, we will show that for all other cases B to N, shown in Fig. 5, either an analytical solution or a discrete approximation can be found. Due to limited space, the coordinates of corner points of the equivalent regions are not shown in the subfigures of Fig. 5 but they can be easily determined given those coordinates of corner points on the boundary regions as in (9)-(12).
For Cases B and C, following a reasoning similar to Lemma 2 the reduced region remains to be a square as in Case A except that the jammer relay rate η in interval [ω R , Ω R ) is dominated by the jammer relay rate Ω R . In this case, in order to keep the support of the jammer relay strategy compact, we do not eliminate these dominated jammer relay rates. Using the same reasoning as in the proof of Theorem 2, we can solve the problem by approximating the original game with a discretized matrix game.
For Case D, the solution is the same as Case A when a = 0 and the optimal solution can be obtained analytically using Theorem 1. In this case, the Nash equilibrium secrecy rate For Case E, a pure strategy Nash equilibrium exists, the optimal strategies for the source and the jammer relay are (Ω S , Ω R ) and the Nash equilibrium secrecy rate is Ω S − δ S . For Cases F-K, if we retain some dominated relay rates to keep the support of the relay strategy compact, the reduced region becomes a rectangle as shown in Fig. 5. We can easily extend Theorem 1 to the case of a rectangle and show that these games also have a value. Furthermore, similar to Theorem 2, a discrete approximation can be computed.
For Case L, after all eliminations similar to Lemma 2, only four points remain. The two rates for the source to choose are ξ = Ω S and ξ = ∆ S while those for the jammer relay are η = δ R and η = Ω R . The 2 × 2 matrix game with the source and the jammer relay being the row and column players respectively has the following payoff matrix A mixed-strategy Nash equilibrium exists, in which the source chooses ξ = Ω S with probability Case M is very similar to Case L. As in Case L, the source can choose between ξ = Ω S and ξ = ∆ S while the jammer relay can choose between η = δ R and η = Ω R . The 2 × 2 matrix game with the source and the jammer relay being the row and column players respectively has the following payoff matrix and R [E] intersect or R [D] is contained in R [E] . In the former scenario, the intersection point is a pure strategy Nash equilibrium leading to zero secrecy rate; in the latter case, no positive secrecy rate can be achieved regardless of what the source and jammer relay strategies are.

E. Unknown Jammer Relay Codebook
In previous subsections, it is assumed that all nodes in the system know both the source and the jammer relay strategies, including the codebooks. In practice, it is reasonable to assume that the destination is not aware of the jammer relay's exact codebook even though it may have the knowledge that the jammer relay uses Gaussian codebooks. Under this assumption, the destination cannot jointly decode the source and the jammer relay messages any more and thus the jammer relay's signal would always be treated as noise at the destination. Hence in this case, the destination can correctly decode source information only if ξ ∈ R Redrawing the rate regions under the new assumption, we obtain the two cases shown in Fig. 6 for Ω S ≤ δ S and for Ω S > δ S . It can be easily shown that if Ω S ≤ δ S , the intersection point, (ξ, η) = (Ω S , (ωR−δR)ΩS +ωS δR−ωRδS ωS −δS ), is a pure Nash equilibrium point and is unique, leading to zero secrecy rate. If Ω S > δ S instead, all points (Ω S , η) with η ∈ [0, δ R ] are Nash equilibria, and the resulting Nash equilibrium secrecy rate is Ω S −δ S . Therefore, we conclude that when the destination does not know the jammer relay codebook, the Nash equilibrium secrecy rate is R s = (Ω S − δ S ) + , where [x] + = max(0, x).

IV. PROBLEM 2: THE RELAY IS GIVEN THE SOURCE SIGNAL
In this section we provide the Nash equilibrium solution of the game for the second problem in which the jammer relay is given the source signal causally. To further simplify the setup we assume the destination is unaware of the jammer relay codebook as in Section III-E. Depending on whether Z n 1 is Gaussian noise or structured codeword in (3), the payoff function and the Nash equilibrium of the game are different. In the following, we consider these two different scenarios respectively.
A. Z n 1 is Gaussian noise In this subsection, we assume that Z i in (3) are i.i.d. complex Gaussian with zero mean and variance N Z , for all i = 1, ..., n. Substituting X R,i in (3) into (1) and (2), the relation between the source signal and the received signals at the destination and the eavesdropper can equivalently be written asỸ whereZ D,i = hRDZi+ZD,i hSD+hRD ρ andZ E,i = hRE Zi+ZE,i hSE+hRE ρ . Since Z D , Z E ∼ CN (0, N 0 ), the variances ofZ D andZ E can respectively be obtained as The system in (18) and (19) is equivalent to a Gaussian wire-tap channel. Hence the best strategy for the source is to choose its codebook according to i.i.d. CN (0, P S ), resulting in the secrecy capacity R s [6] R s (ρ, N Z ) = log 2 On the other hand, if the source fixes its input distribution to be complex Gaussian with zero mean and variance P S , the jammer relay would intend to choose ρ and N Z to minimize the secrecy rate when its strategy is limited to (3). Thus, the pure-strategy achieving the Nash equilibrium for the source is to choose the input distribution X S ∼ CN (0, P S ) and for the jammer relay is to transmit X R = ρX S + Z for some optimal ρ and N Z , where the optimal ρ and N Z are denoted as ρ * and N * Z , are solutions to the problem min R s (ρ, N Z ) subject to |ρ| 2 P S + N Z ≤ P R .
Then the Nash equilibrium secrecy rate is R * s (ρ * , N * Z ). The optimization problem in (23) is not convex. This suggests infeasibility of a closed form solution in general. However, for the following special cases, the solutions have a simple form and can be obtained as follows: 1) If |h SE | ≥ |h SD |, even without any help from the jammer relay for the eavesdropper, the secrecy rate is always zero. Thus, the jammer relay only needs to keep silent. 2) If |h RD | ≥ P S /P R |h SD |, then the pair (ρ * , N * Z ) = (−h SD /h RD , 0) is optimal. When the link between the jammer relay and the destination is strong, the jammer relay can send a negatively correlated signal to completely cancel the source signal.
3) Suppose |h SE | < |h SD | and |h RD | < P S /P R |h SD |. If |hRDhSE | 2 −|hSDhRE | 2 are optimal. This is the case when the jammer relay is capable of forcing secrecy rate to zero by transmitting only noise.
When |h SE | < |h SD | and |h RD | < P S /P R |h SD |, numerical methods are used to solve the optimization problem of (23). In (23), it can be shown that the constraint |ρ| 2 P S + N Z ≤ P R is not necessarily met with equality; i.e. it is possible that in the optimal solution the jammer relay should not transmit with full power. This is in contrast to the jamming problem without an eavesdropper, where it is best for the jammer to use full power [13]. Letting ρ = |ρ|e jθ , N Z = wP S , the constraint can be rewritten as To numerically solve for (23) we exhaustively search over all feasible |ρ|, θ and w in the range.
B. Z n 1 is structured codeword In this subsection, we assume Z n 1 is a structured codeword instead of noise. As in Section III-E, we assume the jammer relay shares its codebook only with the eavesdropper, but not with the adversarial destination. Note that, this set of assumptions define the worst case scenario along with the fact that the relay is informed about the source information causally.
The jammer relay is capable of choosing the rate of the codebook of Z n 1 so that the eavesdropper can successfully decode it. After the eavesdropper decodes the dummy information carried by Z n 1 , it subtracts Z n 1 and re-scales its received signal Y E to getȲ whereZ E,i = ZE hSE +hRE ρ has zero mean and variancē Since the destination does not know the jammer relay codebook, it can only treat Z n 1 as noise. If the jammer relay's transmitted signal has the form in (3) and Z n 1 is chosen to be Gaussian, then based on the results in [6], the optimal source distribution is CN (0, P S ). On the other hand, if the source distribution is fixed to CN (0, P S ), it is best for the jammer relay to construct codebook of Z n 1 according to the distribution CN (0, N Z ) since only the destination is affected by Z n 1 and the worst noise is the Gaussian one [18]. Hence, the purestrategy achieving the Nash equilibrium for the source is to use CN (0, P S ) distribution to generate the source codebook while that of the jammer relay is to construct Z n 1 as Gaussian codewords and transmit signal of the form in (3) for some optimal ρ and N Z . Given that both X S and Z are Gaussian at the equilibrium, the jammer relay ought to set the rate of the codebook of Z to satisfy in order to guarantee that the eavesdropper can decode it successfully. With X S ∼ CN (0, P S ) and X R = ρX S + Z, the secrecy rate can be expressed as (29) Comparing the equivalent noise at the eavesdropperN E defined in (28) andÑ E defined in (21), we observe that the Nash equilibrium secrecy rates obtained when Z n 1 is a structured codeword will always be less than or equal to the Nash equilibrium secrecy rates obtained when Z n 1 is Gaussian noise. However, structured Z n 1 requires the jammer and the eavesdropper to share the codebook information in advance and having Z n 1 as Gaussian noise leads to a simpler system design.
To find the optimal ρ and N Z at the Nash equilibrium, we need to minimize R s (ρ, N Z ) subject to ρ 2 P S + N Z ≤ P R . As in the previous subsection, a closed form solution cannot be obtained in general. For some special cases, we can easily find an optimal solution. We list a few of these cases as follows.

V. NUMERICAL RESULTS
In this section we present some numerical results to show how the secrecy rate changes with the jammer relayeavesdropper channel quality, when the jammer relay is given the source signal causally (Problem 2). We also compare the secrecy rates attained when Z n 1 is Gaussian noise, Section IV-A and Z n 1 is a structured codeword, Section IV-B. We finally provide comparisons of the secrecy rates for Problem 1 and Problem 2.
For Problem 2, when Z n 1 is Gaussian noise, the Nash equilibrium secrecy rate is plotted as a function of h RE in Fig. 7 for h SD = 1, h SE = 0.4 + 0.4j and h RD = 0.2 − 0.2j when P S = P R = 10 and N 0 = 1. For simplicity, we restrict h RE to be real in this plot. We note that in general multiple optimal choices for (ρ * , N * Z ) appear in general. The following two cases are also included in the figure for comparison: 1) the jammer relay only sends Gaussian noise; i.e. X R = Z; 2) the jammer relay only sends a correlated version of source message; i.e. X R = ρX S . When h RE is near 0.2, X R = Z is close to optimal; when h RE is greater than 0.3 or smaller than −0.15, the curve for X R = ρX S overlaps with the curve for X R = ρX S + Z, which implies that for h RE 's in these ranges the component of Gaussian noise Z in the signal X R is not necessary and sending a correlated version of source message is already optimal. Also, we observe that as h RE grows sufficiently large, the secrecy rate R * s drops to zero when the jammer relay's signal is of the form X R = ρX S +Z.
For Problem 2, Fig. 8 shows the Nash equilibrium secrecy rate as a function of real h RE when Z n 1 is a structured codeword, h SD = 1, h SE = 0.4+0.4j and h RD = 0.2−0.2j. As before, P S = P R = 10 and N 0 = 1. In Fig. 8, for comparison the Nash equilibrium secrecy rate when the jammer relay signal is restricted to X R = Z with Z n 1 being a structured codeword and X R = ρX S are also included. The secrecy rate for X R = ρX S is the same as in Fig. 7, since X R does not depend on Z. Also the secrecy rate for X R = Z remains constant as h RE changes, which is due to the fact thatÑ D andN E do not depend on h RE when ρ = 0. However, in this case h RE has an impact on the maximum possible rate R Z . Under the same setting as in Fig. 7 and Fig. 8, Fig. 9 compares the Nash equilibrium secrecy rates under four different scenarios: 1) Problem 1: uninformed relay with the jammer relay codebook known at the destination, Section III-A/III-D; 2) Problem 1: uninformed relay with the jammer relay codebook unknown at the destination, Section III-E; 3) Problem 2: informed relay with Z n 1 being Gaussian noise, Section IV-A; 4) Problem 2: informed relay with Z n 1 being structured codewords, Section IV-B. Our observations can be listed as follows: • When the relay is uninformed of source message and the jammer relay codebook is unknown at the destination, as in Section III-E, neither Ω S nor δ S depend on h RE , and the secrecy rate remains unchanged for all h RE 's. As the destination always treats the jammer relay's signal as noise while the eavesdropper may decode it, this scenario is actually equivalent to that of X R = Z in Fig. 8. • When the relay is uninformed of the source message and the destination has the knowledge of the jammer relay codebook the Nash equilibrium secrecy rate can be increased for |h RE | < 0.6 compared with the no codebook case at the destination. • Among all four scenarios, an informed relay with Z n 1 being structured codeword achieves the smallest secrecy rate.
• For a range of h RE 's studied, an informed relay with Z n 1 as Gaussian noise can achieve a smaller secrecy rate than an uninformed relay with jammer relay codebook unknown at the destination. However, we observe that an informed relay with Z n 1 as Gaussian noise results in the largest secrecy rate when h RE is between 0.15 and 0.4. In Fig. 9, for simplicity, we only considered real channel gain h RE between the jammer relay and the eavesdropper. In Fig. 10, we fix |h RE | = 0.25 and plot the Nash equilibrium secrecy rates as a function of the phase of h RE , ∠h RE for the four different cases mentioned above. When the relay is uninformed of the source message, irrespective of whether the destination knows the jammer relay codebook or not, the Nash equilibrium secrecy rate only depends on the magnitude of h RE and therefore remains the same for all phases of h RE . However, the Nash equilibrium secrecy rates in both cases of informed relay are sensitive to the changes in ∠h RE . For example, as shown in Fig. 10, when 0 ≤ ∠h RE < π, the Nash equilibrium secrecy rate in either case decreases as ∠h RE increases and finally drops to zero when ∠h RE grows beyond a threshold.

VI. CONCLUSION
In this paper a four terminal network with a source, a destination, an eavesdropper and a jammer relay is investigated. The source and the jammer relay have conflicting interests. The former aims higher secrecy rates, whereas the latter aims lower secrecy rates. Due to this conflict, this problem is formulated as a non-cooperative two-player zerosum continuous game. Two different cases are studied: 1) the jammer relay does not hear the source, and 2) the jammer relay is given the source signal causally. For the first case, it is discussed that interference assistance is the only option. Under this assumption the optimal solution for the source and the jammer relay is found to be mixed strategies. The Nash equilibrium secrecy rate of the game is calculated, in addition to optimal cumulative distribution functions for the source and the jammer relay. A discrete approximation to the continuous game, whose value can be made arbitrarily close to the value of the continuous game, is also suggested. For the second case, limiting the jammer relay strategies to a combination of pure relaying and interference assisted eavesdropping schemes, the Nash equilibrium of the game is found and an achievability scheme is suggested. Our results show that the presence of the jammer relay decreases the secrecy rates significantly. If the jammer relay is informed of the source signal, the secrecy rates are even lower. Future work includes the more general half-duplex jammer relay case, in which the relay is not given the source signal for free, but has to listen to it to be able to perform pure relaying.

APPENDIX A PROOF OF THEOREM 1
For the equivalent game in Fig. 3, the achieved secrecy rate is given by (30) We first assume L = 1 and (Ω S , δ R ) = (0, 0) and then use the game-theoretic techniques in [19] to solve the continuous game played over the unit square. For convenience, we denote the jammer relay's pure strategy by λ = 1 − η instead of η. Fig.11 illustrates the unit square where the normalized game is played. Rewriting (30), we get where and M 2 (ξ, λ) = 0 (33) M 1 (ξ, λ) and M 2 (ξ, λ) are defined over the closed triangles respectively as shown in Fig. 11. Here a is a constant between 0 and 1. In game theory, the function R s (ξ, λ) is called the kernel of the game. For the game in Fig. 11, the source and the jammer relay strategies can be represented by the cdfs F ξ (ξ) and F λ (λ) defined on [0, 1] respectively. Given source strategy F ξ (ξ) and jammer relay strategy F λ (λ), the expected pay-off of the source is given by A solution to the game with kernel R s (ξ, λ) [19] is a pair of cdfs F ξ and F λ together with a real number R * s such that Here we call R * s the value of the game or Nash equilibrium secrecy rate and F ξ and F λ optimal strategies for the source and the jammer relay respectively.
Motivated by the results on games of timing in [19], we first assume that the optimal strategies for the source and the jammer relay are of the forms F ξ = (αI 0 , f ξ ) and F λ = (f λ , βI 1 ). Here (αI 0 , f ξ ) denotes a distribution made up of a density function f ξ spread on the interval (0, 1] and one jump of magnitude α located at 0. Similarly, (f λ , βI 1 ) is a distribution made up of a density function spread on the interval [0, 1) and one jump of magnitude of β located at 1. Then, we solve the game analytically under these assumptions. After a particular solution is found, we verify that it is indeed a solution of the game. As the kernel R s (ξ, λ) depends on the parameter a, we will find optimal strategies for both players for different parameters of a.
For the more general case when the edge is equal to L = Ω R − δ R and the left lower corner point of the square is located at (Ω S , δ R ), we have a = δS−ΩS L . Similar to the above discussion, optimal cdfs and Nash equilibrium secrecy rate can be derived to result in Theorem 1.

APPENDIX B PROOF OF THEOREM 2
The proof of this theorem is based on Theorem 8 in Chapter 17 of [21] and the approximation techniques suggested there.
Let us first consider the game over the unit square when L = 1 and (Ω S , δ R ) = (0, 0). According to Theorem 8 in Chapter 17 of [21], the game with the kernel function R s (ξ, λ) in (31) has a value and there exists a pair of "ǫoptimal" strategies for the source and the jammer relay. 3 Hence, it is possible to solve the game using approximate methods. To obtain the approximation, we divide the unit interval by T − 1 inner grid points equally spaced in it so that the square is divided into a uniform grid of (T + 1) 2 samples. Therefore, the source chooses among discrete pure strategies ξ i = i/T (i = 0, 1, ..., T ) while the jammer relay chooses among λ j = j/T (j = 0, 1, ..., T ). The payoff matrix 4 is A = [a ij ], where a ij = R s (ξ i , λ j ), i, j = 0, 1, ..., T . For this discrete game, a mixed-strategy Nash equilibrium always exists and its value can be obtained using linear programming.
From [21], in order for the equilibrium strategies of the discrete game to be ǫ-optimal for the original continuous game, T needs to be chosen such that T ≥ 2 max[K1,K2] ǫ , where K 1 and K 2 are two constants chosen to satisfy M 1 and M 2 are as defined in (32) and (33). In our problem, the above conditions hold for K 1 = √ 2 and K 2 = 0, therefore we only need to choose T to be greater than 2 √ 2 ǫ . On the other hand, if T is fixed, difference between values of the discrete game and the continuous game is at most 2 √ 2/T . For example, if we set ǫ = 0.00708, it suffices to choose T to be 400. 3 A pair of cdfs F 0 ξ (ξ) and F 0 λ (λ) are said to be ǫ-optimal and the approximate value of the game vǫ is said to be "ǫ good", if (i) the expected payoff v 1 calculated for F 0 ξ (ξ) and for any F λ (λ) satisfies v 1 ≥ vǫ − ǫ, (ii) the expected payoff v 2 calculated for any F ξ (ξ) and for F 0 λ (λ) satisfies v 2 ≤ vǫ − ǫ, and (iii) |vǫ − v| ≤ ǫ, where v is the value of the game [21]. 4 Note that if we use the kernel Rs(ξ, η) instead of Rs(ξ, λ), the payoff matrix would become the one in Theorem 2. Similar to Appendix A, for the more general case when the edge is equal to L = Ω R − δ R and the left lower corner point of the square is located at (Ω S , δ R ), a discrete game can be used to approximate the continuous game as in Theorem 2. The difference between the values of the two games would be scaled by L; i.e., within 2 √ 2L/T .  (6) and (7), under conditions (13)- (15).
[23] --, "A secrecy game with an informed jammer relay," in Proceedings of 21st Annual IEEE International Symposium on Personal, Indoor and Mobile Radio Communications, September 2010.