The encryption used by eggdrop is in most cases based on the blowfish algorith. Unfortunately, this is a somewhat calculation-heavy encryption, making implementation in pure tcl "sluggish". I would therefore recommend implementing it as a loadable module to gain some performance.
That said, a nice site on the blowfish algorithm (with several examples in different languages) can be found here.
As for your request for premade scripts, unfortunately I can't think of any at this moment.
I simple want to encrypt a plaintext with a password, send it over an unsecure connection and decrypt it with the same key on the other point.
http://tcllib.sourceforge.net/doc/aes.html looks fine and is currently known as secure. The example on the page isn`t enough for me, I need an example for decrypt aswell.
Would be cool if someone who understand that could write an example de- and encrypt.
set key "my_key"
set data "some data blah blib"
set encrypted [aes::aes -mode cbc -dir encrypt -key $key $data]
set decrypted [aes::aes -mode cbc -dir decrypt -key $key $encrypted]
Thats how i have used it in the past, hope this helps.