  Network slicing in 3GPP 5G system architecture has introduced significant
improvements in the flexibility and efficiency of mobile communication.
However, this new functionality poses challenges in maintaining the privacy of
mobile users, especially in multi-hop environments. In this paper, we propose a
secure and privacy-preserving network slicing protocol (SPNS) that combines 5G
network slicing and onion routing to address these challenges and provide
secure and efficient communication. Our approach enables mobile users to select
network slices while incorporating measures to prevent curious RAN nodes or
external attackers from accessing full slice information. Additionally, we
ensure that the 5G core network can authenticate all RANs, while avoiding
reliance on a single RAN for service provision. Besides, SPNS implements
end-to-end encryption for data transmission within the network slices,
providing an extra layer of privacy and security. Finally, we conducted
extensive experiments to evaluate the time cost of establishing network slice
links under varying conditions. SPNS provides a promising solution for
enhancing the privacy and security of communication in 5G networks.
