0.8.0.12:
[sbcl.git] / contrib / sb-md5 / README
1 This module implements the RFC1321 "MD5" Message Digest Algorithm
2
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.
9
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.
22
23   * the algorithm includes an addition modulo 2^32.  This is
24     implemented here by (ab)using SB-EXT:TRULY-THE, to convince the
25     compiler to emit the low-level addition instruction.  This has the
26     desired consequences on 32-bit hardware, but may not work as one
27     might expect on 64-bit hardware, even if the overlying lisp is
28     32-bit.
29
30   * the "high-level" entry points to the md5 algorithm are
31     MD5SUM-FILE, MD5SUM-STREAM and MD5SUM-SEQUENCE (despite its name,
32     the last only acts on vectors).
33
34   * there are some more notes in the md5.lisp source file.
35
36 Christophe Rhodes, 2003-05-16