EldoS | Feel safer!

Software components for data protection, secure storage and transfer

GNU PGP Encrption --> BlackBox

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#7464
Posted: 08/29/2008 04:01:51
by jonny nilsson (Standard support level)
Joined: 08/29/2008
Posts: 10

I got this exception when i try to decrypt a message created by GNU Pgp. The encrypted data looks like binary data (no encoding, no headers). Any1 got an ide how to decrypt this message. I have also test to decrypt it with example program (PGPFilesDemo.exe) with same result.
/Jonny

SBPGPExceptions.EElPGPInvalidDataException occurred
Message="Unexpected packet"
Source="SecureBlackbox.PGP"
StackTrace:
at SBPGP.TElPGPProcessingUnit.CreateProcessingStream()
at SBPGP.TElPGPProcessingUnit.Write(Byte[] Buffer, Int32 Offset, Int32 Count)
at SBPGP.TElPGPReader.Synchronize()
at SBPGP.TElPGPReader.DecryptAndVerify(Stream ASourceStream, Int64 Count)
#7465
Posted: 08/29/2008 04:36:57
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

Please provide us the file causing the decryption problem. You can either post it here or use Helpdesk to prevent the file from being disclosed.
#7468
Posted: 08/29/2008 06:58:23
by jonny nilsson (Standard support level)
Joined: 08/29/2008
Posts: 10

Here is the requested file. I have change the extension to .txt due to upload problem

/Jonny


[ Download ]
#7469
Posted: 08/29/2008 08:12:17
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Your file uses deprecated feature of PGP protocol - it doesn't store information about how it is encrypted, so it should assume default option (IDEA & MD5 of password). This is already in our todo list.
As this is deprecated, we recommend you to configure GnuPG to make it generate compliant to standard files (change symmetric algorithm to AES, hash to SHA1 and so).
#7470
Posted: 08/29/2008 08:28:03
by jonny nilsson (Standard support level)
Joined: 08/29/2008
Posts: 10

Ok, so what u say is there is no way to decrypt this message. Anyway I have to find another way. Thx for trying help

/Jonny
#7471
Posted: 08/29/2008 09:04:49
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

There is one way.
You can insert at the beginning of this file the following (binary) octets:
(0x8C 0x04 0x04 0x01 0x00 0x01), and try to decrypt. It should work for you.
#7472
Posted: 08/29/2008 09:05:43
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

If you will do this, please do not forget to use IDEA cipher plugin.
#7492
Posted: 09/01/2008 04:37:38
by jonny nilsson (Standard support level)
Joined: 08/29/2008
Posts: 10

Thx, works better now. Still got a problem as u can see. The thing is that i can decrypt with my keyring if i use a software from Pgp.com. Any ides?

/Jonny

SBPGPExceptions.EElPGPDecryptionStreamException occurred
Message="No appropriate OpenPGP secret key for decryption found"
Source="SecureBlackbox.PGP"
StackTrace:
at SBPGPStreams.TElPGPDecryptingStream.ProcessBlock(Byte[] Buffer, Int32 Index, Int32 Size)
at SBPGPStreams.TElPGPDecryptingStream.OnProcessorWrite(Object Sender, Object UserData, Byte[] Buffer, Int32 Index, Int32 Size)
at SBPGPEntities.TElPGPStreamProcessor.OnEntityWrite(Object Sender, Object UserData, Byte[] Buffer, Int32 Index, Int32 Size)
at SBPGPEntities.TElPGPStreamingEntity.DoWrite(Object UserData, Byte[] Buffer, Int32 Index, Int32 Size)
at SBPGPEntities.TElPGPSymmetricallyEncrypted.LoadHeader()
at SBPGPEntities.TElPGPStreamingEntity.LoadBodyChunk(Byte[] Buffer, Boolean ALastChunk)
at SBPGPEntities.TElPGPEntity.DataAvailable()
at SBPGPEntities.TElPGPStreamingEntity.DataAvailable()
at SBPGPEntities.TElPGPStreamProcessor.DataAvailable()
at SBPGPStreams.TElPGPDecryptingStream.DataAvailable()
at SBPGP.TElPGPProcessingUnit.Write(Byte[] Buffer, Int32 Offset, Int32 Count)
at SBPGP.TElPGPReader.Synchronize()
#7493
Posted: 09/01/2008 04:44:13
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Have you set the secret key password value to the correct one?
Also, if you are using DSA/DH key/subkey, you will need to set the password property for the subkey.
#7494
Posted: 09/01/2008 05:43:10
by jonny nilsson (Standard support level)
Joined: 08/29/2008
Posts: 10

Something simular to this? Or...(its not working) I have attach a jpeg file, decribing my key configuration. Maybe it helps.

/Jonny

keyring.GetSecretKeys(0).get_Subkeys(0).Passphrase = Passphrase;
keyring.GetSecretKeys(0).Passphrase = Passphrase;

TElPGPReader pgpReader = new TElPGPReader();
pgpReader.DecryptingKeys = keyring;
pgpReader.OutputStream = new MemoryStream();
pgpReader.DecryptAndVerify(new MemoryStream(fileBuffer), 0);


Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

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