Security-Reliability Trade-Off Analysis for Rateless Codes-Based Relaying Protocols Using NOMA, Cooperative Jamming and Partial Relay Selection

In this paper, we propose secure relaying transmission protocols using rateless codes, where a source sends encoded packets to two intended destinations via help of intermediate relays. Employing non-orthogonal multiple access, two encoded packets can be sent to the destinations at the same time. In addition, two partial relay selection methods are studied to enhance reliability of the data transmission at the first and second hops. For protecting the source-relay and relay-destination transmission against an eavesdropper, cooperative jamming technique is employed. Particularly, in the first phase of each data transmission cycle, the remaining relays (except the selected relay) are used to transmit artificial noise on the eavesdropper, and cooperate with the selected relay to cancel interference components. In the second phase, trusted nodes that are near the destinations are employed to play a role as the cooperative jammers. For a fair performance comparison, we design a simple transmit power allocation for the transmitter and jammer nodes at the first and second phases. We also propose an adaptive power allocation method, where fractions of the transmit power are appropriately allocated to the signals, relying on instantaneous channel gains between the selected relay and the destinations. This paper also derives exact closed-form formulas of outage probability and intercept probability over Rayleigh fading channel. All the performance analysis is then validated by Monte-Carlo simulations. The obtained results clearly show a trade-off between security and reliability that can be enhanced by optimally designing the system parameters.


