1 Introduction

Since mobile user spend significant amounts of time in vehicles, the mobile vehicular computing and communication applications have increased dramatically in recent years [1,2,3]. Mobile vehicular communication has attracted wide research interest in the development of a wide range of applications based on user quality of experience (QoE) [4,5,6].

To support various types of mobile vehicular applications, the fifth generation (5G) mobile communication technologies are promising candidates [7]. A novel and practical 5G-enabled smart collaborative vehicular network architecture was introduced in [8]. [9] exploited 5G mmWave communication for vehicle positioning.5G-enabled software defined vehicular networks were proposed in [10].

Due to the vehicular user mobility, the physical layer security of 5G mobile vehicular networks is of significant interest [11,12,13]. An integrated network architecture was proposed for secure group communication in vehicular networks [14]. Based on a cooperative authentication method, [15] proposed an anonymous authentication protocol for vehicular networks. Closed-form expressions for the probability of strictly positive secrecy capacity (SPSC) over Rician fading channels were derived in [16], and secrecy outage probability (SOP) over correlated log-normal fading channels was investigated in [17]. In [18], the probability of SPSC with multiple eavesdroppers over log-normal fading channels. Closed-form expressions for the probability of SPSC and a lower bound on the SOP over generalized Gamma fading channels were derived in [19]. In [20], in the presence of an eavesdropper, the transmission of confidential messages in a single-input multiple-output (SIMO) system over identically independent Generalized-K fading channels was investigated. The physical-layer security of cooperative wireless networks with amplify-and-forward (AF) and decode-and-forward (DF) relaying were investigated in [21]. In [22], the outage probability (OP) of single-relay and multi-relay selection schemes in the presence of an eavesdropper was analyzed. [23] investigated the secure performances over non-small-scale fading channels, considering the independent log-normal fading, correlated lognormal fading, or independent composite fading. [24] proposed two schemes to improve the sum rate of secondary users (SUs) while guaranteeing the secrecy rate of primary user (PU). By aligning the jamming signal together with interference among users cooperatively, an anti-jamming scheme was proposed in [25]. The authors proposed an artificial noise assisted interference alignment scheme with wireless power transfer in [26].

However, the effects of mobile communication is far severe than what can be modeled using the classical Rayleigh, Rician, Nakagami, log-normal and Generalized-K fading channels. They are not the best channel models for practical mobile scenarios. The N-Rayleigh and N-Nakagami fading channels were adopted in [27,28,29] to provide a realistic mobile channel model. In [30,31,32], the OP performance of mobile cooperative networks with incremental AF and DF protocols was investigated.

To date, research on physical layer security has focused on Rayleigh, Rice, Nakagami-m log-normal and Generalized-K fading channels. To the best of our knowledge, physical layer security over N-Nakagami fading channels has not been considered in the literature. As a consequence, the main contributions of this paper are as follows:

  1. 1.

    For practical mobile scenarios, it is well known that N-Nakagami fading channels are more general and flexible, and include the Rayleigh and Nakagami-m fading channels. Thus, we investigate the secrecy performance of the mobile vehicular networks model over N-Nakagami fading channels.

  2. 2.

    Closed-form expressions are derived for the average secrecy capacity (ASC), a lower bound on the SOP, and the probability of SPSC over N-Nakagami fading channels.

  3. 3.

    Monte-Carlo simulation is used to verify the accuracy of the theoretical results obtained.

The rest of the paper is organized as follows. The mobile vehicular networks model is presented in Section 2, and closed-form expressions for the ASC are derived in Section 3. A lower bound on the SOP and the probability of SPSC are presented in Sections 4 and 5, respectively. Monte-Carlo simulation results are provided in Section 6 to verify the analysis in the previous sections. Finally, some concluding remarks are given in Section 7.

2 System model

The mobile vehicular networks model is shown in Fig. 1. It consists of a mobile source (S) vehicle, a mobile eavesdropper (E) vehicle, and a mobile destination (D) vehicle, all of which are equipped with a single antenna. The S vehicle acts as a legal transmitter, the D vehicle acts as a legitimate receiver. When the S vehicle communicates with the D vehicle, the E vehicle can wiretap the information.

Fig. 1
figure 1

The system model

We use h = hk, k∈{D,E}, to represent the complex channel coefficients of the S → D and S → E links, respectively. The probability density function (PDF) of h is given as [28].

