Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Decrypt data written to log file when encryption is not closed properly

843810Aug 17 2004 — edited Aug 19 2004
Hi,

I'm not an security guru but I will do my best to explain the problem.
We have a log file where all the data is encrypted before writing it to the file. The algorithm currently used is TRIPLEDES/CFB/PKCS#5 and the data is written to a filestream through a cipherstream.
The problem is if the application writing to the log file crashes or is interrupted in an uncontrolled manner resulting in that the cipherstream used to encrypt will not close properly (doFinal or what it is that has to be executed is not executed), -> the log file can not be decrypted.
This is not so good while a log file is more important than ever when an application crashes "for no reason".

My question then, is there anyone that can suggest a workaround/solution for this problem or tip of another algorithm that is more suitable for the task and where the encrypted data can be decrypted regardless of how the application/stream was closed.

BR
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2004
Added on Aug 17 2004
7 comments
368 views