| 1 |
MD5 Message-Digest Code |
| 2 |
======================= |
| 3 |
|
| 4 |
This is the code being used to implement encoding (and hence security) for the acedb |
| 5 |
password system. |
| 6 |
|
| 7 |
|
| 8 |
This directory contains: |
| 9 |
------------------------ |
| 10 |
|
| 11 |
README this file (sic). |
| 12 |
|
| 13 |
rfc1321.txt description of the MD5 algorithm and code (do _not_ alter this document, |
| 14 |
it is the original rfc). |
| 15 |
|
| 16 |
rfc2617.txt description of the use of digests/MD5 for http (useful background info.). |
| 17 |
|
| 18 |
global.h header to define various basic types for the MD5 code and test programs. |
| 19 |
|
| 20 |
md5.h the MD5 interface header. |
| 21 |
|
| 22 |
md5c.c the MD5 implementation. |
| 23 |
|
| 24 |
mddriver.c a standalone MD5 test program. |
| 25 |
|
| 26 |
test.sample an example of the output of mddriver.c run on Linux and Alpha. |
| 27 |
|
| 28 |
|
| 29 |
digcalc.h header for code to implement password/nonce digests as in http. |
| 30 |
|
| 31 |
digcalc.c routines to implement password/nonce code as in http. |
| 32 |
|
| 33 |
digtest.c a standalone password/nonce test program. |
| 34 |
|
| 35 |
|
| 36 |
About the code: |
| 37 |
--------------- |
| 38 |
This code was produced by others for public domain use where data must be encrypted with |
| 39 |
reasonable security. The md5 code was extracted from rfc1321.txt and the digest code |
| 40 |
was extracted from rfc2617.txt which are available (along with many other documents |
| 41 |
about the internet/security etc) at ftp://ftp.isi.edu |
| 42 |
|
| 43 |
The code is digest code where "digest" is a term used to mean the mangling of some data, |
| 44 |
usually a password, in a system where the data is passed between client & server only |
| 45 |
in encrypted form. |
| 46 |
|
| 47 |
The code has intentionally been left in the form in which it was extracted from the |
| 48 |
rfc texts at the ftp site, it's not pretty but it is the original code. |
| 49 |
|
| 50 |
The test programs mddriver.c and digtest.c have been included so that the code can be |
| 51 |
tested if any alterations have to be made to the code. |
| 52 |
|
| 53 |
|
| 54 |
======================================================================================= |
| 55 |
Here are some comments on what I needed to do to get it to compile/run correctly: |
| 56 |
|
| 57 |
|
| 58 |
General changes |
| 59 |
--------------- |
| 60 |
Had to change include paths a bit to <wmd5/nnnn.h> to ensure the includes were found |
| 61 |
correctly. |
| 62 |
|
| 63 |
The digXXX code had a number of problems including C++ style "//" comments and extraneous |
| 64 |
semicolons at the end of functions (!?*), I just fixed these willy nilly. |
| 65 |
|
| 66 |
global.h |
| 67 |
-------- |
| 68 |
|
| 69 |
1) Had a problem with code not working correctly on a 64-bit processor, the following |
| 70 |
typedef in this header is clearly wrong... |
| 71 |
|
| 72 |
/* UINT4 defines a four byte word */ |
| 73 |
typedef unsigned long int UINT4; |
| 74 |
|
| 75 |
this will be an 8 byte word on alphas and most other 64-bit machines. Once this was |
| 76 |
corrected to produce 4 byte 'words' by removing the 'long' keyword the code compiled |
| 77 |
and the test programs produced the correct output. |
| 78 |
|
| 79 |
2) Made PROTOTYPES the default as we always want ANSI C behaviour. |
| 80 |
|
| 81 |
digcalc.c |
| 82 |
--------- |
| 83 |
|
| 84 |
1) contained a reference to a function called stricmp(), I assumed that this was |
| 85 |
the same as strcmp and this seems to be true. This is not an important problem. |
| 86 |
|