Encrypting File with passphrase

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


-----BEGIN PGP SIGNED MESSAGE-----
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.

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

iQEcBAEBAgAGBQJTIwsfAAoJEI5FoCIzSKrw5tAH/ih7zw3gm5/YL4Lmf3OePDWN
XNpk18RCN2RNdmTSOWV6QZa/b4yt7C8Il95L9F4JwKLhnPrdl2x1mcXBK0+yg/xQ
aNmOmsfKUMpu5zyUKuYaQQ/uFxer+zL3Xa456qFLgQF0UjWgYOuhw4LfVKb1Jy7P
sxYmkmOWrN+DzciPrNQL2j6a/oGLF1Rz6rsPl7jFFSrVgCXugNIOaDGtzCjT9/dx
Ig4L4znz9ZWZ0Z0e6gQEjlVIWjPZVE5FQhp2l9se3sKrXNqtxKIAMBEwtM6XU5In
+o03VrQYCU6Iuf3n4wcM511yLufOhc2xrnY6yltMSPVYauSYE4y5KHrS7aFVIl0=
=f2Al
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list