Unable to encrypt file with private/public key
Bob (Robert) Cavanaugh
robertc at broadcom.com
Fri Dec 19 19:13:08 CET 2014
Dhiraj,
You need to clarify your terminology: Key pairs are composed of public and private keys. Each person generates a key pair. You freely distribute the PUBLIC key to any and all, you keep your PRIVATE key secret. When you use asymmetric encryption, you encrypt to each separate PUBLIC key for whom you send the message. So if you have three people you are sending the encrypted message to, you will encrypt three separate times. If you have the keys on a keyring the process is automatic. When you receive an encrypted message, you decrypt using your PRIVATE key. If you generate a digital signature, you sign a message using your PRIVATE key. If you use symmetric encryption, your key pairs are not involved. You generate a passphrase that is converted into a key used internally by GPG. Both encryption and decryption must use the same passphrase.
You can also generate subkeys based on your original key pair which can be assigned individual functions (signing only, encrypting, etc.). This is not required but in many instances recommended. Use the GPG default settings whenever possible.
Does this clear things up?
Thanks,
Bob Cavanaugh
-----Original Message-----
From: Gnupg-users [mailto:gnupg-users-bounces at gnupg.org] On Behalf Of Haritwal, Dhiraj
Sent: Friday, December 19, 2014 2:36 AM
To: gnupgpacker; gnupg-users at gnupg.org
Subject: RE: Unable to encrypt file with private/public key
Thanks for the clarification, Chris. I got confused with recipient switch. In general (Exchange), Recipient is the one to whom we are sending the data or who will receive data. In our case we are sending the data to partner hence I was using partner's public key to encrypt the file. After I used my private key, the warning has gone & the file is encrypted in .asc format.
One more query, partner is saying they are unable to decrypt this file with my private key which they have trusted & asking to encrypt this file with my private key & their public key (already trusted on my server). when I am suing both the key identifier's, giving some syntax error. Kindly suggest how can I do this.
Dhiraj
-----Original Message-----
From: Gnupg-users [mailto:gnupg-users-bounces at gnupg.org] On Behalf Of gnupgpacker
Sent: 19 December 2014 15:32
To: gnupg-users at gnupg.org
Subject: Unable to encrypt file with private/public key
* PGP Signed by an unknown key
@Dhiraj:
Encrypting:
You encrypt a message with recipient's public key, no password is required.
(Password is only known by recipient.)
Signing:
You sign a message with your own private key, you must admit your private key's password.
Regards, Chris
(RSA-Testkey 0x3E2E0598)
> What I have
> learned so far from these threads is Signing always require a
> passphrase whereas encryption can be done without Passphrase & it requires a Key.
> Correct me if my understand is not correct.
> I was doing a mistake. I
> was trying to encrypt the file with Partner Key hence it was showing
> the warning. While sending the file to partner I have to use my own
> key which I have share with them to decrypt it.
* Unknown Key
* 0xD64D3126(L)
_______________________________________________
Gnupg-users mailing list
Gnupg-users at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
________________________________
This email is confidential and intended only for the use of the individual or entity named above and may contain information that is privileged. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or telephone and destroy the original message. - This mail is sent via Sony Asia Pacific Mail Gateway..
_______________________________________________
Gnupg-users mailing list
Gnupg-users at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
More information about the Gnupg-users
mailing list