EldoS | Feel safer!

Software components for data protection, secure storage and transfer

get error "No appropriate OpenPGP secret key for decryption found"

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 09/13/2009 10:56:21
by kent jin (Basic support level)
Joined: 09/13/2009
Posts: 1


I got two PGP files from separate sources, both files were encrypted using same key and KeyPassphrase,but I can decrypt the one file, can't decrypt another one file using same code,failed one file i got below error:No appropriate OpenPGP secret key for decryption found.

here is my code:

Stream sourceStrm = filestream; //previous PGP file already has been read to FileStream

MemoryStream outputStrm = new MemoryStream();
SBPGP.TElPGPReader pgpReader = new SBPGP.TElPGPReader();

SBPGPKeys.TElPGPKeyring keyring = new SBPGPKeys.TElPGPKeyring();
keyring.Load(publicKeyringFilePth, privateKeyringFilePath, true);

pgpReader.DecryptingKeys = keyring;
pgpReader.VerifyingKeys = keyring;
pgpReader.KeyPassphrase = passphrase;
pgpReader.OutputStream = outputStrm;
pgpReader.DecryptAndVerify(sourceStrm, 0);

catch (Exception e)
throw (e);

byte[] streamByte = new byte[outputStrm.Length];
outputStrm.Position = 0;
outputStrm.Read(streamByte, 0, (int)(outputStrm.Length));

throw exception when call DecryptAndVerify method and error display "No appropriate OpenPGP secret key for decryption found."

but,it is a wonder that I can successfully decrypt this two files using PGP desktop downloaded from network,any body give me any suggestion?

Posted: 09/13/2009 11:48:04
by Ken Ivanov (EldoS Corp.)

According to our support policy, Basic support is not available for the residents of PRC. If you are a registered customer, please assign the license ticket you have received in the registration letter to your account to get Standard support level.

Thank you for understanding.



Topic viewed 3483 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!