RE: Encryption for a log and Unicode Characters...? Yikes!



Hello KH,

Thank you for replying.

We are looking for a simple way to "encrypt" text to a log file in real time
that has very low overhead for the processor, yet still keeping the log files
the same size.

We decided that a simple distortion of the ASCII values would suffice
according to an offset, like in the code below:

buildString += (char)(charString[i] - (31 - (key2)));

// ex, could be: buildString += (char)(charString[i] - 25);
// so a lower case g (103 on ASCII table) would print as a capital N (78 on
ASCII Table)

This is located in a while loop performing this on every character. I
though that I could shift as low as 31 downwards nd still be safe since
notepad shows symbols for ALT+1 and so on.

This is sort of like a kids decoder ring saying that an A really is a L and
so forth, except key2 is randomized each time so it is harder for the person
reading the log line-by-line to translate and read.

This would cause our log files to be the same size since it is just a 1-to-1
character substitution.

Not very secure, but it will deture the bulk of the people from reading our
logs like they have in the past.

However, I did find this article from The Code Project in light of you
suggested. ...

http://www.codeproject.com/csharp/Base64EncDec.asp

It almost appears this method will cause our logs to grow by about 30%...so
I will have to check on that. I don't know how much overhead this is for the
processor either so I will have to bench mark it.

Thanks,

Rob K

"KH" wrote:

> What exactly are you trying to do? I think you're confusing encoding and
> encrypting.
>
> Assuming you're writing text to your log file, it is already encoded in one
> of many many many text encodings (like us-ascii, Windows-1252, UTF-32,
> iso-8859-13, big5, ...)
>
> As a guess you may want to look up Base 64 encoding - it may accomplish what
> you want.
>
>
> "RobKinney1" wrote:
>
> > Hello everyone... This may sound really stupid, but it is something I have
> > been working on all day and haven't found a solution yet.
> >
> > If you go into Notepad and try the keystroke ALT+4, you get a nice little
> > diamond. Infact, you can do this all the way up to 127 showing different
> > characters including those similar with the ASCII table for letters and
> > numbers.
> >
> > "Oh," I thought, "this could be the simple way for very simple encoding of
> > our log files." We are looking for an efficient way of encoding log files in
> > real time. Doing simple subtractions and additions on the character value to
> > offset them would be confusing for most novices to figure out upon
> > inspections of the log file (we are not looking for anything ultra secure
> > here).
> >
> > But when I run my program and it starts logging the file, I get nice little
> > boxes instead of the images. Even in debug mode those characters (var =
> > "☺";) will turn to boxes as well before even going out to the file.
> >
> > I tried using the System.Text.Encoding stuff, but I get confused while
> > working with it.... perhaps this is not the correct thing to use.
> >
> > Does anyone know how I can preserve those characters and put them to a log
> > file? Or is there a simpler way to encode my log file in real time? (
> > Rijndael and
> > TripleDES algs make our log files way to large).
> >
> > Thank you all for reading this.
.



Relevant Pages

  • RE: Encryption for a log and Unicode Characters...? Yikes!
    ... > that has very low overhead for the processor, yet still keeping the log files ... > We decided that a simple distortion of the ASCII values would suffice ... > This is located in a while loop performing this on every character. ... > reading the log line-by-line to translate and read. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: reading log files in real time
    ... > I'm looking for a way to read log files in real time, ... The sender therefore does ... > this message which arise as a result of e-mail transmission. ...
    (perl.beginners)
  • reading log files in real time
    ... I'm looking for a way to read log files in real time, ... E-mail transmission cannot be guaranteed to be secure or error-free as ... The sender therefore does ...
    (perl.beginners)
  • [opensuse] How can I setup live viewing of logs via a web browser?
    ... Is there a way I can view my logs via a web browser in real time, ... I know I can use apache ssi, but it didn't seem to parse the files correctly. ... Having a syslog server, and having people be able to get to their applications log files from a single web page. ...
    (SuSE)
  • Python Class for Apache log analysis
    ... I am looking for a python package that I could employ to analyze ... Apache's log files in real time. ... scripts, but most of them are outdated, while others are ...
    (comp.lang.python)