I'm using an email service with encryption option and I need to send an encrypted email. So if I need my letter to be sent encrypted, I need to take my receiver's public encryption key and apply it to my letter with an encryption function. The point is my service has built-in encryption, thus generating my own private-public key pairs for each of my receivers, but the receiver is using a simple email service, which doesn't generate a public key for him by default. So if I have a public key, will my receiver's email service automatically generate a public key for his mailbox so that my letter to him could be encrypted?
So if I have a public key, will my receiver's email service automatically generate a public key for his mailbox so that my letter to him could be encrypted?
No, it would be like shipping a letter to someone in a locked box with the key fastened on the side.
The receiver does not have a public key, so if your provider creates one, it's the provider's key, not the receiver's key. If the provider sends the receiver the private key, everyone in the way can have a copy too. It could not send the receiver the key and decrypt your message and store the plaintext version of it.
It probably only uses the encryption function to send email to other people that are using the same provider as their public keys are available. If you send email to someone that isn't client of your provider, they will only send the plaintext version. So if you want to send encrypted email, you will have to get the recipient's public key yourself and encrypt before sending.
I figured it out. Even if receiver's service could generate his public key and hand it over to me for encrypting the letter, then this service would also have the private key and thus be able to decrypt this letter by itself, which makes the encryption senseless. But actually it most probably can't do this generation because most email services don't have a common encryption protocol implemented in them (or don't provide it to everyone).
But I also read the docs for my service and found out that for communication with other services it doesn't use public keys, but uses a usual symmetric scheme where you encrypt the letter with a key and then have to transmit this key to the receiver for the decryption via some other channel. And in order that your receiver could read the letter the service doesn't actually send him the encrypted letter, but instead sends a link to its own page where he can input the key and this key will be applied to the letter for decrypting and reading.
So I see that this service is much more convenient than traditional desktop clients with encryption programs attached to them (both for sender and receiver). It's called Tutanota by the way.