I. INTRODUCTION
The network security is an important topic object of different studies by scientific community as shown in many papers existing in literature [1]- [3]. Conventionally, complex data encryption methods at the upper layers are used to obtain the secure communication. Recently, researchers have proposed a new secure communication approach for wireless communications networks (WCNs), named physical-layer The associate editor coordinating the review of this manuscript and approving it for publication was Usama Mir . security (PLS) [4]- [7]. In PLS, physical channel parameters, such as link distances, channel state information (CSI) of data and/or eavesdropping channels, artificial noises (ANs), can be exploited to obtain security. For example, Reference [8] evaluates probability of positive secrecy capacity (PSC) for a dual-hop decode-and-forward (DF) relaying protocol, where secrecy capacity is difference between instantaneous channel capacity of the data and eavesdropping links. In addition, the transmitters in [8] including source and relay generate different code-books so that an eavesdropper cannot apply maximal ratio combining (MRC) as decoding the received VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ signals. This randomize-and-forward (RaF) strategy is also used in [9] to enhance secure connectivity performance for cooperative wireless networks, with random appearance of eavesdroppers. In [10], [11], under impact of co-channel interference, various efficient relay selection methods are proposed to obtain better secrecy performance for DF and amplify-and-forward (AF) relaying protocols, respectively, in terms of PSC, secrecy outage probability (SOP) and average secrecy capacity (ASC). As shown in [10], [11], the relay selection methods provide higher channel capacity for the data links, which also leads to an increasing of secrecy capacity and the secrecy performance as well.
To further enhance quality of the data channels, transmitting and receiving diversity techniques in multiple input multiple output (MIMO) relaying systems are proposed in [12], [13].
Published works [14], [15] analyze the secrecy performance of secondary networks operating on an underlay cognitive radio (UCR) mode, where transmit power of secondary transmitters is constrained by a maximal interference level required by a primary network. The key techniques considered in [14], [15] are cooperative relaying and transmit antenna selection (TAS), respectively. References [16], [17] concern with radio frequency energy harvesting (RF-EH) wiretap networks, where wireless transmitters have to harvest energy from wireless signals of power beacon stations for sending their data. Different with [8]- [17] that aim at evaluating the secrecy performance based on secrecy capacity, references [18]- [20] evaluate performance of the PLS schemes via two important metrics: outage probability (OP) at legitimate receivers and intercept probability (IP) at eavesdroppers. In addition, the results obtained in [18]- [20] present that there exists a trade-off between IP and OP, and this security-reliability trade-off (SRT) can be improved by applying efficient relay selection approaches. The secrecy performance can be significantly enhanced by using cooperative jamming (CJ) technique [21], [22]. In CJ, one or multiple trusted nodes (called jammers) are assigned to transmit artificial noises (ANs) on eavesdroppers. Published literature [23] concerns with secrecy performance analysis of RF-EH wireless sensor networks (WSNs) employing CJ. Particularly, sensor nodes are powered by power stations deployed in the network, while a base station cooperates with a friendly jammer to discard ANs. In [24], the authors propose new zero-forcing beam-forming CJ methods for maximizing achievable secrecy rate, in presence of both passive and active eavesdroppers. In [25], [26], harvestto-jam (HoT) strategies in PLS RF-EH environments are proposed, where jammer nodes first harvest wireless energy from ambient sources, and then use this energy to emit ANs. Published work [25] employs HoT to obtain security for dual-hop AF relaying protocols. HoT-aided DF relaying protocol using jammer selection methods is reported in [26]. Moreover, reference [26] uses the RaF strategy to confound eavesdroppers. The SRT performance of WCNs using CJ is investigated in [27]- [29]. In [27], user-pair selection is proposed to enhance reliability of the data transmission, while CJ is used for the secrecy enhancement purpose. In addition, imperfect interference cancellation at the legitimate destinations due to CSI estimation error is taken into account as calculating the performance. The authors of [28], [29] proposes opportunistic DF relay selection approaches for the SRT performance improvement in CJ-aided secure two-way relaying networks.
Non-orthogonal multiple access (NOMA) is a potential solution for next generation of WCNs due to much high spectral efficiency and low latency [30]. Unlike traditional orthogonal multiple access technologies such as FDMA, TDMA and CDMA; NOMA allows transmitters send multiple signals to intended receivers at the same frequency, time and code. To realize this, the transmitters linearly combine analog signals that are assigned with different transmit power levels. Then, the superposition signals are sent to the receivers. For extracting the desired data, successive interference cancellation (SIC) is adopted by the receivers. Recently, PLS-based protocols using NOMA have been gained much attention of researchers. Reference [31] studies the SOP performance of PLS MIMO-NOMA networks employing max-min TAS strategies, with presence of multiple colluding and non-colluding eavesdroppers. Published work [32] concerns with secrecy performance evaluation of AF and DF relaying in cooperative down-link NOMA networks including one central base station, two users, one single-antenna relay and one cell-edge eavesdropper. Three re-active relay selection methods are considered in [33] to obtain better secrecy performance for cooperative NOMA protocols, as compared with traditional relay selection methods. In [34], both secrecy and throughput performance of RF-EH internet-of-things (IoT) networks are evaluated. Particularly, a multi-antenna NOMA base station sends its data to IoT destinations via assistance of untrusted EH-AF relays. Like [34], a secure NOMA protocol with multiple untrusted EH-AF relays is introduced in [35]. Different with [34], multiple-antenna source and multiple-antenna destination in [35] can use maximal ratio transmission (MRT) and MRC techniques for transmitting and receiving the signals from the relays, respectively. Reference [36] considers a secure up-link NOMA transmission with CJ and jammer selection. In [37], [38], HoT is applied in cooperative NOMA protocols operating in the RF-EH environment. Reference [39] focuses on the SRT performance analysis for cooperative NOMA UCR networks, in terms of connection OP and SOP.
Due to simplicity and low latency, Rateless codes (RCs or Fountain codes) [40], [41] can be efficiently deployed in WCNs, especially WSNs, IoT, etc., in which wireless devices are limited in power, size, storage and processing capacity. Employing RCs, a transmitter can generate a limitless number of encoded packets which are sent its receivers. When the receivers collect a sufficient number of packets, the original data can be correctly recovered. As a result, the RCs receivers do not require the transmitter to re-send any specific packets that are received correctly. Therefore, RCs can reduce delay time from the feedback as well as from the retransmission operation. Recently, PLS protocols adopting RCs have been reported in several publication such as [40]- [50] and references therein. For example, reference [40] shows that the original data is secure if a legitimate destination can gather enough number of packets before an eavesdropper. In [41], a DF relay is employed to forward the RCs packets to a destination, while a trusted relay plays a role as a jammer node to transmit noises on an eavesdropper. The authors in [41] evaluate qualityof-service violating probability (QVP) of the considered protocol, which is defined as probability of successful and secure receiving at the destination. In [42], four relay selection strategies are proposed to enhance reliability (OP) and/or security (IP) of the data transmission across two hops. Moreover, reference [42] studies efficient jammer selection algorithms to protect transmission of the RCs packets. Unlike [42], dual-hop DF relaying paradigm in [43] considered direct links from a source to a destination and to an eavesdropper. In addition, the authors in [43] propose a best relay selection method to minimize the QVP performance under a delay constraint. Reference [44] concerns with relay selection strategies for obtaining both reliability and security for RCs-based industrial IoT networks. The authors in [45] measure the IP and QVP performance of RCsassisted MIMO systems adopting both TAS and CJ. In [46], the TAS and HoT techniques are applied in secure down-link transmission protocols using RCs, under joint impact of cochannel interference and hardware imperfection. In addition, the EH jammer in [46] has to collect RF energy from both base station and interference sources for the CJ operation. In [47]- [49], adaptively secure transmission protocols employing RCs and feedback channels are proposed. Published work [50] conducts IP and QVP performance analysis of unmanned aerial vehicle (UAV) systems with presence of ground full-duplex eavesdropper and jammer nodes.
This paper concerns with a RCs-based secure protocol using NOMA and CJ in dual-hop DF relaying networks. In the proposed protocol, a source uses NOMA to simultaneously send two RCs packets to two destinations via help of available intermediate relays. To protect the sourcerelay and relay-destination transmission under presence of an eavesdropper, CJ is deployed by the relays and employed jammers (nodes are near two destinations). We also consider two partial relay selection (PRS) methods to enhance the reliability of the packet transmission as well as to reduce the complexity implementation, as compared with full relay selection (FRS) ones [51], [52]. Different with the related works [40], [45], [46] which focus on RCs-aided one-hop secure transmission; our proposed scheme considers the dualhop relaying one. Next, the main difference between our work and the related works [41]- [44] is the partial relay selection approaches and the CJ technique. Furthermore, the previous works [40]- [46] do not consider NOMA. The most related to our work is reference [53], in which NOMA is employed to directly send two RCs packets from a multiple-antenna source to multiple-antenna destination, using TAS/selection combining (SC) and TAS/MRC. However, the MIMO-NOMA paradigm in [53] only includes one destination, and does not exploit advantage of the CJ technique. Next, although reference [54] also studies the IP performance of secure relaying protocols employing RCs and CJ, but this work operates on cognitive environment, and a single-relay scheme is considered. Unlike [40]- [46], the relay in [54] does not forward each RCs packet to the destination. Instead, it attempts to recover the original data as soon as possible, so that it can replace the source to transmit the RCs packets to the destination.
To the best of our knowledge, there has been no published work related to the RCs-based secure transmission relaying protocol using NOMA, CJ and PRS. The proposed protocol can obtain better system performance, in terms of low delay time, high throughput, high spectral efficiency, low energy consumption, high reliability and high security. For reducing the delay time from end-to-end (also reducing the energy consumption, enhancing the throughput and spectral efficiency), the NOMA-based transmission is employed to send two encoded packets to two destinations at the same time, which also. To provide reliability for the transmission of the encoded packets, the PRS methods are used to obtain the spatial diversity at the first hop or the second hop. To obtain security for the original messages, the CJ technique is adopted at each hop to reduce quality of the eavesdropping links. In the following, new points and main contribution of this paper are summarized as follows: • Firstly, we consider two partial relay selection methods.
In the first one, the conventional PRS approach [55] is applied, where CSI between the source and relay nodes is used to select the best candidate. In the second one, we propose a new selection method, i.e., the relay is chosen by using CSI of the relay-destination links, and following a max-min criterion [55].
• Secondly, we consider a simple power allocation for the transmitters and the jammers. Moreover, to obtain performance fairness for the destinations, an adaptive power allocation approach for the transmitted signals is also proposed.
• Thirdly, exact closed-form expressions of OP and IP over Rayleigh fading channel are derived, and verified the accuracy by Monte Carlo simulations. Because the derived expressions are in closed-form, they can easily be used to evaluate and optimize the systems employing PRS-1 or PRS-2.
• Finally, the SRT performance of two proposed PRS protocols is investigated. In addition, performance comparison between our proposed protocols and the corresponding one without using CJ is also performed. The rest of this paper is organized as follows. The system model of our proposed scenarios and their operation principle are shown in Section II. Section III aims at evaluating the OP and IP performance. Section IV verifies the analytical results via the simulated ones. Finally, useful conclusions and discussion are given in Section V.

