EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Invalid Header

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.
#3306
Posted: 07/06/2007 13:48:23
by John Glisson (Basic support level)
Joined: 07/06/2007
Posts: 5

I have seen this in other forum threads, but thought I'd post it.

I am getting the Invalid Header exception when running DecryptAndVerify. I am using version 4.4.0.94. Here is the file content.

--8760
Content-Type: application/pgp-encrypted

Version: 1

--8760
Content-Type: application/octet-stream

-----BEGIN PGP MESSAGE-----
Version: PGP 7.1

hQCMA2VpGyUm4PspAQP/Y/qEym14DvAzZt5RM1AYWgQc2TmpRTcVoWBJ4SpxKpvR
LTB2zvIf+DETDUKzOMfjwEOwqtT+uyibReRpClsa/B+GCTmyvgF9yrQDu2qhBSAV
sQHuOSGANT2ufYW3xU/Rx8hsmjBq0EcvXzJ3bfyajx531B51tKUIit1UP6/Mx1+F
AIwDw2ZEgoK5shsBA/9qPx0e4fCIzU6zjdX2TgO7qmnAHjxMigMS0iQ6ADhixVOI
538p4sJYSl09UAoT0pmMnXotWAbMTYIUpQZZDyXDRR+jN/fJX+Mq4jpAFWdscciV
QI0K2Ypp/pV/7ROmc4ntMrDOXv+ygZlR0/waXiVcGrSBp1gb9AyzJYiKb2zlMaUR
lUKTCbUQfEWh1KrtDnWNKuBgeAzahnvACvcVJmK9Gr2rZ1xK9z04v6APuZyKgOzc
oCoAV/Xd9/8iUu70JMOSrfzMZXAAV0iE4AqxL8VpQJ37cwxYa5SgAmU0jKGf1hp4
qOq/bSSWOUD6XW1hEzyqHM5vGKa4YSd/SRe33UYw+NfIeCjR4PG/wbjMlS6uhcuU
ENpp/VGQY0s94Sli2PMAvWWW6lmKzgHeLEEq3CkNy8YohexiyXKjc0QlsRhn+nE4
7MTNxTYUJh5b7vK4cbZ0fa+8GSTXn9YuOwENeocoX5KYaKhwkmRXnTaxhheDezYz
o9SXldrn0NF/txwSvwoUx2wIFHUOT0/Pctbi7MTeXFrWnhKYAWFVNX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ooG+rxfKIVOhG6uDWg7aD2tFjwASGC9diJGg3TwkCKea8gCwO95idw6RLY5RYY
5B3nX1qLfZntQsHYL+AIDgebzE8ZWwxjdkTc44RvU1awe1QRQwEHa97BHL60+G0n
dKh9tawSALO+Iw+UlhNU+inr0nc+lupnXOPNe180FATxXMnxCD8PtGVeCwpKbAGz
ij5mGthSHdrrx4YJQfa891v85H6MqDto6TznqJYWcoMGaLDq+Dr/9NME2yvKXTCr
NYoFptvXP0Oc6Phv9nv9SBmXGEm7RqoaBcm7Wzak3OeWARJT4BE=
=erHI
-----END PGP MESSAGE-----

--8760--
#3307
Posted: 07/06/2007 14:14:41
by John Glisson (Basic support level)
Joined: 07/06/2007
Posts: 5

Update...I downloaded the trial of version 5.1.0.112 and I still get the same exception. This is the method we are using.

Code
private bool DecryptFile(string encryptedFile, string decryptedFile)
{
   bool isSuccessful = false;

   FileStream inFile = new FileStream(encryptedFile, FileMode.Open);
   FileStream outFile = new FileStream(decryptedFile, FileMode.Create);

   try
   {      
      // Setup the keyring with the public and private keys
      SBPGPKeys.TElPGPKeyring keyring = new SBPGPKeys.TElPGPKeyring();
      keyring.Load(_pgpEncryptionKey, _pgpSignatureKey, true);

      // Setup the PGP reader and decrypt the file
      SBPGP.TElPGPReader pgpReader = new SBPGP.TElPGPReader();
      pgpReader.DecryptingKeys = keyring;
      pgpReader.VerifyingKeys = keyring;
      pgpReader.KeyPassphrase = _pgpPassPhrase;
      pgpReader.OutputStream = outFile;
      pgpReader.DecryptAndVerify(inFile, 0);
      isSuccessful = true;
   }
   finally
   {
      inFile.Close();
      outFile.Close();
   }

   return isSuccessful;
}
#3308
Posted: 07/06/2007 14:47:12
by Eugene Mayevski (EldoS Corp.)

The data you've posted is not a valid PGP message. It's a bunch of information, which includes, among other things, possibly valid PGP message. But it's your job to get a pure PGP message from that information.


Sincerely yours
Eugene Mayevski
#3309
Posted: 07/06/2007 14:50:15
by John Glisson (Basic support level)
Joined: 07/06/2007
Posts: 5

Thanks...

As an aside, Network Associate's solution decrypts the exact file without any issues.
#3311
Posted: 07/07/2007 00:36:28
by Eugene Mayevski (EldoS Corp.)

They have an application, we provide components from which you build your application. One of our important tasks is to find a balance between functionality, ease of use and size of the code.


Sincerely yours
Eugene Mayevski
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.

Reply

Statistics

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