EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Decryption error after loading secret key

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#18317
Posted: 11/28/2011 09:58:51
by Albert Portillo (Standard support level)
Joined: 11/21/2011
Posts: 7

Here is the call stack:
Code
:7c809eda kernel32.IsBadReadPtr + 0x39
SBUtils.IsValidVCLObject(???)
SBHashFunction.TElHashFunction.Update($B9D810,8)
SBPGPEntities.TElPGPS2K.GetSymmetricKey('',16)
SBPGPKeys.TElPGPCustomSecretKey.PassphraseValid
SBPGPStreams.FindSuitableKey
SBPGPStreams.TElPGPDecryptingStream.ProcessBlock(???,???)
SBPGPStreams.TElPGPDecryptingStream.OnProcessorWrite(???,???,$D6D448,8191)
SBPGPEntities.TElPGPStreamProcessor.OnEntityWrite(???,???,$D6D448,8191)
SBPGPEntities.TElPGPStreamingEntity.DoWrite(???,???,8191)
SBPGPEntities.TElPGPSymmetricallyEncrypted.LoadHeader
SBPGPEntities.TElPGPStreamingEntity.LoadBodyChunk($FF272,???,False)
SBPGPEntities.TElPGPEntity.DataAvailable
SBPGPEntities.TElPGPStreamingEntity.DataAvailable
SBPGPEntities.TElPGPStreamProcessor.DataAvailable
SBPGPStreams.TElPGPDecryptingStream.DataAvailable
SBPGP.TElPGPProcessingUnit.Write(???,???)
SBPGP.TElPGPReader.Synchronize
SBPGP.TElPGPReader.DecryptAndVerify(???,0)
SBPGP.TElPGPReader.DecryptAndVerifyFile(???)
Unit1.TForm1.DecryptBtnClick(???)
#18321
Posted: 11/29/2011 03:30:20
by Ken Ivanov (EldoS Corp.)

In fact, this call stack does not correspond to the exception you reported earlier ("No appropriate OpenPGP secret key for decryption found"), but thanks anyway.

Are you providing a password for the secret key when decrypting the file? You can do this by either a) capturing the TElPGPReader.OnKeyPassphrase event and returning the password back from it, b) assigning the password to the TElPGPReader.KeyPassphrase property, or c) assigning the password to the TElPGPSecretKey.Passphrase and TElPGPSecretKey.SubKey.Passphrase properties.
#18326
Posted: 11/29/2011 16:21:43
by Albert Portillo (Standard support level)
Joined: 11/21/2011
Posts: 7

I just tried setting both of the passphrases and its strange because I still get the exception once but then it successfully decrypts. Before when I was debugging I would get the exception multiple times and no decryption. Does anyone know why that could be?

Oh and thank you so much for the advice thus far.
#18327
Posted: 11/29/2011 17:38:20
by Ken Ivanov (EldoS Corp.)

Great, we are glad that the things are working for you now.

The AV you get is an intentional one. It is utilised by SecureBlackbox internals to track the genuineness of certain objects (or the lack of it, to be exact). This exception is caught and handled internally. Normally you should not do anything about it - it is only reported by the debugger while running the application from within the IDE; it won't be noticeable when the application is running in a standalone way. Still, you can make the debugger not stop on such kind of exceptions by adding EAccessViolation to the ignored exception list (Tools -> Debugger Options -> Language Exceptions -> Add -> type "EAccessViolation" and press OK).

Reply

Statistics

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