EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Decypting results in empty file

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.
Posted: 11/01/2010 13:56:51
by Ryan Lettow (Standard support level)
Joined: 11/01/2010
Posts: 2

Hi, I'm evaulating your SecureBlackbox.NET software to encrypt/decrypt information we are sending/receiving from a Vendor.

My problem is that I can encrypt the file, but when I decrypt the file I get an empty file result. Is there a common cause for this problem?

I'm using your example code project to create and save a new key. (Saves as two key rings: public and secret.)

Then, to encrypt I'm using a key ring with the two above keys I created. That seemes to work fine. I even sent the encrypted file to the vendor - they were also able to decrypt the file. (When I did the vendor test, I used their public key they sent me.)

But for my own internal testing, I'm trying to encrypt the file using the generated public key, then decrypt it using the private. The SW seems to run properly without error and produces a result file. However, it's always 0 bytes. I know this is my own logging, but you may recgonize some of the callbacks:

2010-11-01 11:46:50,584 [10] INFO -->Decrypting: ss_fi_data_transfer_1112010114539_21.txt.pgp
2010-11-01 11:46:50,584 [10] INFO -->CompressionAlgorithm: 0
2010-11-01 11:46:50,584 [10] INFO -->EncryptionAlgorithm: -1
2010-11-01 11:46:50,584 [10] INFO -->pgpReader.ToString: SBPGP.TElPGPReader
2010-11-01 11:46:52,115 [10] INFO -->Received OnEncrypted Event->
2010-11-01 11:46:52,115 [10] INFO --> integrityProtected: True
2010-11-01 11:46:52,115 [10] INFO --> passphraseUsed: False
2010-11-01 11:46:52,365 [10] INFO -->Done decrypting: ss_fi_data_transfer_1112010114539_21.txt.pgp
2010-11-01 11:46:52,365 [10] INFO --><MemberScoringService v1.0 Stop>

I get no errors, just an empty result. (I tried to corrupt the file and I DID get a 'tampered' error as expected.)

What am I doing wrong?

Thanks for your help,
Posted: 11/01/2010 14:16:18
by Eugene Mayevski (Team)

Do you decrypt the file with third-party application, SecureBlackbox sample application or the code you have written? Please try SecureBlackbox sample application first of all.

Sincerely yours
Eugene Mayevski
Posted: 11/01/2010 16:11:52
by Ryan Lettow (Standard support level)
Joined: 11/01/2010
Posts: 2

ok, I figured out my problem. I was using DecryptAndVerifyFile() instead of DecryptAndVerify().

Curious that the result of the other was an empty file. For the record, I don't like all the 'event callbacks' that are part of using your libraries. Especially since the calling thread seems to block until they are complete. I'm not sure I understand the point. (I realize now that's how DecryptAndVerifyFile works - like all the informational callbacks.) I would imagine that increases your support overhead.

Nevertheless, once this is all understood, the APIs worked well and were documented adequately. (which is not common these days)

Thanks for your help and quick response,
Posted: 11/02/2010 02:12:18
by Eugene Mayevski (Team)

Looks like you have to read a bit about what events do and when they are invoked. Some broken architecture has spoiled your understanding of events.

Sincerely yours
Eugene Mayevski



Topic viewed 1031 times

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


Back to top

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

Got it!