In this paper, we address the problem of optimal power allocation at the
relay in two-hop secure communications under practical conditions. To guarantee
secure communication during the long-distance transmission, the massive MIMO
(M-MIMO) relaying techniques are explored to significantly enhance wireless
security. The focus of this paper is on the analysis and design of optimal
power assignment for a decode-and-forward (DF) M-MIMO relay, so as to maximize
the secrecy outage capacity and minimize the interception probability,
respectively. Our study reveals the condition for a nonnegative the secrecy
outage capacity, obtains closed-form expressions for optimal power, and
presents the asymptotic characteristics of secrecy performance. Finally,
simulation results validate the effectiveness of the proposed schemes