Encryption 101

Not many people know this, but I am a published author. By published author I mean, I have been paid for my writing. I have been published in 2600 magazine, Dragon magazine, Linux Gazette and a little known magazine called DOS Resource Guide. I have never received more than $50 payment and in the case of DOS Resource Guide, they folded before I received any payment at all.

It is really kind of sad too, because that one is probably the article I was most proud of. I wrote a qbasic encryption program that I felt was kind of clever in its implementation. Of course it would never withstand the attention of the NSA, but as I said in the article, it would keep your little sister from reading your files. Most of the qbasic encryption programs of the time simply used the password provided to seed the built in pseudo random number generator and then used the XOR function along with these pseudo random numbers to encrypt the file. I took this a step further and used this process to generate a 128 character string which I then used via my own algorithm to fill an array the size of the original file with a pad, which was then used to encrypt the file. Again, this was not military grade encryption, but I think for a first try it was a novel idea.

This lead to another project which I actually did with a friend. He decided the best way to encrypt a file was to use another file as a key. His idea was to XOR the bits in the file you wanted to encrypt with the bits in the key file. The way we built the program was it required three things to decrypt the file, a user name, a password and the key file. I used more or less the same process I used in the first program, only instead of using my own number to encrypt the file, I would use my numbers to determine the location of the bit to be XOR’d within the key file. As close as I could tell at the time, as long as you never used the same key file twice, it would be basically impossible to crack the encryption. This of course was naive thinking back in 1994, today I suspect this could be broken in a weekend using a $400 laptop.

I wish I still had this code, unfortunately it has suffered digital death as many of my early projects have. I even went looking for a copy of the DOS Resource Guide where my original program was published, but unfortunately I have not been able to find more than a few issues here and there. I guess an old short lived magazine from the early 90’s covering an obsolete operating system holds little interest for anyone these days.

Comments are closed.