Encrypted Log Feature

Aug 24, 2011 at 9:15 PM

It would really place the product in a pro category if it were able to produce encrypted binary log files.

If I recall correctly, .NET has functionality to encrypt using AES. It should be a separate enable/disable feature...

Coordinator
Aug 25, 2011 at 12:59 AM

I'm actually working on that now.  I don't think it will be very difficult.  Here's my plan...

The application that uses the logger will need to provide a password and an optional hint.  The logger will generate an SHA1 hash from the password and store it in the file with the hint.  It will also generate an AES key from the password (NOT stored in the file) and use it to encrypt the log messages.  The Viewer will detect that the log is encrypted and prompt the user for the password (displaying the hint).  The viewer will hash whatever the user enters and compare it to the hash stored in the file.  If it matches, the viewer will regenerate the AES key from the password and use it to decrypt the messages. 

The hard part will be for you to keep the password secret.  If you hard-code a static password in your application, anyone with access to your code will know the password for all your logs.  The same is true for anyone to whom you give the password just to look at one log.  I was thinking that maybe the application could generate a random hint and, using a secret algorithm, generate the password from that.  Thus, each file would have a different password.  To open a given file, you would have to take the hint displayed by the viewer and run it through the same algorithm to get the password.  Now, instead of keeping the password secret you have to keep the algorithm (and the code that implements it) secret, so that may not be much better.

Also, if you don't obfuscate your assembly, anyone who knows how to use Reflector can de-compile it and get the source code.  From that, they can figure out your hard-coded password or your password algorithm.

Aug 25, 2011 at 4:11 AM

well, I have very little experience with PK encrypting...

I's build something that has obfiscation and without giving the user to see the log EVER.
ONLY the developer should be able to see the log. The user will use some unpublish hot key to generate the log that will toggle log on and log off.

another option in the scenario that user has a problem and you need his log, you reply to his email request with Activation key (that you generate based on his data: CPU,HD,his email) then he will be able to generate encrypted log based on this key and email it to developer that will be able to view it by using Unlock key...somethig like that.

Anyway, it seems you know what you are doing...