Encrypting File with passphrase

Phillip Susi psusi at ubuntu.com
Fri Mar 14 14:58:55 CET 2014

Hash: SHA1

On 3/12/2014 9:07 AM, Kumar, Vikash X wrote:
> Hi Team,
> Could you please help me to understand the following query.
> We are using gpg encryption method for encryption and decryption
> in our application. We have generated the keypairs on server A and 
> public key is imported on server B also a passphrase say "Strange" 
> was provided while generating the key.
> Now I am trying to encrypt the file on server B using this public 
> key, I am able to do so without any matter I pass the passphrase
> or not.
> So my ask is, if a key pair is generated with passphrase it won't 
> restrict the encryption incase incorrect passphrase or no
> passphrase is passed? Also I was able to encrypt the file on server
> B by providing any random passphrase, but decryption is possible
> with correct passphrase only.

The passphrase is only used to encrypt the private key so that even if
someone gets ahold of your private keyring, they still can't use it.
You can skip the password if you want, and that makes as much sense as
writing the password down in a script that will be automatically using
the private key to decrypt.  Encryption only uses the public key,
hence there is no password.

Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/


More information about the Gnupg-users mailing list