II. SYSTEM MODEL
As illustrated in Fig. 1, a source node (S) wants to send messages T 1 and T 2 to two destination nodes D 1 and D 2 , respectively. Due to far distances and obstacles, S cannot directly communicate with D i , and hence the S → D i communication is realized via help of available relays R m , where i = 1, 2 and m = 1, 2, . . . , M , M + 1. Particularly, one of these relays is selected for the cooperation by using the PRS algorithms. For ease of presentation, in Fig. 1, we denote the chosen relay by R b ≡ R M +1 (the relay selection methods will be described in Sub-section 2.3). Also in the network, a passive eavesdropper (E) attempts to wiretap the confidential messages T i . To protect the S → R b transmission, the remaining relays (i.e., R 1 , R 2 ,. . . ,R M ) are employed to emit ANs on E. Also, the R b → D secure transmission can be guaranteed by using friendly jammers J n (n = 1, 2, . . . , N ). Moreover, for the interference cancellation at the receivers R b and D i , the jammers R m and J n are assumed to be close to R b and D i , respectively. In addition, to confuse E, the S and R b nodes can cooperate with each other by using different code-books [8], [9]. It is also assumed that all the nodes are wireless single-antenna devices, and have to operate on a half-duplex (HD) mode. Our proposed protocol can be efficiently applied for WSNs, ad-hoc networks or IoT networks, in which there are a large number of nodes that can be employed for the cooperation in transmitting and jamming.

A. RATELESS CODES BASED DATA TRANSMISSION
Using RCs, the messages T i (i = 1, 2) are divided into L i short packets with equal length, respectively, which are used to generate the encoded packets. Next, S uses NOMA to send two encoded packets, e.g., q 1 [u] and q 2 [u], to D 1 and D 2 , respectively, where q i [u] denotes the u-th packets of D i , u = 1, 2, 3, . . .. Due to the HD limitation, each S → R b → D i transmission is split into two orthogonal time slots, i.e., S sends both q 1 [u] and q 2 [u] to R b at the first time slot, and then R b also uses NOMA to forward q 1 [u] and q 2 [u] (or only one packet, depends on the decoding status at R b ) to two destinations at the second time slot. To recover the original message T i , D i must collect at least H i (H i ≥ L i ) encoded packets q i [u]. Also, if E can obtain at least H i packets, T i is intercepted. Moreover, due to the delay constraint, the number of the Particularly, S will terminate its transmission after N max transmission times. It is also noted that if the D i and E nodes cannot receive enough H i packets, T i cannot be reconstructed successfully.
Remark 1: The proposed protocol can reduce the delay time, as compared with the corresponding protocol without using NOMA in which S has to send at least 2 × N max RCs packets to two destinations. For ease of analysis and presentation, we can assume that L 1 = L 2 = L and H 1 = H 2 = H . It is also noted that the proposed protocol can be easily extended to the corresponding ones with L 1 = L 2 (H 1 = H 2 ), as well as with higher number of the destinations.

B. CHANNEL MODEL
All the channels between two the nodes A and B are assumed to be block and flat Rayleigh fading, where (A, B) ∈ {S,R m ,J n ,D i , E}. We denote h AB and g AB as channel coefficient and channel gain of the A → B links, respectively, where g AB = |h AB | 2 . Therefore, g AB is an exponential random variable (RV) whose cumulative distribution function (CDF) and probability density function (PDF) can be expressed, respectively as where F g AB (.) and f g AB (.) refer to CDF and PDF of a RV g AB , respectively, and λ AB is modeled as [54], [55] with d AB is Euclid distance between A and B, and ξ (2 ≤ ξ ≤ 8) is path-loss exponent. Remark 2: Due to block fading channel, g AB is assumed to be unchanged during one transmission cycle, but independently varies over other ones. Next, since the relays are close together, we can assume that the distances between A and R m are the same, i.e., Similarly, it is also assumed that λ J n E = λ JE for all n when the J n nodes are close together.

