Password not accepted in PGP

I created a PGP keypair in eM Client for 2 email accounts, for tests (they have the same PGP password). I saved the password in a separate text file. When encrypting a mail, I’m asked for my password. I copy/paste the password from the text file to the prompt. I send the mail from one account to the other, I’m asked for my password to read the mail I just received in my other email account, but the password is rejected. I deleted both keypairs, and did the procedure again of recreating the keypair for each account and so on…But the newly created password is also rejected when trying to read a mail…
Any idea? Thank you.

When you send an encrypted email to someone, you don’t use your own PGP key, you use theirs. So what you need to do to send an encrypted email from account 1 to account 2, is first send the public key from account 2 to account 1. Account 1 will then use that public key to send the message to account 2.

It may be confusing because you have both accounts on the same email client on the same computer. That is definitely not a situation that would ever exist in the real world. Maybe you could try it with two different email clients, or with eM Client installed on two different computers.

Found a description of the encryption process that will make more sense than what I wrote:

The way typical email encryption works is that you have a public key and a private key. You, and only you will have and use your private key. Your public key is handed out to anyone you choose or even made publicly available.

If someone wants to send you a message that is meant only for you to see, they would encrypt it using your public key.

Your private key is required to decrypt such a message, so even if someone intercepted the email it would be useless gibberish to them. When you send an email to someone else you can use your private key to digitally “sign” the message so that the recipient can be sure it is from you.

Thank you. It makes sense. So, we’re using keys. Why are there separate passwords? Are they related to the encryption keys in any way?

You will have a separate password for every private key that you have. So as you have two email accounts, you have two private keys and they will have separate passwords.

Public keys don’t have passwords. If you want somebody to send you an encrypted message, you give them your public key. They send you the message using that key. They don’t need a password to do that. When you receive it, you use the password for your private key of that pair to open the message.

Another situation where the password is used is when signing a message. You then use the password for your key to digitally sign the message. The receiver does not need your public key or a password to read the message. Basically if the encrypted hash within the message matches the hash of the rest of the message, then the receiver will be notified that the message is authentic and has not been altered.