1.0.14.28: small FGEN improvements
[sbcl/jsnell.git] / contrib / sb-md5 / README
blobf44c3063fc481b29a9d23905ad2771f3674abae6
1 This module implements the RFC1321 "MD5" Message Digest Algorithm
3 The implementation for CMUCL was largely done by Pierre Mai, with help
4 from denizens of the cmucl-help mailing list.  Since CMUCL and SBCL
5 are similar in many respects, it was not too difficult to extend the
6 low-level implementation optimizations for CMUCL to SBCL;
7 consequently, performance is within spitting distance of
8 implementations of the algorithm in more static languages.
10 Notes:
11   * the algorithm includes a bitwise rotation of a 32-bit field.
12     Here, this is implemented by using the SB-ROTATE-BYTE module,
13     providing functionality for rotation of arbitrary bitfields.
14     However, this will perform extremely badly unless a low-level
15     implementation is available on the target for rotation, either
16     natively, as on the x86, or synthetically (through two shifts and
17     a logical or) on the sparc.  At present, only the x86 has a fast
18     implementation; therefore, do not be surprised if computing
19     message digests takes a long time on other hardware.
20     Contributions or even requests for implementation of 32-bit
21     ROTATE-BYTE on other platforms are welcome.
23   * the algorithm includes an addition modulo 2^32.  This is
24     implemented here for SBCL by compiler transforms on the high-level
25     description of this modular arithmetic, so although the code looks
26     like a naive implementation it actually compiles to the obvious
27     machine code.  The abuse of EXT:TRULY-THE was not robust and
28     turned out not to work on platforms where the underlying hardware
29     was 64-bit.
31   * the "high-level" entry points to the md5 algorithm are
32     MD5SUM-FILE, MD5SUM-STREAM and MD5SUM-SEQUENCE (despite its name,
33     the last only acts on vectors).
35   * there are some more notes in the md5.lisp source file.
37 Christophe Rhodes, 2003-05-16