C. PARTIAL RELAY SELECTION METHODS
Before S starts the data transmission, R b has to be selected for the cooperation. In the first relay selection approach, named PRS-1, the algorithm can be written, similarly to [55], as Equation (3) implies that R b is the best candidate if the channel gain g SR b is highest. Moreover, g SR b is also a RV, and its CDF can be obtained as In the second relay selection approach, named PRS-2, we propose a max-min strategy to provide high channel quality for both the R b → D 1 and R b → D 2 links. In particular, by letting ϕ m = min g R m D 1 , g R m D 2 , the selection algorithm is expressed as follows: Now, CDF of ϕ m can be calculated as where RD = λ SR + λ RD . According to (6), PDF of ϕ m is given as In addition, from (5) and (6), we obtain CDF of ϕ b as Then, from (8), PDF of ϕ b is shown as below: where C a b denotes a binomial coefficient, i.e., Remark 3: Although PRS-1 can enhance reliability of the data transmission at the first hop, the data transmission at the second hop may be not reliable when the relaydestination distances are far. On the contrary, PRS-2 can perform well when the relays are far the destinations because the relay selection is realized at the second hop. However, the performance of PRS-2 is not good when the relays are not close to the source. This paper only studies the PRS methods because their implementation is much simpler than the FRS one [55]. Indeed, the FRS method requires CSI of both the hops, which takes much time and energy due to a high synchronization and a complex CSI estimation. In addition, when the number of relays increases, the delay time and the energy consumption significantly increase. Therefore, the FRS method may be not suitable for the energy-constrained wireless networks such as WSNs and IoT. On the contrary, PRS-1 and PRS-2 only use CSI at the first hop and the second hop for selecting the best relay, respectively. It is worth noting that the partial CSI can be easily obtained via control messages generated at set-up phases and maintenance phases.

D. TRANSMIT POWER FORMULATION
For a fair performance comparison between the scenarios using different number of jammers, the total transmit power of the transmitter and jammer nodes, at the first and second time slots, is fixed by P tot , i.e., . We then consider a simple power allocation approach, where the transmit power of the jammer nodes is equally allocated, i.e., Remark 4: In (12), the factor µ is a pre-determined system parameter, where 0 < µ ≤ 1. It is worth noting that the CJ model with multiple jammer nodes is a generalized model, and this power allocation method guarantees an equal power consumption among the considered scenarios. Moreover, if the CJ technique is not used, µ is set to 1, and we have  Remark 5: In NOMA, it is commonly assumed that one of two destinations, (e.g., D 1 ) has better channel to the transmitters, ( e.g., D 1 (strong user) is near R b , and D 2 (week user) is far R b ). Therefore, during the data transmission, the factors a 1 and a 2 are always assigned by 0 < a 1 < a 2 < 1 and a 1 + a 2 = 1 (see [31], [33], [34]). However, this method can lead to a performance unfairness between D 1 and D 2 . In non-infrastructure networks such as WSNs, due to the limited transmit power, radio range of the wireless nodes is short. If all the nodes in this paper are sensors, the distances between the relays and two destinations, i.e., d RD 1 and d RD 2 , may be not much different. In this case, the conventional NOMA transmission models in [31], [33], [34] may not be applied. In addition, motivated by obtaining the performance fairness for two destinations, we propose an adaptive power allocation strategy as follows: where 0 ≤ β < α ≤ 1 and α + β = 1.
Note that the factors α and β are pre-designed system parameters. We also observe from (15) that when the R b → D 2 link is better than the R b → D 1 one, more transmit power should be allocated to the modulated signals of q 1 [u], and vice verse. Now, we consider the following two cases: In this case, the superposition signal in (14) becomes Recalling that during the S → R b transmission, the remaining relays emit ANs, and hence the signals received at R b and E can be expressed, respectively as . (17) In (17) Next, R b first decodes x 1 [u], and from (12) and (18), the effective signal-to-noise ratio (SNR) can be calculated as where = P tot σ 2 0 denotes the transmit SNR.
From (20), the obtained SNR for decoding With the same manner as R b , E first decodes x 1 [v], and then applies SIC to decode x 2 [v]. On the other hand, because E cannot remove ANs caused by the relays, the signalto-interference-plus-noise ratios (SINRs) obtained at E for decoding x 1 [v] and x 2 [v] can be respectively computed, based on (17), as cannot be correctly decoded by B. Moreover, because the channel coefficients do not change during the data transmission, the successful decoding probability of In the following, we present the data transmission between R b and D i in the second time slot in three sub-cases as Under the impact of ANs from J n , the signals at D i and E, can be expressed, respectively as where l n [v] is the v-th jamming signal of J n , and ε D i [v] is AWGN at D i . Then, after removing the interference components, (23) can be written as Since D 1 directly decodes x 1 [v], based on (12) and (24), the effective SNR can be formulated as For D 2 , x 1 [v] is first decoded, and then subtracted before decoding x 2 [v]. Hence, the effective SNRs, with respect to , are respectively obtained as (26) For E; since the interference cancellation cannot be carried out, based on (12) and (23), the obtained SINRs for decoding x 1 [v] and x 2 [v] can be given, respectively as

Case 1.2: Only q 1 [u] is correctly decoded
In this sub-case, R b only sends q 1 [u] to D 1 , using the transmit power P R b . Hence, the signals received at D 1 and E at the second time slot can be expressed, respectively as Also, only D 1 can perform the AN cancellation, and hence SNR at D 1 and SINR at E can be formulated, respectively as

