The question makes no sense. The private key is always private, it does not need to be passed through the network, and never ever should be. You are missing the whole idea of public-key encryption. You have to learn it, because it's very important. So, please see:
https://en.wikipedia.org/wiki/Public-key_cryptography[
^].
In brief: you encrypt with one key, decrypt with another one. If the purpose is encryption (not digital signature), the key sent over network is only the key to encrypt, and the key to decrypt is kept private. If you don't see what to do with it, learn from what Alice and Bob do.
—SA