Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command line PGP can't find key for decrypt

Status
Not open for further replies.

BillGeake

Programmer
Mar 27, 2001
31
0
0
GB
I'm having trouble with command line PGP 6.5.8 (freeware). When I try to decrypt a file with the syntax pgp <filename> it returns the message:

File is encrypted. Secret key is required to read it.
You do not have the secret key needed to decrypt this file.

However, if I run pgp -kv, the key is displayed in the list as my default signing key. I know this key is ok because the GUI PGPTools can decrypt the file, asking for the passphrase along the way.

Doesn't seem to matter if PGPPATH is set to the directory in which my keyrings are held.

I need to use the command line PGP because the decryption will be done by a VB program. I was hoping that the line pgp <filename> -z <passphrase> would do the job, but am now rather worried that it won't.

This is on Windows 2000, btw.

I guess this must have been done lots of times before, so can anyone help?

Bill (newbie for whom it was all going so well...)
 
Bill,

Did you ever get a resolution to this? I periodically have the same problem. A customer sends me 5 encyrpted files, 4 of them will decrypt fine, and one of them will not. I get the message that it needs the private key.
 
Apologies for not checking this thread sooner....

I never did find a solution. In the end I had to buy a component to do the job - CryptOCX from This works well though the documentation is poor and it has a few little foibles - some string properties need vbNullString rather than &quot;&quot;, and the key path can't be UNC.

Other than that, it seems good and saves lots of development time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top