Case 1.3: q 1 [u] (q 2 [u]) is unsuccessfully decoded
In this sub-case, R b cannot transmit any encoded packet to the destinations at the second time slot.
Case 2: In Case 2, the modulated signals of q 2 [u] are allocated with higher transmit power, i.e., x is first detected, and then removed by the receiver B before detecting At D 2 , q 2 [u] is directly detected by treating q 1 [u] as noises, and SNR is computed as For E, we can express the obtained SINRs as follows:

Case 2.2: Only q 2 [u] is correctly decoded
In this sub-case, R b sends q 2 [u] to D 2 . Similarly, SNR at D 2 and SINR at E can be formulated, respectively as

III. PERFORMANCE EVALUATION
This section focus on evaluating OP and IP of the methods PRS-1 and PRS-2. At first, we consider the probability that one encoded packet can be correctly received by D i and E in the PRS-i method (i=1,2).
A. PRS-1 METHOD Theorem 1: The probability that one encoded packet is successfully reached to D i in PRS-1 can be expressed by an exact closed-form expression as shown in (35), as shown at the bottom of the next page, where Proof: See the proof in Appendix A. Remark 7: As discussed in [53], to obtain high SNR for the priority signal x 1 [v] in Case 1, and for the priority signal x 2 [v] in Case 2 under impact of the interference from the remaining signal, the factors α and β should be designed as According to (37), it is straightforward that ω 2,th > ω 1,th > 0. It is also worth noting that the values of α and β are satisfied (37) in all the derivations in Section III. VOLUME 9, 2021 Theorem 2: The probability that the packet q i [u] is correctly decoded by E in PRS-1 can be given by an exact closed-form formula as in (38), as shown at the bottom of the page, where , Proof: See the proof in Appendix B. Next, we evaluate θ PRS−i Ti at high transmit SNR values, as in Corollary 1 below.
Corollary 1: At high transmit SNR, i.e., → +∞, θ PRS−1 Ti can be approximated by (40), as shown at the bottom of the next page.

B. PRS-2 METHOD
Theorem 3: The probability that one encoded packet is successfully reached to D i in PRS-2 can be expressed as in (41), as shown at the bottom of the next page, where Proof: See the proof in Appendix C. Theorem 4: The probability that q i [u] is correctly decoded by E in PRS-2 is given by (42), as shown at the bottom of the Proof: See the proof in Appendix D. Corollary 2: At high transmit SNR, θ PRS−2 Ti can be approximated by (43), as shown at the bottom of the next page.

C. ANALYSIS OF OP AND IP
Firstly, OP at D i in PRS-i can be exactly computed as where θ PRS−i Di is given in (35) and (41). In (44), because D i only collects N (0 ≤ N < H ) packets after S stops the transmission, it cannot recover the original message T i . It is worth noting that probability that D i in PRS-i incorrectly receives the packet q i [u] is 1 − θ PRS−i Di , and there are C N N max possible cases that q i [u] can be reached to D i successfully.
For the E node, IP of the message T i in PRS-i can be exactly calculated as where θ PRS−i Ei is calculated by (38) and (42).  In (45), because E can accumulate N (H ≤ N ) packets, the message T i is intercepted. In addition, probability that E in PRS-i incorrectly receives the packet q i [u] is 1 − θ PRS−i Ei , and there are C N N max possible cases that q i [u] can be reached to E successfully.
Remark 8: From (35), (38), (41) and (42), due to the symmetry, i.e., d RD 1  . This means that the proposed PRS-1 and PRS-2 methods can obtain the performance fairness for two destinations. Moreover, from (40), (43) and (45), it is straightforward that IP of PRS-1 and PRS-2 at high transmit SNR regimes is the same, and does not depend on .

