I am getting my hands dirty with https, ssl, PKI stuff. And there is one thing that I dont quite understand with self signed certificates. Say I want to create a self-signed certificate and send it over to my friend whenever we want to establish a secure connection.
So the steps are:
- create a private key.
- create a public key.
- sign the certificate with my public key.
So when my friend gets my certificate he has to verify that the certificate he gets is mine, he needs to decrypt digital signature. But in order to decrypt it and verify he has to have my private key. So, I am a bit confused here.