Commit Graph

41 Commits

Author SHA1 Message Date
Fernando Apesteguía
83d742d661 md5(1): Add EXAMPLES section
Add EXAMLES covering -c, -s and -r

Approved by:	bcr@, 0mp@
Differential Revision:	https://reviews.freebsd.org/D25278
2020-06-19 06:23:55 +00:00
Fernando Apesteguía
7d40dd249a md5(1): fix style in man page
Fix a bunch of style problems reported by mandoc(1) and igor:

mandoc: ./md5.1:19:71: STYLE: no blank before trailing delimiter: Nm ... rmd160,
mandoc: ./md5.1:20:23: STYLE: no blank before trailing delimiter: Nm ...  skein512,
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:33:2: STYLE: useless macro: Tn
mandoc: ./md5.1:35:2: STYLE: useless macro: Tn
mandoc: ./md5.1:42:2: STYLE: useless macro: Tn
mandoc: ./md5.1:45:2: STYLE: useless macro: Tn
mandoc: ./md5.1:47:2: STYLE: useless macro: Tn
mandoc: ./md5.1:56:2: STYLE: useless macro: Tn
mandoc: ./md5.1:58:2: STYLE: useless macro: Tn
mandoc: ./md5.1:61:2: STYLE: useless macro: Tn
mandoc: ./md5.1:66:2: STYLE: useless macro: Tn
mandoc: ./md5.1:68:2: STYLE: useless macro: Tn
mandoc: ./md5.1:104:24: STYLE: no blank before trailing delimiter: Nm skein512,
mandoc: ./md5.1:117:6: STYLE: referenced manual not found: Xr sha224 3

igor:
md5.1:46:no comma after "i.e.":either algorithm, [i.e.] to find an input that produces a specific

Approved by:	bcr@
Differential Revision: https://reviews.freebsd.org/D25277
2020-06-15 10:08:02 +00:00
Conrad Meyer
8ff3cdd1b5 Integrate SHA2-224 with userspace components
The double compilation of the kernel sources in libmd and libcrypt is
baffling, but add yet another define hack to prevent duplicate symbols.

Add documentation and SHA2-224 test cases to libmd.

Integrate with the md5(1) command, document, and add more test cases;
self-tests pass.
2018-07-09 08:19:04 +00:00
Dag-Erling Smørgrav
8d26f08e05 Fix date.
Reported by:	delphij, mckay
MFC with:	r314528
2017-03-02 14:50:01 +00:00
Dag-Erling Smørgrav
c74cccf0f8 Update to reflect that SHA-1 has now been broken.
Submitted by:	ak
MFC after:	1 week
2017-03-02 00:27:21 +00:00
Allan Jude
40d3e536c5 Add skein(3) front ends to the md5 manpage
Reported by:	emaste
2017-01-07 19:43:40 +00:00
Allan Jude
1780e40715 Implement SHA-512 truncated (224 and 256 bits)
This implements SHA-512/256, which generates a 256 bit hash by
calculating the SHA-512 then truncating the result. A different initial
value is used, making the result different from the first 256 bits of
the SHA-512 of the same input. SHA-512 is ~50% faster than SHA-256 on
64bit platforms, so the result is a faster 256 bit hash.

The main goal of this implementation is to enable support for this
faster hashing algorithm in ZFS. The feature was introduced into ZFS
in r289422, but is disconnected because SHA-512/256 support was missing.
A further commit will enable it in ZFS.

This is the follow on to r292782

Reviewed by:	cem
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D6061
2016-05-28 16:06:07 +00:00
Allan Jude
7a3f5d11fb Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c
cperciva's libmd implementation is 5-30% faster

The same was done for SHA256 previously in r263218

cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation

Extend sbin/md5 to create sha384(1)

Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h}

Reviewed by:	cperciva, des, delphij
Approved by:	secteam, bapt (mentor)
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3929
2015-12-27 17:33:59 +00:00
Baptiste Daroussin
bd0891ceb3 use .Mt to mark up email addresses consistently (part1)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:40:43 +00:00
Benjamin Kaduk
0e2e260ed2 Assorted updates to md5.1
Note that the -c argument's parameter is compared against the digest of
the file, not the file. [1]

Update the "current time" parentheticals for notes about reversing
and colliding the hash functions. [1]

Some general mdoc updates.