IV. SIMULATION RESULTS
Section 4 presents Monte-Carlo simulations to verify the exact closed-form expressions of OP and IP of the PRS-1 and PRS-2 protocols. Both simulation and theoretical results are obtained by using computer software MATLAB. In each simulation, the Rayleigh channel coefficients of the X-Y links are generated by h XY = 1 √ 2λ XY × (randn (1, 1) + j × randn (1, 1)), where (X, Y) ∈ {S, R m , D 1 , D 2 , J n , E}, and randn(1,1) is a MATLAB function generating Gaussian distributed pseudo-random numbers with zero-mean and unit variance. In addition, 10 6 -10 7 trials are generated in each simulation so that the simulation results nicely converge to the theoretical ones which are presented by the derived expressions of OP and IP. As presented in Figs. 2-15, the simulation results verify the accuracy of the theoretical ones.
For illustration purpose only, all the nodes are placed into an Oxy plane, where S locates at (0,0), all the relays are at (x R , 0), position of D 1 is (1,0), all the jammer nodes (J n ) are placed at (1,0), and the E node is at (0.5,0.5). To present that the distances between the relays and two destinations are not much different, the destination D 2 is placed around the destination D 1 with the position of (x D2 , 0). As x D2 = 1, this means that two destinations have the same distance to the relays. Next, in all the simulations, the path-loss exponential (ξ ) is fixed by 3, the outage threshold (γ th ) is assigned by 1, and the required number of encoded packets (H ) is set by 5 (see Table 1). In all the figures, we denote Sim as Monte-Carlo simulation results, and Theory (Exact or Asymptotic) as the analytical results derived in Section III. Figure 2 presents the outage performance of PRS-1 and PRS-2 as a function of the transmit SNR ( ) in dB with  different positions of D 2 when M = N = 3, x R = 0.5, α = µ = 0.85 and N max = 6. As we can see, as increases (transmit power of the transmitters S and R b increases), the OP values of both PRS-1 and PRS-2 rapidly decrease. It is also seen from Fig. 2 that the OP performance at the destinations in PRS-1 is better than those in PRS-2. In addition, when D 2 is at (0.9,0), D 2 in PRS-1 obtains lower OP than D 1 , but in PRS-2, the OP performance of D 1 is better. When x D2 = 1, we observe that OP of D 2 in PRSi (i = 1, 2) is equal to that of D 1 (as stated in Remark 8) because the distances between two destinations to R b are the same. Therefore, it is important to point out that the position of D 2 not only impacts on its OP but also impacts on OP of D 1 .  Figure 3 presents IP as a function of in dB with the same system parameters as in Fig. 2 so that we can observe the trade-off between IP and OP. We first see that the IP values in PRS-1 and PRS-2 increase with the increasing of , and at high regions, they converge to the approximate results (as proved in Corollary 1 and Corollary 2). Next, it is shown that IP of the original data T i (i = 1, 2) in PRS-1 is higher than the corresponding one in PRS-2. Moreover, when x D2 = 0.9, in both PRS-1 and PRS-2, IP of T 1 is higher than that of T 2 . Similar to the OP performance, as x D2 = 1, IP of two messages T 1 and T 2 is the same.
From Figs. 2-3, it is interesting to find that as x D2 = 1, PRS-i provides the performance fairness between two destinations, in terms of OP and IP. In addition, there exists a trade-off between reliability and security, i.e., to obtain better OP performance, the transmit power of the source and relay nodes should be higher, however, the corresponding IP performance is worse. For another example, due to the lower IP performance, PRS-2 can be selected to deploy in the considered network, and the tradeoff here is the OP-performance loss, as compared with PRS-1. Moreover, the obtained results in Figs. 2 and 3 can be used to optimally adjust the transmit power of the source and the selected relay. For example, we consider a wireless system using PRS-1, in which x D2 = 0.9 and quality of service (QoS) is that OP at two destinations must be below 0.01. From Figs. 2-3, we can see that the minimum value of is about 10 dB so that the desired QoS is guaranteed and the IP value is minimum. It is worth noting that minimizing the transmit power means enhancing energy efficiency for the considered system.
In Figs. 4-5, we present the OP and IP performance as a function of x D2 , respectively, when = 15 dB, M = 5, N = 2, x R = 0.5, α = 0.9 and µ = 0.7. As shown in Figs. 4-5, we can see that the position of D 2 also impacts on OP and IP of PRS-1 and PRS-2. Again, it is seen that the OP performance of PRS-1 is better than that of PRS-2, but the IP performance of PRS-1 is worse. In addition, when N max increases, PRS-1 and PRS-2 obtain better OP performance, but their IP performance is worse. It is due to the fact that the D 1 , D 2 and E nodes have more opportunity to collect enough encoded packets as the number of transmission times at the source increases. Also, as x D2 = 1, two destinations in PRS-1 and PRS-2 receive the same OP and IP values. It is worth noting from Figs. 4-5 that the performance gaps between two destinations increase as the difference between the d RD 1 and d RD 2 distances increases (or |1 − x D2 | increases). Similar to Figs. 2-3, we also give an example of using the obtained results to design the system. Considering the system whose QoS has to be satisfied that OP of the D 1 and D 2 destination must be below 0.01, and IP of the T 1 and T 2 messages must be below 0.3. From Figs. 4-5, we can observe that only the OP and IP performance of PRS-1 satisfy the required QoS when the value of N max is 6 and the position of D 2 is constrained by 0.95 ≤ x D2 ≤ 1.05. Figures 6 and 7 respectively present the OP and IP performance of PRS-i as a function of x R , with different values of M (i.e., M = 1, 4). The remaining system parameters are fixed as follows: = 7.5 dB, N = 2, x D2 = 1, α = 0.8, µ = 0.75 and N max = 6. Because x D2 = 1, the OP and IP performance of two the destinations in PRS-i are the same. As observed in Figs. 6-7, the position of the relays significantly impacts on the OP and IP values. Particularly, in Fig. 6, OP in PRS-1 is much lower than that in PRS-2 as the relays are near the destinations (x R is high). On the contrary, PRS-2 obtains better OP performance as the source-relay distances are short (x R is low). It is due to the fact that when x R is high, the data transmission at two hops VOLUME 9, 2021  in PRS-1 is reliable, i.e., the channel quality of the first hop is enhanced by the relay selection, and that of the second hop is also better due to the short distances between the selected relay and two destinations. On the contrary, with high x R values, the data transmission at the first hop in PRS-2 is less reliable due to the far distance between the source and the selected relay, which hence decreases the OP performance of PRS-2. Next, as x R changes from 0.1 to 0.9, there exist optimal positions at which OP of PRS-i is lowest. For example, with M = 1, the OP performance of PRS-1 and PRS-2 is best when x R = 0.6 and x R = 0.35, respectively. Also seen from Fig. 6, the OP performance can be significantly improved by increasing the number of relays. However, when the relays are very near the source (destinations), the OP values in PRS-1 (PRS-2) are the same, regardless of the value of M . In Fig. 7, we can see that the IP performance of PRS-2 is better than that of PRS-1. In addition, when x R ∈ {0.4, 0.6}, the IP values are too high. It is due to the fact that at these positions, the distances between the relays and the eavesdropper are short, which improves quality of the relay-eavesdropper channels.It is also found in Fig. 7 that IP of PRS-1 and PRS-2 is much lower as M equals to 4.
From Figs. 6-7, it is worth noting that both OP and IP performance can be enhanced by increasing the number of relays. Moreover, the position of the relays should be carefully designed to optimize the system performance. For example, if the desired OP must be lower than 0.01, then looking at Fig. 6, the appropriate positions of the relays are 0.2 ≤ x R ≤ 0.3 (in PRS-2 with M = 4), and 0.65 ≤ x R ≤ 0.85 (in PRS-1 with M = 4). Then, using the results in Fig. 7, it can be found that when x R = 0.85 and x R = 0.2, the corresponding IP values in PRS-1 and PRS-2 are respectively lowest.  Fig. 8, PRS-1 obtains better OP performance when x R ≥ 0.55. When µ = 0.75, it can be seen that the OP performance of PRS-1 (PRS-2) is best when x R is highest (lowest). When CJ is not employed (denoted by Non-CJ), i.e., µ = 1, the OP values of PRS-1 and PRS-2 are too high. It is due to the fact that without using CJ, the intercept possibility of the eavesdropper  is enhanced. Therefore, to obtain IP = 0.25, the transmitters in Non-CJ (including the source and the selected relay) have to reduce their transmit power significantly, which increases the OP values of PRS-1 and PRS-2.
From Figs. 6-8, we can see that the position of the relays can be used to determine that the PRS-1 protocol or the PRS2 protocol is better. In practice, PRS-1 or PRS-2 can be selected, relying on the specific positions of the relays.
In Figs. 9-10, we investigate impact of the power split factor α on the OP and IP performance, respectively, when = 25 dB, M = 5, N = 3, x D2 = 1.2, x R = 0.35 and N max = 5. Firstly, recalling (37); with γ th = 1, we have α > 2 3. This is the reason why the value of α only changes from 0.7 to 0.95 as presented in Figs. 9-10. Figure 9 shows that the OP performance in PRS-1 and PRS-2 slightly changes as α varies. It is also seen that OP of PRS-2 is better than that of PRS-1 because the relays are near the source (x R = 0.35). In PRS-1 (PRS-2), the OP performance of D 1 (D 2 ) is better that of D 2 (D 1 ). Moreover, as α increases, the OP values in PRS-1 decrease, but those in PRS-2 increase. Next, we can see that the OP performance of PRS-1 and PRS-2 is better, follows the increasing of µ, due to higher transmit power of the source and relay nodes.
In Fig. 10, we can see that the IP values of PRS-1 and PRS-2 at high transmit SNR ( = 25 dB) are the same, which validates the derived expressions (40) and (43). It is also shown in Fig. 10 that the IP values of T 2 are lower than those of T 1 for all α. In addition, the IP performance is better with the lower value of µ because transmit power of the jammer nodes at the first and second hops is higher. From  Figures 9 and 10, we again see the trade-off between OP and IP as changing the values of α and µ. Figures 11 and 12 investigate impact of the factor µ on the OP and IP trade-off when = 5 dB, x D2 = 1, x R = 0.75, α = 0.85 and N max = 5. In Fig. 11, the OP performance of PRS-1 is much better than that of PRS-2 because the relays are placed close to the destinations, i.e., x R = 0.75. Moreover, similar to Fig. 6, it is again seen that the OP values in PRS-2 are the same for all values of M when x R is high. For PRS-1, as expected, OP is lower with the increasing of M . Different with OP, the IP performance of PRS-1 is worse than that of PRS-2. We also observe from Fig. 12 that the number of the jammer nodes (M and N ) also affects on IP. In particular, PRS-2 obtains lower IP as the values of M and N increase. However, the IP values in PRS-1 only change slightly with different values of M and N . Similar to Figs. 8-10, when the factor µ increases, the OP performance of the proposed protocols is better, but the IP performance is  degraded. As we can see, Non-CJ obtains the highest OP performance, however its IP performance is worst.
To show more clearly the SRT performance between PRS-1 and PRS-2, Figures 13-15 Fig. 13, to obtain lower target OP value, all the considered methods have to receive higher IP value. It is worth noting that when the target OP is very low, the transmit SNR is high, and hence IP of PRS-1 and PRS-2 converges the asymptotic values. Figure 13 also shows that PRS-2 provides better SRT performance, and at medium and high target values of OP, IP of PRS-2 is much lower than that of PRS-1. Next, it is interesting to find that the SRT performance of PRS-i is degraded as N max increases. As we can see, the SRT performance, with N max = 5, is much better than that with N max = 6 and 7. Figure 14 investigates impact of µ on the SRT performance when M = 3, N = 3, N max = 5, x D2 = 1, α = 0.9 and x R = 0.65. It is seen that PRS-1 obtains better SRT performance as the relays are located at (0.65,0). Also in this figure, it is illustrated that the IP values of all the considered protocols significantly increases with the decreasing of µ. This also implies that the SRT performance can be enhanced by decreasing the transmit power of the transmitters and increasing that of the jammer nodes.
In Fig. 15, the SRT performance is presented with different positions of the relays, with and without using CJ (µ = 1). The remaining parameters are fixed as M = 4, N = 3, N max = 6, x D2 = 1, α = 0.85 and µ = 0.75. Observing the Non-CJ protocols, we see that their SRT performance is worst, and in addition, the IP values are almost equal to 1 at medium and low target OP regions. Figure 15 also presents that the position of the relays significantly impacts on the system performance, i.e., when x R = 0.25, PRS-2 obtains better SRT performance, but IP of PRS-1 is lower when x R = 0.75. Therefore, from Figs. 13-15, we can see that the SRT performance of PRS-1 is better than that of PRS-2 when the relays are near the destinations, and vice verse.

