[I replied to Russ, but others might be interested in this, too. -Dave]

Russ Nelson wrote:

>Has anyone coded MD5 (message digest 5) in djb-style C?

DJB has. Back in '93/'94 he wrote a package called "fingerprint" that
included it. Unfortunately, he seems to have orphaned it.

>From the README:

This is the fingerprint 0.75 package, gamma.
940205
Daniel J. Bernstein, [EMAIL PROTECTED]

The fingerprint program produces a base-64-sanely-encoded fingerprint of
its input. I imagine this fingerprint as something universal and
permanent, which people will use forever. If the fingerprint is ever
broken, I'd rather make an entirely new version than try to extend this
one.

A fingerprint is 76 characters long. What does it contain? Here's a list:

1. A Snefru-8 (version 2.5, 8 passes, 512->256) hash.
   (Code derived from the Xerox Secure Hash Function.)
2. An MD5 hash, as per RFC 1321.
   (Code derived from the RSADSI MD5 Message-Digest Algorithm.)
3. A CRC checksum, as in the new cksum utility.
4. Length modulo 2^40.

The output format is not expected to be compatible with anything.
However, I have helper utilities which take a fingerprint and produce 
the purported output of Merkle's snefru program (fptosnefru), the 
purported output of RSADSI's mddriver -x (fptomd5), or the purported 
output of the POSIX cksum program (fptocksum).

Also included: (1) a clone of the snefru program, with some extra 
features; (2) a cksum implementation; (3) an md5 driver; (4) libraries
with a uniform interface for calculating these hashes; (5) some 
documentation.

----snip----

-Dave

Reply via email to