EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PGP operation failed: No appropriate key for decryption found

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#650
Posted: 07/07/2006 12:26:04
by Scott Cline (Basic support level)
Joined: 07/07/2006
Posts: 4

I am trying to use the C# ASPNET Demo that comes with SBB. I have placed key files and PGP files in the appropriate folders, and when I try to decrypt the file through the ASP page I get the following message:

"PGP operation failed: No appropriate key for decryption found"

Using the SBB C# PGPFiles DEMO, the same PGP encrypted file, and same pub/priv key files, the file is decrypted as expected. This tells me that I have the correct key files for the encrypted files.

Does anyone know how to correct this problem, OR does anyone have a VB or C# class (not wizard/gui) that can decrypt a PGP file.

Thank you
#651
Posted: 07/07/2006 12:38:28
by Eugene Mayevski (EldoS Corp.)

Did you include a reference to SecureBlackbox.PKI.dll to your project?


Sincerely yours
Eugene Mayevski
#652
Posted: 07/07/2006 12:39:33
by Eugene Mayevski (EldoS Corp.)

BTW there's an ASP demo for PGP included into the distribution (unfortunately the demo is only for VS 2003).


Sincerely yours
Eugene Mayevski
#653
Posted: 07/07/2006 13:20:32
by Scott Cline (Basic support level)
Joined: 07/07/2006
Posts: 4

Yes, I am getting this exact error from the ASP PGP demo that you include with SBB.

I am using a version downloaded yesterday. I verified that your demo includes a reference to SecureBlackbox.PKI.dll in the project.

Can you verify that the demo works for Decrypting PGP files?

Thank you.
#654
Posted: 07/07/2006 15:22:22
by Eugene Mayevski (EldoS Corp.)

It looks like on some systems CLR blocks use of SecureBlackbox.PKI.dll because of security restrictions.

Are you using .NET 1.1 and VS.NET 2005?


Sincerely yours
Eugene Mayevski
#655
Posted: 07/07/2006 15:31:18
by Scott Cline (Basic support level)
Joined: 07/07/2006
Posts: 4

Using .Net 1.1 and VS 2003. How can we configure things to work around the security restrictions?
#656
Posted: 07/08/2006 00:04:50
by Eugene Mayevski (EldoS Corp.)

We have to investigate the issue.

The strangest thing is that everything worked fine for a long time and the users use and deploy PGPBlackbox-based Web applications fine. And now (the last week) three "new" users reported the same problem.


Sincerely yours
Eugene Mayevski
#657
Posted: 07/08/2006 05:32:45
by Ken Ivanov (EldoS Corp.)

Please replace the code of ProcessPGP() method with the following code and check if it solves the issue:
Code
private bool ProcessPGP(Stream inF, Stream outF)
{
   TElPGPReader reader = new TElPGPReader();
   try
   {
      reader.DecryptingKeys = secretKey;
      reader.VerifyingKeys = publicKey;
      outputStream = outF;
      reader.OnCreateOutputStream += new TSBPGPCreateOutputStreamEvent(reader_OnCreateOutputStream);
      reader.KeyPassphrase = Request.Params["password"];
      reader.DecryptAndVerify(inF, 0);
   }
   catch(Exception ex)
   {
      errormsg = ex.Message;
      return false;
   }
   return true;
}
#673
Posted: 07/11/2006 07:07:40
by Scott Cline (Basic support level)
Joined: 07/07/2006
Posts: 4

This new code corrected the problem. Thank you for the support.
#761
Posted: 07/19/2006 09:13:19
by Jim Bounce (Basic support level)
Joined: 07/11/2006
Posts: 13

hallo,

well I am having the same problem with my VB.NET project. with some files encrypted with the same key I am able to decrypt, with some other files I get the same error, any help?

thx

EDIT:
funny thing is that it allready worked, I was able to decrypt it two or three times, but now it just doesn´t works.
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 16363 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!