V. CONCLUSION
In this paper, we proposed the RCs-based secure transmission protocol using NOMA, CJ and PRS to enhance the performance for dual-hop DF relaying networks, in terms of low complexity and latency, high reliability, throughput and security. The proposed protocol also obtained the performance fairness for two destinations via the adaptive power allocation method. We evaluated the OP and IP performance of the proposed protocol via both theory and simulations, which were always in the excellent agreement. The results presented that PRS-1 is better than PRS-2 when the relays are near the destinations, and vice verse. The obtained results also showed that the CJ technique plays a key role in the proposed protocol. In addition, the OP and IP performance can be significantly enhanced by optimally designed positions of the relays, transmit power allocated to the transmitter and jammer nodes, and number of the relays and jammers. For the OP-IP tradeoff, the SRT performance was better with lower transmit power, low number of transmission times of encoded packets and higher number of relays. Furthermore, our proposed protocols obtained much better SRT performance, as compared with the corresponding Non-CJ ones. In future, we will develop and analyze the proposed protocols over generalized fading channels such as Nakagami-m, Rician, etc.

APPENDIX A PROOF OF THEOREM 1
Considering D 1 ; we note that in order that one encoded packet (i.e., q 1 [u]) is successfully reached to D 1 , R b has to correctly decode it from S at the first time slot. Hence, probability of the successful decoding of one packet at D 1 can be formulated as in (A.1), as shown at the bottom of the page.
In (A.1), ρ 1 is the successfully decoding probability at D 1 in Case 1.1, i.e., both q 1 [u] and q 2 [u] are correctly obtained by R b at the first time slot, and q 1 [u] is correctly received by D 1 at the second time slot. Substituting (19), (21) and (25) into (A.1), ρ 1 can be expressed under the following form: where ω 1,th and ω 2,th are given by (36), and 0 < ω 1,th < ω 2,th (see (37)). Next, Pr g SR b ≥ ω 2,th in (A.2) can be exactly computed by using (4) as , it can be further expressed as Substituting PDFs of g R b D 1 and g R b D 2 into (A.4), after some manipulation, we obtain Next, ρ 2 in (A.1) refers to the event that D 1 correctly obtains q 1 [u] in Case 1.2, where only q 1 [u] is successfully received by R b in the first time slot. We then rewrite ρ 2 as where ω 3,th is given by (36). Then, after some algebraic calculation, we obtain (A. 7), as shown at the bottom of the page.
As marked in (A.1), ρ 3 is the event that q 1 [u] is correctly reached to D 1 in Case 2, under the condition that both . Furthermore, by replacing λ RD 1 and λ RD 2 in θ PRS−1 D1 by λ RD 2 and λ RD 1 , respectively, we can obtain the probability that D 2 can successfully obtain can be expressed as in (35).

