Sunday, June 28, 2009

TEncryption (Computer Programming)

Update 2012-02-08: See part 2.

I just got an email saying that my TEncryption program is going to be hosted on softpedia (

It was 3 years ago that I created this program, and completely forgot about it until today. I made it open source, and wrote it in java (so it's platform-independent). It's my own algorithm up to 2^31 bit encryption (only because of memory issues); feel free to look at the source code to learn how it works.

I basically just want to say a little bit about an idea I developed for extending fixed-length hash algorithms to be variable-length hash algorithms. TEncryption used MD5, which I will probably have to change to SHA2 due to the fact that MD5 has been shown to be weak. However, the idea I had (outlined below) is generalizable to any hash algorithm, so that shouldn't be a problem.

The basic flow of symmetric private key encryption is as follows:

A problem arises, however, when you want an 8-bit private key, but only have a 4-bit hash function available. The steps outlined below are how I overcame this problem.

The final variable-length hash algorithm is only as strong as the underlying fixed-length hash algorithm used. In my case, I used this idea to extend the 128-bit MD5 hash algorithm to create variable-length keys. Some implementation choices exist when the hash algorithm's bitlength is not a power of 2 (or a fraction of the desired key's bitlength), and when the fixed-length hash algorithm has a greater bitlength than the variable-length key (not recommended). Check out the source file in the TEncryption program above to see my implementation of this.

Perhaps in another post I'll explain my underlying encryption algorithm I created but I'm not in the mood right now. Like I said, the source code is all there.

Rob, out.

Saturday, June 27, 2009

First Post

This is my first blog post. I recently got a twitter account, and figured this was the next logical progression. Not sure what I'll write here, or even how often I'll update it, but I figure this blog will be good to have, at least to have it registered if I ever want to use it more extensively in the future.

My other sites are: