From 8f9a6a740a805656d9ec4736e3213cfc7d276548 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Tue, 27 Feb 2018 20:28:06 +0000 Subject: Garbage collect MD2 documentation. We have no code implementing those functions. --- src/lib/libcrypto/man/EVP_DigestInit.3 | 15 ++----- src/lib/libcrypto/man/MD5.3 | 74 ++++++++-------------------------- src/lib/libcrypto/man/crypto.3 | 5 +-- 3 files changed, 21 insertions(+), 73 deletions(-) diff --git a/src/lib/libcrypto/man/EVP_DigestInit.3 b/src/lib/libcrypto/man/EVP_DigestInit.3 index 9e2f3d0665..8b296ee24d 100644 --- a/src/lib/libcrypto/man/EVP_DigestInit.3 +++ b/src/lib/libcrypto/man/EVP_DigestInit.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: EVP_DigestInit.3,v 1.7 2018/02/18 20:11:16 schwarze Exp $ +.\" $OpenBSD: EVP_DigestInit.3,v 1.8 2018/02/27 20:28:06 schwarze Exp $ .\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000 .\" selective merge up to: OpenSSL a95d7574 Jul 2 12:16:38 2017 -0400 .\" @@ -51,7 +51,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: February 18 2018 $ +.Dd $Mdocdate: February 27 2018 $ .Dt EVP_DIGESTINIT 3 .Os .Sh NAME @@ -80,7 +80,6 @@ .Nm EVP_MD_CTX_block_size , .Nm EVP_MD_CTX_type , .Nm EVP_md_null , -.Nm EVP_md2 , .Nm EVP_md5 , .Nm EVP_md5_sha1 , .Nm EVP_sha1 , @@ -203,8 +202,6 @@ .Ft const EVP_MD * .Fn EVP_md_null void .Ft const EVP_MD * -.Fn EVP_md2 void -.Ft const EVP_MD * .Fn EVP_md5 void .Ft const EVP_MD * .Fn EVP_md5_sha1 void @@ -417,7 +414,6 @@ is associated with RSA so this will return Since digests and signature algorithms are no longer linked this function is only retained for compatibility reasons. .Pp -.Fn EVP_md2 , .Fn EVP_md5 , .Fn EVP_sha1 , .Fn EVP_sha224 , @@ -428,7 +424,7 @@ and .Fn EVP_ripemd160 return .Vt EVP_MD -structures for the MD2, MD5, SHA1, SHA224, SHA256, SHA384, SHA512 and +structures for the MD5, SHA1, SHA224, SHA256, SHA384, SHA512 and RIPEMD160 digest algorithms respectively. .Pp .Fn EVP_md5_sha1 @@ -555,7 +551,6 @@ is .Dv NULL . .Pp .Fn EVP_md_null , -.Fn EVP_md2 , .Fn EVP_md5 , .Fn EVP_md5_sha1 , .Fn EVP_sha1 , @@ -641,7 +636,6 @@ and were added in OpenSSL 0.9.7. .Pp .Fn EVP_md_null , -.Fn EVP_md2 , .Fn EVP_md5 , .Fn EVP_sha1 , .Fn EVP_dss , @@ -663,6 +657,3 @@ and later, so now can be used with RSA and DSA; there is no need to use .Fn EVP_dss1 any more. -.Pp -OpenSSL 1.0 and later does not include the MD2 digest algorithm in the -default configuration due to its security weaknesses. diff --git a/src/lib/libcrypto/man/MD5.3 b/src/lib/libcrypto/man/MD5.3 index 1f5fe37ef9..ebb5ba6566 100644 --- a/src/lib/libcrypto/man/MD5.3 +++ b/src/lib/libcrypto/man/MD5.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: MD5.3,v 1.4 2016/11/27 16:20:15 schwarze Exp $ +.\" $OpenBSD: MD5.3,v 1.5 2018/02/27 20:28:06 schwarze Exp $ .\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 .\" .\" This file was written by Ulf Moeller and @@ -49,46 +49,20 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: November 27 2016 $ +.Dd $Mdocdate: February 27 2018 $ .Dt MD5 3 .Os .Sh NAME -.Nm MD2 , .Nm MD4 , .Nm MD5 , -.Nm MD2_Init , -.Nm MD2_Update , -.Nm MD2_Final , .Nm MD4_Init , .Nm MD4_Update , .Nm MD4_Final , .Nm MD5_Init , .Nm MD5_Update , .Nm MD5_Final -.Nd MD2, MD4, and MD5 hash functions +.Nd MD4 and MD5 hash functions .Sh SYNOPSIS -.In openssl/md2.h -.Ft unsigned char * -.Fo MD2 -.Fa "const unsigned char *d" -.Fa "unsigned long n" -.Fa "unsigned char *md" -.Fc -.Ft int -.Fo MD2_Init -.Fa "MD2_CTX *c" -.Fc -.Ft int -.Fo MD2_Update -.Fa "MD2_CTX *c" -.Fa "const unsigned char *data" -.Fa "unsigned long len" -.Fc -.Ft int -.Fo MD2_Final -.Fa "unsigned char *md" -.Fa "MD2_CTX *c" -.Fc .In openssl/md4.h .Ft unsigned char * .Fo MD4 @@ -134,23 +108,20 @@ .Fa "MD5_CTX *c" .Fc .Sh DESCRIPTION -MD2, MD4, and MD5 are cryptographic hash functions with a 128-bit +MD4 and MD5 are cryptographic hash functions with a 128-bit output. .Pp -.Fn MD2 , -.Fn MD4 , +.Fn MD4 and .Fn MD5 -compute the MD2, MD4, and MD5 message digest of the +compute the MD4 and MD5 message digest of the .Fa n bytes at .Fa d and place it in .Fa md , which must have space for -.Dv MD2_DIGEST_LENGTH No == -.Dv MD4_DIGEST_LENGTH No == -.Dv MD5_DIGEST_LENGTH No == 16 +.Dv MD4_DIGEST_LENGTH No == Dv MD5_DIGEST_LENGTH No == 16 bytes of output. If .Fa md @@ -161,49 +132,40 @@ the digest is placed in a static array. The following functions may be used if the message is not completely stored in memory: .Pp -.Fn MD2_Init +.Fn MD5_Init initializes a -.Vt MD2_CTX +.Vt MD5_CTX structure. .Pp -.Fn MD2_Update +.Fn MD5_Update can be called repeatedly with chunks of the message to be hashed .Pq Fa len No bytes at Fa data . .Pp -.Fn MD2_Final +.Fn MD5_Final places the message digest in .Fa md , which must have space for -.Dv MD2_DIGEST_LENGTH No == 16 +.Dv MD5_DIGEST_LENGTH No == 16 bytes of output, and erases the -.Vt MD2_CTX . +.Vt MD5_CTX . .Pp .Fn MD4_Init , .Fn MD4_Update , -.Fn MD4_Final , -.Fn MD5_Init , -.Fn MD5_Update , and -.Fn MD5_Final +.Fn MD4_Final are analogous using an .Vt MD4_CTX -and -.Vt MD5_CTX structure. .Pp Applications should use the higher level functions .Xr EVP_DigestInit 3 etc. instead of calling these hash functions directly. .Sh RETURN VALUES -.Fn MD2 , -.Fn MD4 , +.Fn MD4 and .Fn MD5 return pointers to the hash value. .Pp -.Fn MD2_Init , -.Fn MD2_Update , -.Fn MD2_Final , .Fn MD4_Init , .Fn MD4_Update , .Fn MD4_Final , @@ -215,12 +177,8 @@ return 1 for success or 0 otherwise. .Sh SEE ALSO .Xr EVP_DigestInit 3 .Sh STANDARDS -RFC 1319, RFC 1320, RFC 1321 +RFC 1320, RFC 1321 .Sh HISTORY -.Fn MD2 , -.Fn MD2_Init , -.Fn MD2_Update , -.Fn MD2_Final , .Fn MD5 , .Fn MD5_Init , .Fn MD5_Update , diff --git a/src/lib/libcrypto/man/crypto.3 b/src/lib/libcrypto/man/crypto.3 index 2bba237ad6..7f0816903e 100644 --- a/src/lib/libcrypto/man/crypto.3 +++ b/src/lib/libcrypto/man/crypto.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: crypto.3,v 1.16 2017/01/07 08:46:13 jmc Exp $ +.\" $OpenBSD: crypto.3,v 1.17 2018/02/27 20:28:06 schwarze Exp $ .\" OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100 .\" .\" This file was written by Ulf Moeller and @@ -49,7 +49,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: January 7 2017 $ +.Dd $Mdocdate: February 27 2018 $ .Dt CRYPTO 3 .Os .Sh NAME @@ -89,7 +89,6 @@ and .Sy Authentication codes and hash functions offered include .Xr HMAC 3 , -.Xr MD2 3 , .Xr MD4 3 , .Xr MD5 3 , .Xr RIPEMD160 3 , -- cgit v1.2.3-55-g6feb