APPENDIX B PROOF OF THEOREM 2
The probability that E correctly obtains q 1 [u] is formulated as in (B.1), as shown at the bottom of the page. Firstly, In (B.1), Pr γ C1 SE,x 1 ≥ γ th is probability that E can correctly obtain q 1 [u] from S in Case 1, and we further obtain where ω 4,th is given by (39). As marked in (B.1), χ 1 refers to the event that q 1 [u] is intercepted by E in the second time slot. This means that E cannot obtain q 1 [u] from S in the first time slot, and we have where ω 5,th is given by (39). Similar to (B.3), we have For χ 2 in (B.1), this is probability that E cannot obtain q 1 [u] from S, but it can obtain it from R b in Case 1.2. Similarly, χ 2 can be calculated as in (B.6), as shown at the bottom of the page, where ω 6,th is obtained by (39).
Next, we consider probability that E can correctly receive q 1 [u] from S in Case 2 (see χ 3 in (B.1)). In addition, χ 3 can be exactly computed by (B.7), as shown at the bottom of the page, where ω 7,th is given by (39), and from (37) Using (B.9), we can calculate χ 4,1 in (B.8) as in (B.10), as shown at the bottom of the page. Then, the obtained results in (B.8) and (B.10), χ 4 is given as in (B.11), as shown at the bottom of the page.
Next, χ 5 in (B.1) is probability that E correctly receives q 1 [u] from R b in Case 2.1 when E cannot decode both q 2 [u] and q 1 [u] from S. We then obtain χ 5  is also obtained, and we then have the desired expression of θ PRS−1 Ti as shown in (38).

APPENDIX C PROOF OF THEOREM 3
Similar to Appendix A, θ PRS−2 D1 can be formulated as Because PRS-2 uses CSIs at the second hop for the relay selection, g SR b is only an exponential RV. Hence, we have Pr g SR b ≥ ω 2,th = 1 − F g SR b ω 2,th = exp −λ SR ω 2,th , Pr ω 1,th ≤ g SR b < ω 2,th = F g SR b ω 2,th − F g SR b ω 1,th = exp −λ SR ω 1,th − exp −λ SR ω 2,th . (C.2) Next, considering Pr g R b D 1 ≤ g R b D 2 , g R b D 1 ≥ ω 1,th in (C.1); we note that RVs g R b D 1 and g R b D 2 are not independent because they have the joint PDF f ϕ b (x) given in (9). Hence, to calculate Pr g R b D 1 ≤ g R b D 2 , g R b D 1 ≥ ω 1,th , we have to apply the method proposed in [51], [52], [55], i.e., Pr where Q 1 (x) is given by (C.4), as shown at the bottom of the next page. Then, we have Substituting (C.5), (7) and (9) into (C.3), after some manipulation, which yields Pr RD exp − (p + 1) RD ω 1,th .