Documentation can be found at http://tcllib.sourceforge.net/doc/md5.html
Anyone with some tips for the novice as to common uses for md5 and sha1?
DL - Here are some common uses for md5:
md5 is older and more commonly used than sha1 but sha1 is considered more secure. However, for most purposes, md5 is good enough.
PT - SHA and MD5 are both enhanced digests based upon the MD4 algorithm. Although MD4 has not been broken - attacks have been demonstrated against the first two rounds and separately against the final round. The publication of these cryptanalytical attacks lead to a strengthend algorithm - MD5. See the sha1 page for details of how that has been sthrengthened. For MD5, the enahancements involve adding another round, adding a unique constant into each step, changing the round 2 function G to be less symmetrical. Each step now also includes the result of the previous step to speed up the avalanche effect. See [BOOK: Applied Cryptography pp 436].
Fast alternatives include mhtcl and ...
The tcllib implementation provides a Tcl only MD5 but it will defer to the md5 from the Trf package if that is available.
Salvatore Sanfilippo: A pure TCL implementation is at http://expect.nist.gov/md5pure/
jmn 2004-02-01 Are there some gotchas the novice user should be aware of here? What happens when you use the binary value returned by md5::md5 as part of a string, as in the following snippet taken from Tuplespace
proc tid {tuple} { return "\#Tuple[::md5::md5 $tuple]" }
See my comments about half way down that page. Basically it looks like md5::md5 of the string {hello there test etc} returns a value that includes a carriage return. As I guess can be seen by the existence of 0D when you look at the hex result:
% md5 -hex {hello there test etc} FC7EB2BA07710DECECC688BCEA5BB323
I assume there may be other characters that may cause problems when using the binary result in a string - so presumably one should always use the -hex option for this sort of situation(?)
When and how does one use the binary result then?
Category Package, subset Tcllib, Category Cryptography