$$ {\left.f(h)=\frac{2}{h\prod \limits_{i=1}^N\varGamma \left({m}_i\right)}{G}_{0,N}^{N,0}\Big[{h}^2\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i}\right|}_{m_1,\dots, {m}_N}^{-}\Big] $$
(1)

where G[·] is Meijer’s G-function.

S transmits the signal x, and the received signals rD and rE are given as

$$ {r}_{\mathrm{D}}=\sqrt{G_{\mathrm{D}}E}{h}_{\mathrm{D}}x+{n}_{\mathrm{D}} $$
(2)
$$ {r}_{\mathrm{E}}=\sqrt{G_{\mathrm{E}}E}{h}_{\mathrm{E}}x+{n}_{\mathrm{E}} $$
(3)

where E is the energy used by S, the mean and variance of nD and nE are 0 and N0/2.Here, we use GD and GE to represent the relative geometrical gain of the S → D channel and the S → E channel, respectively [33].

D receives the signal-to-noise ratio (SNR) as

$$ {\gamma}_{\mathrm{D}}=K{G}_{\mathrm{D}}{\left|{h}_{\mathrm{D}}\right|}^2\overline{\gamma} $$
(4)
$$ \overline{\gamma}=\frac{E}{N_0} $$
(5)
$$ \overline{\gamma_{\mathrm{D}}}=K{G}_{\mathrm{D}}\overline{\gamma} $$
(6)

where K is the relative SNR gain.

The received SNR at the E is given as

$$ {\gamma}_{\mathrm{E}}={G}_{\mathrm{E}}{\left|{h}_{\mathrm{E}}\right|}^2\overline{\gamma} $$
(7)
$$ \overline{\gamma_{\mathrm{E}}}={G}_{\mathrm{E}}\overline{\gamma} $$
(8)

The cumulative distribution function (CDF) of γk is given as

$$ {\left.{F}_{\gamma_k}(r)=\frac{1}{\prod \limits_{i=1}^N\varGamma \left({m}_i\right)}{G}_{1,N+1}^{N,1}\Big[\frac{r}{\overline{\gamma_k}}\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i}\right|}_{m_1,\dots, {m}_N,0}^1\Big] $$
(9)

and the corresponding PDF is given as

$$ {\left.{f}_{\gamma_k}(r)=\frac{1}{r\prod \limits_{i=1}^N\varGamma \left({m}_i\right)}{G}_{0,N}^{N,0}\Big[\frac{r}{\overline{\gamma_k}}\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i}\right|}_{m_1,\dots, {m}_N}^{-}\Big] $$
(10)

3 Average secrecy capacity

The instantaneous secrecy capacity is given as [34].

$$ {C}_{\mathrm{S}}=\max \left\{\ln \left(1+{\gamma}_{\mathrm{D}}\right)-\ln \left(1+{\gamma}_{\mathrm{E}}\right),0\right\} $$
(11)

The average secrecy capacity (ASC) is the average of Cs. The ASC is given as

$$ {\displaystyle \begin{array}{c}\overline{C_{\mathrm{S}}}={\int}_0^{\infty }{\int}_0^{\infty }{C}_{\mathrm{S}}\left({\gamma}_{\mathrm{D}},{\gamma}_{\mathrm{E}}\right)f\left({\gamma}_{\mathrm{D}},{\gamma}_{\mathrm{E}}\right)d{\gamma}_{\mathrm{D}}d{\gamma}_{\mathrm{E}}\\ {}={\int}_0^{\infty }{\int}_0^{\infty }{C}_{\mathrm{S}}\left({\gamma}_{\mathrm{D}},{\gamma}_{\mathrm{E}}\right)f\left({\gamma}_{\mathrm{D}}\right)f\left({\gamma}_{\mathrm{E}}\right)d{\gamma}_{\mathrm{D}}d{\gamma}_{\mathrm{E}}\\ {}={\int}_0^{\infty}\ln \left(1+{\gamma}_{\mathrm{D}}\right){f}_{\mathrm{D}}\left({\gamma}_{\mathrm{D}}\right){F}_{\mathrm{E}}\left({\gamma}_{\mathrm{D}}\right)d{\gamma}_{\mathrm{D}}\\ {}+{\int}_0^{\infty}\ln \left(1+{\gamma}_{\mathrm{E}}\right){f}_{\mathrm{E}}\left({\gamma}_{\mathrm{E}}\right){F}_{\mathrm{D}}\left({\gamma}_{\mathrm{E}}\right)d{\gamma}_{\mathrm{E}}\\ {}-{\int}_0^{\infty}\ln \left(1+{\gamma}_{\mathrm{E}}\right){f}_{\mathrm{E}}\left({\gamma}_{\mathrm{E}}\right)d{\gamma}_{\mathrm{E}}\\ {}={V}_1+{V}_2-{V}_3\end{array}} $$
(12)

