Hello, need help with Kleoptra gpg;
I have two systems with WinGPG installed, I have generated two unique certificates for each system, I have exported one of the certificates from systemB (SystemB-Public.asc) I move this key to SystemA then import it to Kleopatra; I set the trust level (I am reasonably sure all this information is correct. Max setting) and certify the certificate to add it my trust ring, I then create a test document on SystemB sign it and encrypt it , then I move that Document to SystemA to attempt to decrypt it
I get failed to decrypt Recipient:systemB
now if I export the secret key from systemB and import it to systemA and set trust level to My own certificate (only option) I can decrypt it.
Why is it failing with public asc key?
I am no expert but I will attempt to answer your question. If I am wrong, I hope someone else corrects us.
The way encryption works is that you have two keys: one, private; and two, public. When you want to encrypt something, you ask the receiver for her public key. Using her public key, you encrypt the information. When she receives the encrypted document, she then uses her private key to unencrypt. In essence, you are “borrowing” her lock to lock the contents and she has the “master lock” to unlock the contents. “lock” is the public key and master lock is the private key.
So, in your case, you passed from B to A the public key. You created an encrypted document on B and sent to A. A failed to unencrypt. The reason for the failure is that A lacks the “private” key to unencrypt.
When you sent the private key over from B to A, you sent over the master lock. So now, it works.
If you are sending from B to A, you should be requesting A’s public key. B then uses A’s public key to encrypt. A could then decrypt.
Again, just think of two individuals. One individual wants to send something securely. He requests from his friend that she send over her lock. He then uses her lock to secure the contents. When she receives the contents, she uses her master lock to unlock everything.
I hope this helps.
Thank You very much for the reply very insightful and excellent example.