mdX.3 (0552350ecc55f34e3385dc06abf3c9c45092b332) mdX.3 (dc2af37d961f722d07a89e658782e15a977e5549)
1.\"
2.\" ----------------------------------------------------------------------------
3.\" "THE BEER-WARE LICENSE" (Revision 42):
4.\" <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
5.\" can do whatever you want with this stuff. If we meet some day, and you think
6.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7.\" ----------------------------------------------------------------------------
8.\"

--- 30 unchanged lines hidden (view full) ---

39.Ft "char *"
40.Fn MDXFile "const char *filename" "char *buf"
41.Ft "char *"
42.Fn MDXFileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
43.Ft "char *"
44.Fn MDXData "const unsigned char *data" "unsigned int len" "char *buf"
45.Sh DESCRIPTION
46The MDX functions calculate a 128-bit cryptographic checksum (digest)
1.\"
2.\" ----------------------------------------------------------------------------
3.\" "THE BEER-WARE LICENSE" (Revision 42):
4.\" <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
5.\" can do whatever you want with this stuff. If we meet some day, and you think
6.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7.\" ----------------------------------------------------------------------------
8.\"

--- 30 unchanged lines hidden (view full) ---

39.Ft "char *"
40.Fn MDXFile "const char *filename" "char *buf"
41.Ft "char *"
42.Fn MDXFileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
43.Ft "char *"
44.Fn MDXData "const unsigned char *data" "unsigned int len" "char *buf"
45.Sh DESCRIPTION
46The MDX functions calculate a 128-bit cryptographic checksum (digest)
47for any number of input bytes. A cryptographic checksum is a one-way
47for any number of input bytes.
48A cryptographic checksum is a one-way
48hash-function, that is, you cannot find (except by exhaustive search)
49hash-function, that is, you cannot find (except by exhaustive search)
49the input corresponding to a particular output. This net result is
50a ``fingerprint'' of the input-data, which doesn't disclose the actual
51input.
50the input corresponding to a particular output.
51This net result is a
52.Dq fingerprint
53of the input-data, which doesn't disclose the actual input.
52.Pp
53MD2 is the slowest, MD4 is the fastest and MD5 is somewhere in the middle.
54MD2 can only be used for Privacy-Enhanced Mail.
55MD4 has now been broken; it should only be used where necessary for
56backward compatibility.
57MD5 has not yet (1999-02-11) been broken, but sufficient attacks have been
54.Pp
55MD2 is the slowest, MD4 is the fastest and MD5 is somewhere in the middle.
56MD2 can only be used for Privacy-Enhanced Mail.
57MD4 has now been broken; it should only be used where necessary for
58backward compatibility.
59MD5 has not yet (1999-02-11) been broken, but sufficient attacks have been
58made that its security is in some doubt. The attacks on both MD4 and MD5
59are both in the nature of finding ``collisions'' \- that is, multiple
60made that its security is in some doubt.
61The attacks on both MD4 and MD5
62are both in the nature of finding
63.Dq collisions
64\[en]
65that is, multiple
60inputs which hash to the same value; it is still unlikely for an attacker
61to be able to determine the exact original input given a hash value.
62.Pp
63The
64.Fn MDXInit ,
65.Fn MDXUpdate ,
66and
67.Fn MDXFinal
66inputs which hash to the same value; it is still unlikely for an attacker
67to be able to determine the exact original input given a hash value.
68.Pp
69The
70.Fn MDXInit ,
71.Fn MDXUpdate ,
72and
73.Fn MDXFinal
68functions are the core functions. Allocate an MDX_CTX, initialize it with
74functions are the core functions.
75Allocate an
76.Vt MDX_CTX ,
77initialize it with
69.Fn MDXInit ,
70run over the data with
71.Fn MDXUpdate ,
72and finally extract the result using
73.Fn MDXFinal .
74.Pp
75The
76.Fn MDXPad

--- 117 unchanged lines hidden ---
78.Fn MDXInit ,
79run over the data with
80.Fn MDXUpdate ,
81and finally extract the result using
82.Fn MDXFinal .
83.Pp
84The
85.Fn MDXPad

--- 117 unchanged lines hidden ---