With the help of [35], V1 is given as

$$ {\displaystyle \begin{array}{l}{V}_1=\frac{1}{\prod \limits_{i=1}^N\varGamma \left({m}_i\right)\prod \limits_{j=1}^N\varGamma \left({m}_j\right)}\times \\ {}{\int}_0^{\infty}\ln \left(1+{\gamma}_{\mathrm{D}}\right)\frac{1}{\gamma_{\mathrm{D}}}{G}_{0,N}^{N,0}\left[\frac{\gamma_{\mathrm{D}}}{\overline{\gamma_{\mathrm{D}}}}\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i}{\left|{}_{m_1,\dots, {m}_N}^{-}\left]{G}_{1,N+1}^{N,1}\right[\frac{\gamma_{\mathrm{D}}}{\overline{\gamma_{\mathrm{E}}}}\prod \limits_{j=1}^N\frac{m_j}{\varOmega_j}\right|}_{m_1,\dots, {m}_N,0}^1\right]d{\gamma}_{\mathrm{D}}\\ {}=\frac{1}{\prod \limits_{i=1}^N\varGamma \left({m}_i\right)\prod \limits_{j=1}^N\varGamma \left({m}_j\right)}\times \\ {}{\int}_0^{\infty }{G}_{2,2}^{1,2}\left({\left.{\gamma}_{\mathrm{D}}\right|}_{1,0}^{1,1}\right)\frac{1}{\gamma_{\mathrm{D}}}{G}_{0,N}^{N,0}\left[\frac{\gamma_{\mathrm{D}}}{\overline{\gamma_{\mathrm{D}}}}\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i}{\left|{}_{m_1,\dots, {m}_N}^{-}\left]{G}_{1,N+1}^{N,1}\right[\frac{\gamma_{\mathrm{D}}}{\overline{\gamma_{\mathrm{E}}}}\prod \limits_{j=1}^N\frac{m_j}{\varOmega_j}\right|}_{m_1,\dots, {m}_N,0}^1\right]d{\gamma}_{\mathrm{D}}\\ {}=\frac{1}{\prod \limits_{i=1}^N\varGamma \left({m}_i\right)\prod \limits_{j=1}^N\varGamma \left({m}_j\right)}\times \\ {}{G}_{2,2:0,N:1,N+1}^{2,1:N,0:N,1}\left[\begin{array}{c}0,1\\ {}0,0\end{array}|\begin{array}{c}-\\ {}{m}_1,\dots, {m}_N\end{array}|\begin{array}{c}1\\ {}{m}_1,\dots, {m}_N,0\end{array}|\frac{1}{\overline{\gamma_{\mathrm{D}}}}\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i},\frac{1}{\overline{\gamma_{\mathrm{E}}}}\prod \limits_{j=1}^N\frac{m_j}{\varOmega_j}\right]\end{array}} $$
(13)

V2 is given as

$$ {\displaystyle \begin{array}{l}{V}_2=\frac{1}{\prod \limits_{i=1}^N\varGamma \left({m}_i\right)\prod \limits_{j=1}^N\varGamma \left({m}_j\right)}\times \\ {}{G}_{2,2:0,N:1,N+1}^{2,1:N,0:N,1}\left[\begin{array}{c}0,1\\ {}0,0\end{array}|\begin{array}{c}-\\ {}{m}_1,\dots, {m}_N\end{array}|\begin{array}{c}1\\ {}{m}_1,\dots, {m}_N,0\end{array}|\frac{1}{\overline{\gamma_{\mathrm{E}}}}\prod \limits_{j=1}^N\frac{m_j}{\varOmega_j},\frac{1}{\overline{\gamma_{\mathrm{D}}}}\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i}\right]\end{array}} $$
(14)

