In this paper, we investigate secure communication for a dual-hop multiuser relay network, where a source communication with N
) destinations via an untrusted variable gains relay. To exploit multiuser diversity while protecting source’s confidential message, we first propose a joint destination-based jamming and opportunistic scheduling (DJOS) scheme. Then, we derive closed-form approximated and asymptotic expressions of the secrecy outage probability (SOP) for the considered system with DJOS. Furthermore, we determine an asymptotical optimal power allocation (OPA), which minimizes the asymptotic SOP, to further improve the secrecy performance. Our analytical results show that the achievable secrecy diversity order in terms of SOP with fixed power allocation is
, whereas, with OPA, the achievable secrecy diversity order can be improved up to
. This interesting result reveals that OPA can improve the secrecy diversity order of the single-user network. This is intuitive since full diversity order of 1 cannot be achieved when
, thus leaving some space for OPA to improve the diversity order. Nevertheless, for
, the effect of OPA is to increase the secrecy array gain rather than the secrecy diversity order since full diversity order 1 has been achieved by the OS scheme. Finally, simulation results are presented to validate our analysis.