  This paper investigates the physical layer security design of an untrusted
relaying network where the source node coexists with a multi-antenna
eavesdropper (Eve). While the communication relies on untrustworthy relay nodes
to increase reliability, we aim to protect the confidentiality of information
against combined eavesdropping attacks performed by both untrusted relay nodes
and Eve. Taking into account the hardware impairments, and power budget
constraints, this paper presents a novel approach to jointly optimize relay
beamformer and transmit powers aimed at maximizing average secrecy rate (ASR).
The resultant optimization problem is non-convex, and a suboptimal solution is
obtained through the sequential parametric convex approximation (SPCA) method.
In order to prevent any failure due to infeasibility, we propose an iterative
initialization algorithm to find the feasible initial point of the original
problem. To satisfy low-latency as one of the main key performance indicators
(KPI) required in beyond 5G (B5G) communications, a computationally efficient
data-driven approach is developed exploiting a deep learning model to improve
the ASR while the computational burden is significantly reduced. Simulation
results assess the effect of different system parameters on the ASR performance
as well as the effectiveness of the proposed deep learning solution in
large-scale cases.
