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.Sh DESCRIPTION 34This library provides hashing routines for the following suites of hash 35functions: 36.Bl -bullet -offset indent -compact 37.It 38MD4 39.Pq RFC1320 40.It 41MD5 42.Pq RFC1321 43.It 44SHA1 45.Pq RFC3174 46.It 47SHA256 48.Pq FIPS 180-2 49.It 50SHA384 51.Pq FIPS 180-2 52.It 53SHA512 54.Pq FIPS 180-2 55.El 56.Sh INTERFACES 57The shared object 58.Sy libmd.so.1 59provides the public interfaces defined below. 60See 61.Xr Intro 3 62for additional information on shared object interfaces. 63.Bl -column -offset indent ".Sy SHA2Update" ".Sy SHA2Update" 64.It Sy MD4Final Ta Sy MD4Init 65.It Sy MD4Update Ta Sy md5_calc 66.It Sy MD5Final Ta Sy MD5Init 67.It Sy MD5Update Ta Sy SHA1Final 68.It Sy SHA1Init Ta Sy SHA1Update 69.It Sy SHA2Final Ta Sy SHA2Init 70.It Sy SHA2Update Ta "" 71.El 72.Sh SECURITY 73The MD4 and MD5 algorithms are currently considered weak for cryptographic use. 74The algorithms should be used only for compatibility with legacy systems or 75protocols. 76.Pp 77The SHA1 algorithm is also believed to have some weaknesses. 78Migration to one of the SHA2 algorithms \(em including SHA256, SHA386 or SHA512 79\(em is highly recommended when data formats and on wire protocols support the 80use of SHA2. 81.Sh FILES 82.Bl -tag -width Ds 83.It Pa /lib/libmd.so.1 8432-bit shared object 85.It Pa /lib/64/libmd.so.1 8664-bit shared object 87.El 88.Sh INTERFACE STABILITY 89.Sy Committed 90.Sh MT-LEVEL 91.Sy MT-Safe 92