Just released my ultra cool crypto server code
I have from time to time needed to be able to encrypt/decrypt something, but didn’t want to hassle with using gnupg/whatever to do it. So there was my itch, now the scratch was an opportunity to write some C code (which I hadn’t done in a long time).
I have to say it was so much fun writing this- the part that took some work was running it through Valgrind, and getting rid of what memory leaks were left. The testing was extensive, and I ran it through a test suite I wrote in Perl for quite a while until I stopped it at 218 million transactions, and it still only used about 900k of ram (memory usage never grew). Pretty cool.
Basically, what this thing does is listen on a tcp port or socket, and waits for commands. Some of the common ones are doing aes256 encryption/decription (automatically converting it to base64), doing RMD160 hashing, and statistics gathering. It’s ultra fast becuase I create the encrypt/decrypt key contexts once, so for each new connection, it saves quite a bit of work.
The development was done on my Open Solaris box, but compiles cleanly on linux as well, and is 64 bit safe. I take advantage of pthreads, so each new connection spawns another thread, so I get about 3k connections/second sustained on my server. Pretty sweet.
Anyway, here’s the link to the freshmeat page. It includes how to compile, and how to interface with it:
http://freshmeat.net/projects/cryptod/
Lastly, if you’re a big C programmer- show me some mercy as I’m sure I could have done many things better, this is the 2nd C app I wrote (the first one being mp3_check).