Re: Encrypting File with passphrase

2014-03-14 Thread Phillip Susi
-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-

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Encrypting File with passphrase

2014-03-13 Thread Kumar, Vikash X
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.

Many Thanks for your help.


Regards,
Vikash Kumar


This is a confidential email. Tesco may monitor and record all emails. The 
views expressed in this email are those of the sender and not Tesco.

Tesco Stores Limited
Company Number: 519500
Registered in England
Registered Office: Tesco House, Delamare Road, Cheshunt, Hertfordshire EN8 9SL
VAT Registration Number: GB 220 4302 31
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Encrypting File with passphrase,

2014-03-13 Thread Michael Anders
Hi Vikash

On Thu, 2014-03-13 at 10:36 +0100, gnupg-users-requ...@gnupg.org wrote:
 Encrypting File with passphrase

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.

You do not need a passpharase for operations with a public key
(encryption or signature verification) because the key is not secret.
Everyone is allowed to access it, so there is no need to protect it with
a passphrase. This is the essence of asymmetric cryptography.

Apparently Gnupg just ignores a password given when it is not needed.
This seems reasonable to me.

regards
  Michael Anders
(http://www.fh-wedel.de/~an/)



___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Encrypting File with passphrase

2014-03-13 Thread David Shaw
On Mar 12, 2014, at 9:07 AM, Kumar, Vikash X vikash.x.ku...@in.tesco.com 
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.

In short, yes (though you don't need to provide a passphrase at all to encrypt 
to a public key - the passphrase has no meaning there).  Encrypting to a public 
key does not use a passphrase at all.  Only decrypting with the private key 
uses a passphrase.

David


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users