Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: users

Decrypting Files Automatically

 

 

GnuPG users RSS feed   Index | Next | Previous | View Threaded


bpgadhia at yahoo

Aug 24, 2006, 4:19 PM

Post #1 of 5 (11541 views)
Permalink
Decrypting Files Automatically

Hi,
I am trying to decrypt a file automatically.I want to use it in a dts
package. I am using following command:
type passphrase | gpg --passphrase-fd 0 --decypt-file "File Name"
in my case it looks like:
type "C:\SampleProjects\GnuPGDotNet\GnuPG\passphrase.txt" | gpg
--passphrase-fd 0 decrypt-files "C:\DocLib\EncryptedFile\Clock1.swf.gpg"
I get one of the following errors:

Reading passphrase from file descriptor 0
usage: gpg [options] [filename]

OR

Reading passphrase from file descriptor 0
gpg: encrypted with ELG-E key, ID ECEB4FC5
gpg: decryption failed: secret key not available

I am using GPG version of 1.4.5 on windowsXP professional and default
dirctory of secring is C:\Documents and Settings\bgadhia\Application
Data\gnupg. And my public key is at C:\DocLib\PublicKey
I am able to encrypt and decrypt using UI tools provieded by GPG and WinPT.
Can anyone please help me.
Thank you in advance.
Bharat Gadhia

--
View this message in context: http://www.nabble.com/Decrypting-Files-Automatically-tf2161882.html#a5974781
Sent from the GnuPG - User forum at Nabble.com.


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


bpgadhia at yahoo

Aug 24, 2006, 4:20 PM

Post #2 of 5 (11422 views)
Permalink
Decrypting Files Automatically [In reply to]

Hi,
I am trying to decrypt a file automatically.I want to use it in a dts
package. I am using following command:
type passphrase | gpg --passphrase-fd 0 --decypt-file "File Name"
in my case it looks like:
type "C:\SampleProjects\GnuPGDotNet\GnuPG\passphrase.txt" | gpg
--passphrase-fd 0 decrypt-files "C:\DocLib\EncryptedFile\Clock1.swf.gpg"
I get one of the following errors:

Reading passphrase from file descriptor 0
usage: gpg [options] [filename]

OR

Reading passphrase from file descriptor 0
gpg: encrypted with ELG-E key, ID ECEB4FC5
gpg: decryption failed: secret key not available

I am using GPG version of 1.4.5 on windowsXP professional and default
dirctory of secring is C:\Documents and Settings\bgadhia\Application
Data\gnupg. And my public key is at C:\DocLib\PublicKey
I am able to encrypt and decrypt using UI tools provieded by GPG and WinPT.
Can anyone please help me.
Thank you in advance.
Bharat Gadhia

--
View this message in context: http://www.nabble.com/Decrypting-Files-Automatically-tf2161885.html#a5974796
Sent from the GnuPG - User forum at Nabble.com.


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


johanw at vulcan

Aug 26, 2006, 1:36 AM

Post #3 of 5 (11430 views)
Permalink
Re: Decrypting Files Automatically [In reply to]

BharatG wrote:

>type passphrase | gpg --passphrase-fd 0 --decypt-file "File Name"
>in my case it looks like:
>type "C:\SampleProjects\GnuPGDotNet\GnuPG\passphrase.txt" | gpg
>--passphrase-fd 0 decrypt-files "C:\DocLib\EncryptedFile\Clock1.swf.gpg"

Peculiarity with windows dealing with pipes. There should not be a space
between the passphrase and the pipe sign.

BTW, I don't know if the file contains a newline/retrun either, otherwise
that might also cause problems.

--
ir. J.C.A. Wevers // Physics and science fiction site:
johanw [at] vulcan // http://www.xs4all.nl/~johanw/index.html
PGP/GPG public keys at http://www.xs4all.nl/~johanw/pgpkeys.html

_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


bpgadhia at yahoo

Aug 28, 2006, 8:49 AM

Post #4 of 5 (11442 views)
Permalink
Re: Decrypting Files Automatically [In reply to]

Hi Johan,
Thank you for the suggestion. I do not have any space in between passpharse
and pipe sign and my passphrase does not contain any newline/return.
Thank you.
Bharat.

Johan Wevers wrote:
>
> BharatG wrote:
>
>>type passphrase | gpg --passphrase-fd 0 --decypt-file "File Name"
>>in my case it looks like:
>>type "C:\SampleProjects\GnuPGDotNet\GnuPG\passphrase.txt" | gpg
>>--passphrase-fd 0 decrypt-files "C:\DocLib\EncryptedFile\Clock1.swf.gpg"
>
> Peculiarity with windows dealing with pipes. There should not be a space
> between the passphrase and the pipe sign.
>
> BTW, I don't know if the file contains a newline/retrun either, otherwise
> that might also cause problems.
>
> --
> ir. J.C.A. Wevers // Physics and science fiction site:
> johanw [at] vulcan // http://www.xs4all.nl/~johanw/index.html
> PGP/GPG public keys at http://www.xs4all.nl/~johanw/pgpkeys.html
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users [at] gnupg
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>
>

--
View this message in context: http://www.nabble.com/Decrypting-Files-Automatically-tf2161885.html#a6022798
Sent from the GnuPG - User forum at Nabble.com.


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


brian at nixthis

Aug 31, 2006, 8:16 AM

Post #5 of 5 (11419 views)
Permalink
Re: Decrypting Files Automatically [In reply to]

I am using something like this.

gpg --passphrase-fd 0 -o "New File" -d "File Name.gpg" <passphrase.txt

In a batch file you may need to add some or all of the following:
--batch
--yes
--trust-model always

BharatG wrote:

>Hi Johan,
>Thank you for the suggestion. I do not have any space in between passpharse
>and pipe sign and my passphrase does not contain any newline/return.
>Thank you.
>Bharat.
>
>Johan Wevers wrote:
>
>
>>BharatG wrote:
>>
>>
>>
>>>type passphrase | gpg --passphrase-fd 0 --decypt-file "File Name"
>>>in my case it looks like:
>>>type "C:\SampleProjects\GnuPGDotNet\GnuPG\passphrase.txt" | gpg
>>>--passphrase-fd 0 decrypt-files "C:\DocLib\EncryptedFile\Clock1.swf.gpg"
>>>
>>>
>>Peculiarity with windows dealing with pipes. There should not be a space
>>between the passphrase and the pipe sign.
>>
>>BTW, I don't know if the file contains a newline/retrun either, otherwise
>>that might also cause problems.
>>
>>--
>>ir. J.C.A. Wevers // Physics and science fiction site:
>>johanw [at] vulcan // http://www.xs4all.nl/~johanw/index.html
>>PGP/GPG public keys at http://www.xs4all.nl/~johanw/pgpkeys.html
>>
>>_______________________________________________
>>Gnupg-users mailing list
>>Gnupg-users [at] gnupg
>>http://lists.gnupg.org/mailman/listinfo/gnupg-users
>>
>>
>>
>>
>
>
>

_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users

GnuPG users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.