  The intrinsic integration of the nonorthogonal multiple access (NOMA) and
reconfigurable intelligent surface (RIS) techniques is envisioned to be a
promising approach to significantly improve both the spectrum efficiency and
energy efficiency for future wireless communication networks. In this paper,
the physical layer security (PLS) for a RIS-aided NOMA 6G networks is
investigated, in which a RIS is deployed to assist the two "dead zone" NOMA
users and both internal and external eavesdropping are considered. For the
scenario with only internal eavesdropping, we consider the worst case that the
near-end user is untrusted and may try to intercept the information of far-end
user. A joint beamforming and power allocation sub-optimal scheme is proposed
to improve the system PLS. Then we extend our work to a scenario with both
internal and external eavesdropping. Two sub-scenarios are considered in this
scenario: one is the sub-scenario without channel state information (CSI) of
eavesdroppers, and another is the sub-scenario where the eavesdroppers' CSI are
available. For the both sub-scenarios, a noise beamforming scheme is introduced
to be against the external eavesdroppers. An optimal power allocation scheme is
proposed to further improve the system physical security for the second
sub-scenario. Simulation results show the superior performance of the proposed
schemes. Moreover, it has also been shown that increasing the number of
reflecting elements can bring more gain in secrecy performance than that of the
transmit antennas.
