Unable to encrypt file with private/public key

vedaal at nym.hush.com vedaal at nym.hush.com
Thu Dec 18 16:56:32 CET 2014


On 12/18/2014 at 10:38 AM, "Dhiraj Haritwal" <Dhiraj.Haritwal at ap.sony.com> wrote:

>About the below command, it's asking for passphrase whereas my 
>requirement is to use only keys to encrypt/sign it.
>
>gpg2 -u FFEEDDCC -r AABBCCDD -se supersecret.txt

-----

'-s' in the above command means that you want to sign.

Whenever you want to sign, GnuPG asks for your passphrase to unlock your signing key.

=====

>I tried below command which shows confirmation screen where I have 
>entered y (yes) & now able to see a file named  
>supersecret.txt.gpg. m not sure what file it is because it think 
>encrypted file should has an .asc extension.
>
>./gpg --encrypt --hidden-recipient AABBCCDD supersecret.txt

-----

'supersecret.txt.gpg' is the GnuPG encrypted output of the file 'supersecret.txt'.

If unspecified, GnuPG will produce a .gpg file rather than a .asc file.

If you want a .asc file, you need to include the option of '--armor'
or '-a'  in your encryption command:

gpg2 -u FFEEDDCC -r AABBCCDD -a -e supersecret.txt



vedaal





More information about the Gnupg-users mailing list