and V3 is given as

$$ {V}_3=\frac{1}{\prod \limits_{j=1}^N\varGamma \left({m}_j\right)}{G}_{2,N+2}^{N+2,1}\left[{\left.\frac{1}{\overline{\gamma_{\mathrm{E}}}}\prod \limits_{j=1}^N\frac{m_j}{\varOmega_j}\right|}_{m_1,\dots, {m}_N,0,0}^{0,1}\right] $$
(15)

4 Secrecy outage probability

The SOP is the probability that the instantaneous secrecy capacity falls below a target threshold,which an important performance measure. The SOP is given as

$$ {\displaystyle \begin{array}{c}{F}_{\mathrm{S}\mathrm{OP}}=\Pr \left({C}_{\mathrm{S}}\left({\gamma}_{\mathrm{D}},{\gamma}_{\mathrm{E}}\right)<{\gamma}_{\mathrm{th}}\right)\\ {}=\Pr \left({\gamma}_{\mathrm{D}}<\beta {\gamma}_{\mathrm{E}}+\beta -1\right)\\ {}={\int}_0^{\infty }{F}_{\mathrm{D}}\left(\beta {\gamma}_{\mathrm{E}}+\beta -1\right){f}_{\mathrm{E}}\left({\gamma}_{\mathrm{E}}\right)d{\gamma}_{\mathrm{E}}\end{array}} $$
(16)
$$ \beta =\exp \left({\gamma}_{\mathrm{th}}\right) $$
(17)

where γth is a secrecy capacity threshold. The integral in (16) has no closed-form form because of Meijer’s G-function. With the aid of the results in [36,37,38], a lower bound on the SOP can be obtained as

$$ {\displaystyle \begin{array}{l}\begin{array}{c}{F}_{\mathrm{SOPL}}=\Pr \left({\gamma}_{\mathrm{D}}<\beta {\gamma}_{\mathrm{E}}\right)\\ {}={\int}_0^{\infty }{F}_{\mathrm{D}}\left(\beta {\gamma}_{\mathrm{E}}\right){f}_{\mathrm{E}}\left({\gamma}_{\mathrm{E}}\right)d{\gamma}_{\mathrm{E}}\\ {}=\frac{1}{\prod \limits_{i=1}^N\varGamma \left({m}_i\right)\prod \limits_{j=1}^N\varGamma \left({m}_j\right)}\times \end{array}\\ {}{G}_{N+1,N+1}^{N+1,N}\left[{\left.\frac{\overline{\gamma_{\mathrm{D}}}}{\beta \overline{\gamma_{\mathrm{E}}}}\frac{\prod \limits_{j=1}^N\frac{m_j}{\varOmega_j}}{\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i}}\right|}_{m_1,\dots, {m}_N,0}^{1-{m}_1,\dots, 1-{m}_N,1}\right]\end{array}} $$
(18)

5 Probability of SPSC

The probability of SPSC means the existence of secrecy capacity,which is a fundamental benchmark in secure communications. It is given as

$$ {\displaystyle \begin{array}{c}{F}_{\mathrm{S}\mathrm{PNC}}=\Pr \left({C}_{\mathrm{S}}\left({\gamma}_{\mathrm{D}},{\gamma}_{\mathrm{E}}\right)>0\right)\\ {}=\Pr \left({\gamma}_{\mathrm{D}}>{\gamma}_{\mathrm{E}}\right)\\ {}=1-{\int}_0^{\infty }{F}_{\mathrm{D}}\left({\gamma}_{\mathrm{E}}\right){f}_{\mathrm{E}}\left({\gamma}_{\mathrm{E}}\right)d{\gamma}_{\mathrm{E}}\end{array}} $$
(19)

and substituting (9) and (10) in (19) gives

$$ {\displaystyle \begin{array}{l}{F}_{\mathrm{SPNC}}=1-\frac{1}{\prod \limits_{i=1}^N\varGamma \left({m}_i\right)\prod \limits_{j=1}^N\varGamma \left({m}_j\right)}\times \\ {}{G}_{N+1,N+1}^{N+1,N}\left[{\left.\frac{\overline{\gamma_{\mathrm{D}}}}{\overline{\gamma_{\mathrm{E}}}}\frac{\prod \limits_{j=1}^N\frac{m_j}{\varOmega_j}}{\prod \limits_{i=1}^N\frac{m_i}{\varOmega_i}}\right|}_{m_1,....,{m}_N,0}^{1-{m}_1,....,1-{m}_N,1}\right]\end{array}} $$
(20)

