xref: /illumos-gate/usr/src/man/man3lib/libmd.3lib (revision e3ae4b35c024af1196582063ecee3ab79367227d)
1.\"
2.\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved.
3.\" Copyright 2022 Oxide Computer Company
4.\"
5.\" The contents of this file are subject to the terms of the
6.\" Common Development and Distribution License (the "License").
7.\" You may not use this file except in compliance with the License.
8.\"
9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10.\" or http://www.opensolaris.org/os/licensing.
11.\" See the License for the specific language governing permissions
12.\" and limitations under the License.
13.\"
14.\" When distributing Covered Code, include this CDDL HEADER in each
15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16.\" If applicable, add the following below this CDDL HEADER, with the
17.\" fields enclosed by brackets "[]" replaced with your own identifying
18.\" information: Portions Copyright [yyyy] [name of copyright owner]
19.\"
20.Dd January 16, 2022
21.Dt LIBMD 3LIB
22.Os
23.Sh NAME
24.Nm libmd
25.Nd Message Digest library
26.Sh LIBRARY
27.Lb libmd
28.Sh SYNOPSIS
29.In md4.h
30.In md5.h
31.In sha1.h
32.In sha2.h
33.In sys/edonr.h
34.In sys/skein.h
35.Sh DESCRIPTION
36This library provides hashing routines for the following suites of hash
37functions:
38.Bl -bullet -offset indent -compact
39.It
40MD4
41.Pq RFC1320
42.It
43MD5
44.Pq RFC1321
45.It
46SHA1
47.Pq RFC3174
48.It
49SHA256
50.Pq FIPS 180-2
51.It
52SHA384
53.Pq FIPS 180-2
54.It
55SHA512
56.Pq FIPS 180-2
57.It
58Edon-R
59.Po
60.Rs
61.%T Cryptographic hash function Edon-R
62.Re
63.Pc
64.It
65Skein 256, 512, and 1024
66.Po
67.Rs
68.%T The Skein Hash Function Family
69.Re
70.Pc
71.El
72.Sh INTERFACES
73The shared object
74.Sy libmd.so.1
75provides the public interfaces defined below.
76See
77.Xr Intro 3
78for additional information on shared object interfaces.
79.Bl -column -offset indent ".Sy Skein1024_Final_Pad" ".Sy Skein1024_Final_Pad"
80.It Sy EdonRFinal Ta Sy EdonRHash
81.It Sy EdonRInit Ta Sy EdonRUpdate
82.It Sy MD4Final Ta Sy MD4Init
83.It Sy MD4Update Ta Sy md5_calc
84.It Sy MD5Final Ta Sy MD5Init
85.It Sy MD5Update Ta Sy SHA1Final
86.It Sy SHA1Init Ta Sy SHA1Update
87.It Sy SHA2Final Ta Sy SHA2Init
88.It Sy SHA2Update Ta Sy Skein_256_Final
89.It Sy Skein_256_Final_Pad Ta Sy Skein_256_Init
90.It Sy Skein_256_InitExt Ta Sy Skein_256_Output
91.It Sy Skein_256_Update Ta Sy Skein_512_Final
92.It Sy Skein_512_Final_Pad Ta Sy Skein_512_Init
93.It Sy Skein_512_InitExt Ta Sy Skein_512_Output
94.It Sy Skein_512_Update Ta Sy Skein1024_Final
95.It Sy Skein1024_Final_Pad Ta Sy Skein1024_Init
96.It Sy Skein1024_InitExt Ta Sy Skein1024_Output
97.It Sy Skein1024_Update Ta ""
98.El
99.Sh SECURITY
100The MD4 and MD5 algorithms are currently considered weak for cryptographic use.
101The algorithms should be used only for compatibility with legacy systems or
102protocols.
103.Pp
104The SHA1 algorithm is also believed to have some weaknesses.
105Migration to one of the SHA2 algorithms \(em including SHA256, SHA386 or SHA512
106\(em is highly recommended when data formats and on wire protocols support the
107use of SHA2.
108.Sh FILES
109.Bl -tag -width Ds
110.It Pa /lib/libmd.so.1
11132-bit shared object
112.It Pa /lib/64/libmd.so.1
11364-bit shared object
114.El
115.Sh INTERFACE STABILITY
116.Sy Committed
117.Sh MT-LEVEL
118.Sy MT-Safe
119