PR:		docs/188043 [1]
Submitted by:	Jamie Landeg-Jones [1]
Approved by:	hrs (mentor)
MFC after:	1 week
2014-05-18 21:16:59 +00:00
Xin LI
edd4c16f78 Teach md5(1) about sha512.
MFC after:	1 month
2012-08-01 00:36:12 +00:00
Glen Barber
2fccbf04cc General mdoc(7) and typo fixes.
PR:		167696
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-10 02:07:00 +00:00
Eitan Adler
c72006871d - new sentence should start on new line.
PR:		bin/146541
Submitted by:	bjk
Approved by:	bjk
2011-11-13 17:07:43 +00:00
Eitan Adler
745253594b - add "check" option to MD5 and friends to compare files against known hash.
PR:		bin/146541
Submitted by:	eadler
Reviewed by:	jhell@dataix.net
Approved by:	secteam (cperciva)
Approved by:	cperciva
MFC after:	3 weeks
2011-11-13 16:35:47 +00:00
Simon L. B. Nielsen
0211d3b61c Minor markup fix for the r186836 update. 2009-01-06 21:16:42 +00:00
Colin Percival
4c55b9e02e Strengthen some of the language concerning attacks on MD5, in light of the
recent demonstration of a forged SSL certificate.  Add text pointing out
that SHA-1 is at least theoretically broken.  Add a recommendation that
new applications use SHA-256.

MFC after:	1 month
2009-01-06 19:25:24 +00:00
Tom Rhodes
8156052b20 Bring a paragraph in this manual page a bit closer to the present date.
Discussed with:	des
2008-09-07 15:19:34 +00:00
Colin Percival
2fc230e298 Belatedly update the md5(1) man page to reflect the addition of sha256. 2005-03-10 09:56:39 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Oliver Eikemeier
cb49d42b60 Add sha1 and rmd160 checksum tools.
Since the algorithms are already supported in libmd,
the size increase is small when a dynamic root is used.

Approved by:	joerg, ru
MFC after:	2 weeks
2004-06-11 16:07:02 +00:00
Ruslan Ermilov
d04b5dfe6c Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
Stefan Eßer
5758d949d5 Set exit code to 1 in case at least one of the input files
could not be opened.
2003-11-02 23:12:08 +00:00
Philippe Charnier
92b425d0bd Use `The .Nm utility' 2002-04-19 23:06:29 +00:00
Ruslan Ermilov
ee355dcb9e mdoc(7) police: removed hard sentence breaks. 2001-09-04 09:28:48 +00:00
Murray Stokely
cc2a5b08a7 Mention collision attacks on MD5. From the md5(3) man page.
PR:		docs/14158
Reviewed by:	kris
Submitted by:	Eric Frias <efrias@sg505.net>
2001-09-04 01:01:07 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Dima Dorfman
042b6e862b This command has more than four options. 2001-06-19 03:34:03 +00:00
Ruslan Ermilov
47dec78170 mdoc(7) police: use the default ``file ...'' feature of the .Ar macro. 2001-02-13 09:56:35 +00:00
Ruslan Ermilov
7c7fb079b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
David E. O'Brien
2963da13bf Add -q quite mode. 1999-12-04 01:29:43 +00:00
David E. O'Brien
73fd27179f Make `-r -s' also match the BSDI output. 1999-11-11 11:59:03 +00:00
David E. O'Brien
9e18a3bdd2 Add a new "-r" (right) option that reverses the order a filename and the
hash is printed.  This aids visual diffs.
1999-11-07 04:14:55 +00:00
Philippe Charnier
23b5892f5e Correct use of .Nm. Spelling. Add rcsid, remove unused #includes, use err(3). 1998-07-06 07:04:50 +00:00
Steve Price
716847a669 Get md5(1) to use getopt(3). Also some minor -Wall cleaning
while here.

PR:		5387
Submitted by:	Matthew Hunt <mph@pobox.com>
1997-12-29 03:40:37 +00:00
John-Mark Gurney
46657c7e77 fix a few spelling changes
Submitted by: Josh Gilliam

Closes PR's: 4429, 4431-4438

PS: He has agreed to submit all contrib fixes back to the original author.
1997-08-30 12:22:49 +00:00
John-Mark Gurney
f22592e760 mdoc'ify man page 1997-03-02 21:43:10 +00:00
Poul-Henning Kamp
23b406e176 Add a '-p' option to md5. This will save some time in generation of the
ctm deltas.
1995-02-26 01:55:31 +00:00
Andreas Schulz
a8fcd7af26 Changed a sum(1) to a cksum(1). 1994-12-11 23:29:20 +00:00
Paul Traina
e164509318 Incorproate version of md5 placed into public domain by RSA. 1994-10-29 23:58:02 +00:00