6 Numerical results

In this section, Monte-Carlo simulation results are presented to confirm the analysis in the previous sections. Figure 2 presents the ASC performance versus K for \( \overline{\gamma} \)=10 dB. The simulation parameters are given in Table 1. Combinations of mD and mE are denoted as (mD, mE). Figure 2 shows that the Monte-Carlo simulation results match very well with the analytical results. For a fixed K, the ASC performance is improved with increasing mD and decreasing mE. The ASC performance for (2,1) is better than that of (1,1) and (1,2). This is because the fading severity of an N-Nakagami channel is less for a larger m. Further, it is observed that the ASC performance improves as K increases. This is because a higher K means that the S → D channel is better than the S → E channel.

Fig. 2
figure 2

ASC performance versus K

Table 1 Simulation Parameters

Figure 3 presents the ASC performance versus K with (1,1). The other simulation parameters are \( \overline{\gamma} \) =5 dB, 10 dB, 15 dB, 20 dB. The simulation parameters are given in Table 2.This again shows that the Monte-Carlo simulation results match the analytical results. For fixed K, the ASC performance is improved as \( \overline{\gamma} \) increases. This is because the S → D channel is better than the S → E channel.

Fig. 3
figure 3

ASC performance versus K

Table 2 Simulation Parameters

Figure 4 presents the SPSC performance versus K with \( \overline{\gamma} \) =10 dB. The simulation parameters are given in Table 1. This confirms the analysis given previously as it matches the Monte-Carlo simulation results. For fixed K, the SPSC performance is improved as mD increases and mE decreases. The SPSC performance for (2,1) is best. Further, it is clear that the SPSC performance improves as K increases. This is because the S → D channel is better than the S → E channel.

Fig. 4
figure 4

SPSC performance versus K

Figure 5 presents the SPSC performance versus K with \( \overline{\gamma} \) =0 dB, 5 dB, 10 dB, 15 dB, 20 dB. The simulation parameters are given in Table 3. This shows that the SPSC performance cannot be improved by increasing \( \overline{\gamma} \). This observation matches the results obtained from (21)–(22).

Fig. 5
figure 5

SPSC performance versus K

Table 3 Simulation Parameters

Figure 6 presents the SOP performance versus K with (2,1). The simulation parameters are \( \overline{\gamma} \)=0 dB, 10 dB, 20 dB, 30 dB, 40 dB, GD = 5 dB, GE = 1 dB, ND = NE = 2, and γth = 0 dB. This shows that the analytical bound on the SOP cannot be improved by increasing \( \overline{\gamma} \). This observation confirms the results obtained from (18)–(20). As \( \overline{\gamma} \) increases, the Monte-Carlo simulation results approach the analytical bound on the SOP.

Fig. 6
figure 6

SOP performance versus K

Figure 7 presents the SOP performance versus K with \( \overline{\gamma} \) =20 dB,and γth = 0 dB. The simulation parameters are given in Table 4. This again shows that the Monte-Carlo simulation results match the analytical results. For fixed K, the SOP performance is improved with increasing mD and decreasing mE. The SOP performance of (2,1) is the best. Further, the SOP performance improves as K increases.

Fig. 7
figure 7

SOP performance versus K

Table 4 Simulation Parameters

Figure 8 presents the ASC performance under different channels with \( \overline{\gamma} \)=5 dB. The simulation parameters are given in Table 5. For fixed K, the ASC performance under 2-Nakagami channels is the best. This is because the fading severity of 2-Nakagami channels is larger than Nakagami and Rayleigh channels. Further, the ASC performance improves as K increases. This is because the S → D channel is better than the S → E channel.

Fig. 8
figure 8

ASC performance under different channels

Table 5 Simulation Parameters

7 Conclusion

In this paper, the secrecy performance of the mobile vehicular networks over N-Nakagami fading channels has been investigated. Exact closed-form expressions for the probability of strictly positive secrecy capacity (SPSC), secrecy outage probability (SOP), and average secrecy capacity (ASC) were derived and verified via Monte-Carlo simulations. The simulation results showed that the m, N, GD, and GE had a significant effect on the secrecy performance.