to see a pure-Tcl implementation of a DES (just 56-bit encryption) go [L1 ].
This can/should go into the tcllib.
to encrypt do:
package require des DES::GetKey -encrypt <password> encryptKeysArray # or DES::GetKey -encryptVNC <password> encryptKeysArray set encryptedBlock [DES::DoBlock <PlainText8ByteBlock> encryptKeysArray] ...
to decrypt do:
package require des DES::GetKey -decrypt <password> decryptKeysArray set plainText [DES::DoBlock <Encrypted8ByteBlock> decryptKeysArray] ...
I did a pure-tcl implementation of Eric Young's fast version some years ago. The recent developement of TkVNC (pure-Tcl as well) and the missing authentication, leads me to release the code. Unfortunately, I recognize that the VNC implementation generates the key vector out of the key/password slightly different. So I reimplemented another, more readable version, whichs allows standard and VNC mode easily to be switched. I still have the old version around.