Energy-Efficient And Secure Device-To-Device Communications In The Next-Generation Wireless Network