aboutsummaryrefslogtreecommitdiff
path: root/lib/libmd/sha.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libmd/sha.3')
-rw-r--r--lib/libmd/sha.340
1 files changed, 8 insertions, 32 deletions
diff --git a/lib/libmd/sha.3 b/lib/libmd/sha.3
index 20a1e5639dde..49ee322eacab 100644
--- a/lib/libmd/sha.3
+++ b/lib/libmd/sha.3
@@ -7,9 +7,8 @@
.\" ----------------------------------------------------------------------------
.\"
.\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp
-.\" $FreeBSD$
.\"
-.Dd May 21, 2019
+.Dd February 6, 2023
.Dt SHA 3
.Os
.Sh NAME
@@ -76,16 +75,9 @@ a
.Dq fingerprint
of the input-data, which does not disclose the actual input.
.Pp
-.Tn SHA
-(or
-.Tn SHA-0 )
-is the original Secure Hash Algorithm specified in
-.Tn FIPS
-160.
-It was quickly proven insecure, and has been superseded by
-.Tn SHA-1 .
-.Tn SHA-0
-is included for compatibility purposes only.
+SHA (or SHA-0) is the original Secure Hash Algorithm specified in FIPS 160.
+It was quickly proven insecure, and has been superseded by SHA-1.
+SHA-0 is included for compatibility purposes only.
.Pp
The
.Fn SHA1_Init ,
@@ -109,8 +101,7 @@ is a wrapper for
.Fn SHA1_Final
which converts the return value to a 41-character
(including the terminating '\e0')
-.Tn ASCII
-string which represents the 160 bits in hexadecimal.
+ASCII string which represents the 160 bits in hexadecimal.
.Pp
.Fn SHA1_File
calculates the digest of a file, and uses
@@ -173,7 +164,7 @@ may return NULL when underlying
.Xr fstat 2 ,
.Xr lseek 2 ,
or
-.Xr SHA1_End 2
+.Xr SHA1_End 3
fail.
.Sh SEE ALSO
.Xr md4 3 ,
@@ -188,23 +179,8 @@ These functions appeared in
.Sh AUTHORS
The core hash routines were implemented by Eric Young based on the
published
-.Tn FIPS
-standards.
+FIPS standards.
.Sh BUGS
-The
-.Tn SHA1
-algorithm has been proven to be vulnerable to practical collision
+The SHA1 algorithm has been proven to be vulnerable to practical collision
attacks and should not be relied upon to produce unique outputs,
.Em nor should it be used as part of a new cryptographic signature scheme.
-.Pp
-The
-.Tn IA32
-(Intel) implementation of
-.Tn SHA-1
-makes heavy use of the
-.Ql bswapl
-instruction, which is not present on the original 80386.
-Attempts to use
-.Tn SHA-1
-on those processors will cause an illegal instruction trap.
-(Arguably, the kernel should simply emulate this instruction.)