There’s a server, a client, and a hacker in a network. For encryption, the client and the server need to share their private keys. Wouldn’t the hacker be able to grab those during their transmission and decrypt further messages as they please?
The beauty of a private key is that it doesn't need to be shared to be used
Confidentiality Integrity Availability
The beauty of a private key is that it doesn't need to be shared to be used