diff options
-rw-r--r-- | bin/md5/cksum.1 | 7 | ||||
-rw-r--r-- | bin/md5/md5.1 | 47 | ||||
-rw-r--r-- | bin/md5/sha1.1 | 43 | ||||
-rw-r--r-- | bin/md5/sha256.1 | 56 |
4 files changed, 70 insertions, 83 deletions
diff --git a/bin/md5/cksum.1 b/bin/md5/cksum.1 index 57be36a801e..085af5f26eb 100644 --- a/bin/md5/cksum.1 +++ b/bin/md5/cksum.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cksum.1,v 1.24 2013/04/15 15:54:17 millert Exp $ +.\" $OpenBSD: cksum.1,v 1.25 2013/12/29 21:19:11 jmc Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" @(#)cksum.1 8.2 (Berkeley) 4/28/95 .\" -.Dd $Mdocdate: April 15 2013 $ +.Dd $Mdocdate: December 29 2013 $ .Dt CKSUM 1 .Os .Sh NAME @@ -269,7 +269,8 @@ The .Nm cksum and .Nm sum -utilities exit 0 on success or \*(Gt0 if an error occurred. +utilities exit 0 on success, +and >0 if an error occurs. .Sh SEE ALSO .Xr md5 1 , .Xr sha1 1 , diff --git a/bin/md5/md5.1 b/bin/md5/md5.1 index ec728216ac0..a0596d009b8 100644 --- a/bin/md5/md5.1 +++ b/bin/md5/md5.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: md5.1,v 1.33 2012/09/22 20:09:43 jmc Exp $ +.\" $OpenBSD: md5.1,v 1.34 2013/12/29 21:19:11 jmc Exp $ .\" .\" Copyright (c) 2003, 2004, 2006 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -18,12 +18,12 @@ .\" Agency (DARPA) and Air Force Research Laboratory, Air Force .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" -.Dd $Mdocdate: September 22 2012 $ +.Dd $Mdocdate: December 29 2013 $ .Dt MD5 1 .Os .Sh NAME .Nm md5 -.Nd calculate a message-digest fingerprint (checksum) for a file +.Nd calculate a message digest (checksum) for a file .Sh SYNOPSIS .Nm md5 .Op Fl bpqrtx @@ -33,32 +33,25 @@ .Sh DESCRIPTION .Nm takes as input a message of arbitrary length and produces -as output a 128-bit "fingerprint" or "message digest" of the input. -It was conjectured that it would be computationally infeasible to produce -two messages having the same message digest (a collision), or to produce any -message having a given prespecified target message digest. -However, collisions have now been produced for -.Em MD5 , +as output a 128-bit message digest (checksum) of the input. +It is conjectured that it is computationally infeasible to produce +two messages having the same message digest (a collision), +or to produce any message having a given prespecified target message digest. +However, collisions have now been produced for MD5, so the use of other message digest functions, such as .Xr sha256 1 , is now preferred. .Pp -The -.Em MD5 -algorithm is intended for digital signature applications, where a -large file must be "compressed" in a secure manner before being -encrypted with a private (secret) key under a public-key cryptosystem -such as -.Em RSA . +The MD5 algorithm is intended for digital signature applications, +where a large file must be compressed in a secure manner before +being encrypted with a private (secret) key under a public-key +cryptosystem, such as RSA. .Pp The options are as follows: .Bl -tag -width Ds .It Fl b Output checksums in base64 notation, not hexadecimal. -.It Xo -.Fl c -.Op Ar checklist ... -.Xc +.It Fl c Op Ar checklist ... Compares all checksums contained in the file .Ar checklist with newly computed checksums for the corresponding files. @@ -69,8 +62,7 @@ This will validate any of the supported checksums (see If no file is given, stdin is used. .It Fl p Echoes stdin to stdout and appends the -.Em MD5 -sum to stdout. +checksum to stdout. .It Fl q Only print the checksum (quiet mode). .It Fl r @@ -90,8 +82,15 @@ by 10 for each additional flag. Runs a built-in test script. .El .Pp -The MD5 sum of each file listed on the command line is printed after the -options are processed. +The checksum of each file listed on the command line is printed +after the options are processed. +.Pp +The +.Nm +command is shorthand for: +.Bd -literal -offset indent +$ cksum -a md5 +.Ed .Sh EXIT STATUS .Ex -std md5 .Sh SEE ALSO diff --git a/bin/md5/sha1.1 b/bin/md5/sha1.1 index 5829888de8b..d2d4fd0a7c4 100644 --- a/bin/md5/sha1.1 +++ b/bin/md5/sha1.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sha1.1,v 1.31 2012/09/22 20:09:43 jmc Exp $ +.\" $OpenBSD: sha1.1,v 1.32 2013/12/29 21:19:11 jmc Exp $ .\" .\" Copyright (c) 2003, 2004, 2006 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -18,12 +18,12 @@ .\" Agency (DARPA) and Air Force Research Laboratory, Air Force .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" -.Dd $Mdocdate: September 22 2012 $ +.Dd $Mdocdate: December 29 2013 $ .Dt SHA1 1 .Os .Sh NAME .Nm sha1 -.Nd calculate a message-digest fingerprint (checksum) for a file +.Nd calculate a message digest (checksum) for a file .Sh SYNOPSIS .Nm sha1 .Op Fl bpqrtx @@ -33,33 +33,26 @@ .Sh DESCRIPTION .Nm takes as input a message of arbitrary length and produces -as output a 160-bit "fingerprint" or "message digest" of the input. +as output a 160-bit message digest (checksum) of the input. It is conjectured that it is computationally infeasible to produce -two messages having the same message digest (a collision), or to produce any -message having a given prespecified target message digest. +two messages having the same message digest (a collision), +or to produce any message having a given prespecified target message digest. However, researchers have developed theoretical attacks that significantly -reduce the amount of time needed to find a collision in -.Em SHA-1 . +reduce the amount of time needed to find a collision in SHA-1. The use of other message digest functions, such as .Xr sha256 1 , is now preferred. .Pp -The -.Em SHA-1 -algorithm is intended for digital signature applications, where a -large file must be "compressed" in a secure manner before being -encrypted with a private (secret) key under a public-key cryptosystem -such as -.Em RSA . +The SHA-1 algorithm is intended for digital signature applications, +where a large file must be "compressed" in a secure manner before +being encrypted with a private (secret) key under a public-key +cryptosystem such as RSA. .Pp The options are as follows: .Bl -tag -width Ds .It Fl b Output checksums in base64 notation, not hexadecimal. -.It Xo -.Fl c -.Op Ar checklist ... -.Xc +.It Fl c Op Ar checklist ... Compares all checksums contained in the file .Ar checklist with newly computed checksums for the corresponding files. @@ -70,8 +63,7 @@ This will validate any of the supported checksums (see If no file is given, stdin is used. .It Fl p Echoes stdin to stdout and appends the -.Em SHA-1 -sum to stdout. +checksum to stdout. .It Fl q Only print the checksum (quiet mode). .It Fl r @@ -91,15 +83,14 @@ by 10 for each additional flag. Runs a built-in test script. .El .Pp -The SHA-1 -sum of each file listed on the command line is printed after the options -are processed. +The checksum of each file listed on the command line is printed +after the options are processed. .Pp The .Nm -command is shorthand for +command is shorthand for: .Bd -literal -offset indent -cksum -a sha1 +$ cksum -a sha1 .Ed .Pp The diff --git a/bin/md5/sha256.1 b/bin/md5/sha256.1 index 937766d787b..8a8549e0e8f 100644 --- a/bin/md5/sha256.1 +++ b/bin/md5/sha256.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sha256.1,v 1.6 2013/12/23 23:00:38 tedu Exp $ +.\" $OpenBSD: sha256.1,v 1.7 2013/12/29 21:19:11 jmc Exp $ .\" .\" Copyright (c) 2003, 2004, 2006 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -18,12 +18,13 @@ .\" Agency (DARPA) and Air Force Research Laboratory, Air Force .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" -.Dd $Mdocdate: December 23 2013 $ +.Dd $Mdocdate: December 29 2013 $ .Dt SHA256 1 .Os .Sh NAME -.Nm sha256 -.Nd calculate a message-digest fingerprint (checksum) for a file +.Nm sha256 , +.Nm sha512 +.Nd calculate a message digest (checksum) for a file .Sh SYNOPSIS .Nm sha256 .Op Fl bpqrtx @@ -38,33 +39,25 @@ .Sh DESCRIPTION .Nm takes as input a message of arbitrary length and produces -as output a 256-bit "fingerprint" or "message digest" of the input. +as output a 256-bit message digest (checksum) of the input. It is conjectured that it is computationally infeasible to produce -two messages having the same message digest, or to produce any -message having a given prespecified target message digest. -.Pp -The -.Em SHA-256 -algorithm is intended for digital signature applications, where a -large file must be "compressed" in a secure manner before being -encrypted with a private (secret) key under a public-key cryptosystem -such as -.Em RSA . +two messages having the same message digest (a collision), +or to produce any message having a given prespecified target message digest. .Pp When invoked as .Nm sha512 , -the -.Em SHA-512 -algorithm is used instead, generating a 512-bit digest. +the SHA-512 algorithm is used instead, generating a 512-bit digest. +.Pp +These algorithms are intended for digital signature applications, +where a large file must be compressed in a secure manner before +being encrypted with a private (secret) key under a public-key +cryptosystem, such as RSA. .Pp The options are as follows: .Bl -tag -width Ds .It Fl b Output checksums in base64 notation, not hexadecimal. -.It Xo -.Fl c -.Op Ar checklist ... -.Xc +.It Fl c Op Ar checklist ... Compares all checksums contained in the file .Ar checklist with newly computed checksums for the corresponding files. @@ -75,8 +68,7 @@ This will validate any of the supported checksums (see If no file is given, stdin is used. .It Fl p Echoes stdin to stdout and appends the -.Em SHA-256 -sum to stdout. +checksum to stdout. .It Fl q Only print the checksum (quiet mode). .It Fl r @@ -96,18 +88,22 @@ by 10 for each additional flag. Runs a built-in test script. .El .Pp -The SHA-256 -sum of each file listed on the command line is printed after the options -are processed. +The checksum of each file listed on the command line is printed +after the options are processed. .Pp The .Nm -command is shorthand for +command is shorthand for: .Bd -literal -offset indent -cksum -a sha256 +$ cksum -a sha256 .Ed .Sh EXIT STATUS -.Ex -std sha256 +The +.Nm sha256 +and +.Nm sha512 +utilities exit 0 on success, +and >0 if an error occurs. .Sh SEE ALSO .Xr cksum 1 , .Xr md5 1 , |