Home | History | Annotate | only in /src/lib/libc/hash
History log of /src/lib/libc/hash
RevisionDateAuthorComments
 1.14 30-Nov-2017  riastradh Import SHA-3 code into libc and libkern.

No new public symbols in libc, but publishing the symbols is a simple
matter if/when we decide to do so.

Proposed on tech-kern and tech-userlevel with no objections:

https://mail-index.NetBSD.org/tech-kern/2017/11/11/msg022581.html
https://mail-index.NetBSD.org/tech-userlevel/2017/11/11/msg010968.html
 1.13 01-Jul-2016  christos new hmac function.
 1.12 08-Jul-2012  rmind Add MurmurHash2 -- a non-cryptographic hash function by Austin Appleby.
The code is taken from the upstream and is in the public domain.

OK christos@
 1.11 27-Oct-2006  drochner branches: 1.11.42;
As discussed back in June, remove hmac_sha1 and hmac_md5 from libc, to
reduce bloat and namespace trouble. (both were never public; hmac_sha1
is moved to libcrypt now because it is used locally there)
 1.10 24-Sep-2005  elad Put public domain MD2 implementation in libc/hash/md2.
 1.9 24-Sep-2005  elad Organize hashing in libc.
 1.8 23-Aug-2005  elad Compile SHA2 again.
 1.7 20-Aug-2005  elad Not running lint on kernel code fooled me into thinking this was safe.
Don't compile SHA2 code until I resolve warnings.
 1.6 20-Aug-2005  elad Add SHA2 hashing routines to userland.

At the moment there's only code for the init/transform/update/final
routines.

Man-page from OpenBSD.
 1.5 02-Jul-2004  sjg branches: 1.5.2;
Add support for SHA1 hashed passwords.
The algorithm used is essentially PBKDF1 from RFC 2898 but using
hmac_sha1 rather than SHA1 directly (suggested by smb@research.att.com).

* The format of the encrypted password is:
* $<tag>$<iterations>$<salt>$<digest>
*
* where:
* <tag> is "sha1"
* <iterations> is an unsigned int identifying how many rounds
* have been applied to <digest>. The number
* should vary slightly for each password to make
* it harder to generate a dictionary of
* pre-computed hashes. See crypt_sha1_iterations.
* <salt> up to 64 bytes of random data, 8 bytes is
* currently considered more than enough.
* <digest> the hashed password.

hmac.c implementes HMAC as defined in RFC 2104 and includes a unit
test for both hmac_sha1 and hmac_sha1 using a selection of the Known
Answer Tests from RFC 2202.

It is worth noting that to be FIPS compliant the hmac key (password)
should be 10-20 chars.
 1.4 05-Jul-2000  cyber fix typo: rmd160l.c -> rmd160hl.c
 1.3 05-Jul-2000  ad Pull in RIPEMD-160 functions from OpenBSD - this has the same API as our MD4,
MD5 and SHA1 stuff.
 1.2 24-Feb-1999  drochner use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again
 1.1 04-Feb-1999  explorer add sha1 functions, like md5/4
 1.5.2.1 08-Sep-2005  tron Apply patch (requested by elad in ticket #743):
Introduce SHA2 hashing routines in userland, including the common
helper routines.
 1.11.42.1 30-Oct-2012  yamt sync with head
 1.6 28-Sep-2005  christos Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
 1.5 26-Sep-2005  christos The weak alias macros can only work before namespace.h gets included because
when the strings get expanded we gain an _ from namespace.h. So define a
macro to point to the appropriate include file for the hash function, and
include the hash function later, from the .c file we always include. This
allows us to eliminate the hack of including namespace.h twice as well as
nbtool_config.h.
 1.4 25-Sep-2005  elad Fix weak aliasing after recent changes.

Inspired by comments from christos@, xtraeme@, mlelstv@, mhitch@, mrg@,
and uwe@; all the bugs are mine.
 1.3 24-Sep-2005  elad Fix NetBSD CVS tag, put all code under #ifdef HASH_ALGORITHM.
 1.2 24-Sep-2005  elad Need namespace.h.
 1.1 24-Sep-2005  elad Add skeleton file for helper routines that will be used by MD2, MD4, MD5,
SHA1, SHA2, and RMD160.
 1.8 04-Sep-2023  mrg fix pointer vs array function definition issues.

for the backend End and Data functions, use "char buf[HASH_STRLEN]"
instead of "char *buf", to match the public functions.

fixes GCC 12 warning.
 1.7 24-Sep-2014  christos undo, the right place for this is compat_defs.h
 1.6 24-Sep-2014  he Provide a backward-compatible conditional define of O_CLOEXEC
for those systems which lack it, since these files are used in
tools builds.
 1.5 18-Sep-2014  christos make more descriptors that we open as close-on-exec
 1.4 17-Jan-2010  wiz Close file handle in error case. Found by cppcheck.
 1.3 06-Mar-2009  apb According to Alexander Bluhm in tech-toolchain on 31 Jan 2009, the way
these files use __weak_alias causes build failures under OpenBSD,
because the OpenBSD __weak_alias macro expects the caller to supply a
semicolon, but the NetBSD __weak_alias macro supplies its own semicolon.

Attempt to fix this by avoiding the use of __weak_alias during a tools
build.
 1.2 12-Feb-2009  lukem sign-compare fix
 1.1 28-Sep-2005  christos branches: 1.1.26; 1.1.30;
Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
 1.1.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.1.26.1 27-Mar-2009  msaitoh Pull up following revision(s) (requested by apb in ticket #579):
gnu/dist/texinfo/lib/system.h 1.11
lib/libc/hash/hashhl.c 1.3
lib/libc/md/mdXhl.c 1.8
dist/file/src/file.h 1.18

Improve the ability to cross-build from Linux and OpenBSD hosts.
 1.6 23-May-2018  christos Add cross references to the openssl man pages.
 1.5 02-Jul-2016  wiz branches: 1.5.14;
Fix pasto.
 1.4 02-Jul-2016  christos Add license
 1.3 02-Jul-2016  wiz Some minor fixes.

XXX: this file has no license.
 1.2 01-Jul-2016  christos Improve wording.
 1.1 01-Jul-2016  christos new hmac function.
 1.5.14.1 25-Jun-2018  pgoyette Sync with HEAD
 1.5 05-Oct-2017  roy Cast away some compile warnings.
 1.4 10-Jan-2017  christos add missing cast.
 1.3 01-Jul-2016  christos branches: 1.3.2;
new hmac function.
 1.2 27-Oct-2006  drochner As discussed back in June, remove hmac_sha1 and hmac_md5 from libc, to
reduce bloat and namespace trouble. (both were never public; hmac_sha1
is moved to libcrypt now because it is used locally there)
 1.1 02-Jul-2004  sjg Add support for SHA1 hashed passwords.
The algorithm used is essentially PBKDF1 from RFC 2898 but using
hmac_sha1 rather than SHA1 directly (suggested by smb@research.att.com).

* The format of the encrypted password is:
* $<tag>$<iterations>$<salt>$<digest>
*
* where:
* <tag> is "sha1"
* <iterations> is an unsigned int identifying how many rounds
* have been applied to <digest>. The number
* should vary slightly for each password to make
* it harder to generate a dictionary of
* pre-computed hashes. See crypt_sha1_iterations.
* <salt> up to 64 bytes of random data, 8 bytes is
* currently considered more than enough.
* <digest> the hashed password.

hmac.c implementes HMAC as defined in RFC 2104 and includes a unit
test for both hmac_sha1 and hmac_sha1 using a selection of the Known
Answer Tests from RFC 2202.

It is worth noting that to be FIPS compliant the hmac key (password)
should be 10-20 chars.
 1.3.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.3 24-Sep-2005  elad Organize hashing in libc.
 1.2 09-Feb-2005  kleink A little libc namespace housekeeping exercise:
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.
 1.1 02-Jul-2004  sjg Add support for SHA1 hashed passwords.
The algorithm used is essentially PBKDF1 from RFC 2898 but using
hmac_sha1 rather than SHA1 directly (suggested by smb@research.att.com).

* The format of the encrypted password is:
* $<tag>$<iterations>$<salt>$<digest>
*
* where:
* <tag> is "sha1"
* <iterations> is an unsigned int identifying how many rounds
* have been applied to <digest>. The number
* should vary slightly for each password to make
* it harder to generate a dictionary of
* pre-computed hashes. See crypt_sha1_iterations.
* <salt> up to 64 bytes of random data, 8 bytes is
* currently considered more than enough.
* <digest> the hashed password.

hmac.c implementes HMAC as defined in RFC 2104 and includes a unit
test for both hmac_sha1 and hmac_sha1 using a selection of the Known
Answer Tests from RFC 2202.

It is worth noting that to be FIPS compliant the hmac key (password)
should be 10-20 chars.
 1.3 24-Sep-2005  elad Organize hashing in libc.
 1.2 09-Feb-2005  kleink A little libc namespace housekeeping exercise:
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.
 1.1 02-Jul-2004  sjg Add support for SHA1 hashed passwords.
The algorithm used is essentially PBKDF1 from RFC 2898 but using
hmac_sha1 rather than SHA1 directly (suggested by smb@research.att.com).

* The format of the encrypted password is:
* $<tag>$<iterations>$<salt>$<digest>
*
* where:
* <tag> is "sha1"
* <iterations> is an unsigned int identifying how many rounds
* have been applied to <digest>. The number
* should vary slightly for each password to make
* it harder to generate a dictionary of
* pre-computed hashes. See crypt_sha1_iterations.
* <salt> up to 64 bytes of random data, 8 bytes is
* currently considered more than enough.
* <digest> the hashed password.

hmac.c implementes HMAC as defined in RFC 2104 and includes a unit
test for both hmac_sha1 and hmac_sha1 using a selection of the Known
Answer Tests from RFC 2202.

It is worth noting that to be FIPS compliant the hmac key (password)
should be 10-20 chars.
 1.8 24-Sep-2005  elad Organize hashing in libc.
 1.7 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.6 30-Mar-2003  wiz VAX, not vax. Igor Sobrado in PR 19678.
 1.5 07-Feb-2002  ross generate & symbolically
 1.4 07-Feb-2002  ross Generate <>& symbolically.
 1.3 16-Sep-2001  wiz Standardize and sort sections, remove some whitespace.
 1.2 11-Dec-2000  ad branches: 1.2.2;
The second argument to xxData() is a size_t.
 1.1 05-Jul-2000  ad Pull in RIPEMD-160 functions from OpenBSD - this has the same API as our MD4,
MD5 and SHA1 stuff.
 1.2.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.2.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.2.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.10 24-Sep-2005  elad Organize hashing in libc.
 1.9 24-Sep-2005  elad Use RMD160 implementation by Markus Friedl, the same one we use in the
kernel.
 1.8 27-Oct-2003  lukem Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
 1.7 31-Mar-2002  bjh21 Shuffle config.h #iffery so as to wrap the __RCSID, as is done in several
other files.
This makes the rmd160 code compile on Linux as part of libnbcompat.
 1.6 31-Mar-2002  bjh21 Add the md[245], sha1 and rmd160 functions to libnbcompat, conditional on their
not being in the host libc.
This will be necessary to make cksum into a host tool.
 1.5 04-Jan-2001  lukem branches: 1.5.2;
sprinkle _DIAGASSERT() around
 1.4 11-Dec-2000  ad Argh. Use __weak_alias on the RMD160 functions.
 1.3 06-Jul-2000  christos explicitly cast to u_char
 1.2 05-Jul-2000  ad - Need to #include <sys/endian.h>.
- ANSIfy.
 1.1 05-Jul-2000  ad Pull in RIPEMD-160 functions from OpenBSD - this has the same API as our MD4,
MD5 and SHA1 stuff.
 1.5.2.1 25-Apr-2002  nathanw Catch up to -current.
 1.9 24-Sep-2005  elad Organize hashing in libc.
 1.8 27-Oct-2003  lukem Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
 1.7 31-Mar-2002  bjh21 Shuffle config.h #iffery so as to wrap the __RCSID, as is done in several
other files.
This makes the rmd160 code compile on Linux as part of libnbcompat.
 1.6 31-Mar-2002  bjh21 Add the md[245], sha1 and rmd160 functions to libnbcompat, conditional on their
not being in the host libc.
This will be necessary to make cksum into a host tool.
 1.5 04-Jan-2001  lukem branches: 1.5.2;
sprinkle _DIAGASSERT() around
 1.4 11-Dec-2000  ad Argh. Use __weak_alias on the RMD160 functions.
 1.3 06-Jul-2000  christos fix non-portable shift.
 1.2 05-Jul-2000  ad - No need to include <sys/uio.h>.
- ANSIfy.
 1.1 05-Jul-2000  ad Pull in RIPEMD-160 functions from OpenBSD - this has the same API as our MD4,
MD5 and SHA1 stuff.
 1.5.2.1 25-Apr-2002  nathanw Catch up to -current.
 1.14 24-Sep-2005  elad Organize hashing in libc.
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 30-Mar-2003  wiz VAX, not vax. Igor Sobrado in PR 19678.
 1.11 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.10 07-Feb-2002  ross generate & symbolically
 1.9 07-Feb-2002  ross Generate <>& symbolically.
 1.8 16-Sep-2001  wiz Standardize and sort sections, remove some whitespace.
 1.7 29-Mar-2001  kleink Fix printf format used in example; from Jim Bernard in PR lib/12496.
 1.6 02-Jan-2001  wiz branches: 1.6.2;
Note that sha1 has been there since 1.4.
 1.5 11-Dec-2000  ad The second argument to xxData() is a size_t.
 1.4 21-Sep-2000  ad Use .{B,Bs,F,N,O}x and fix miscellaneous errors.
 1.3 28-Feb-1999  ross branches: 1.3.10;
Urk, .Nx doesn't DTRT either.
 1.2 27-Feb-1999  ross Don't .Xr sha1(1) until we get such a thing, but do .Xr md5(1).
Also, don't .Ox (?) 2.0, but do .Nx 1.4.
 1.1 04-Feb-1999  explorer add sha1 functions, like md5/4
 1.3.10.1 30-Mar-2001  he Pull up revision 1.7 (requested by kleink):
Fix printf format used in example, fixes PR#12496.
 1.6.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.6.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.6.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.6.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.14 24-Sep-2005  elad Organize hashing in libc.
 1.13 12-Jun-2005  lukem Add missing __RCSID()
 1.12 27-Oct-2003  lukem Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
 1.11 21-Sep-2003  martin Bring back previous sparc64 hack, but only #ifdef old gcc.
This is used when building libnbcompat for host tools - why it is included
when building on NetBSD is beyound me.
 1.10 19-Sep-2003  martin No more sparc64 compiler workarounds
 1.9 31-Mar-2002  bjh21 In userland, use <sha1.h>, not <sys/sha1.h>.
 1.8 31-Mar-2002  bjh21 Add the md[245], sha1 and rmd160 functions to libnbcompat, conditional on their
not being in the host libc.
This will be necessary to make cksum into a host tool.
 1.7 19-Mar-2001  simonb Don't use a u_char array for a workspace that will be cast then accessed
as int's, as the array is not guaranteed to be int-aligned on the stack.
Use a CHAR64LONG16 type instead for the workspace, since the workspace
is accessed through that type anyway.

Fixes PR pkg/12417 from Andrew Brown.
 1.6 17-Sep-2000  eeh branches: 1.6.2;
Prevent the compiler from blowing up on sparc64. From mrg.
 1.5 22-Jan-2000  mycroft branches: 1.5.4;
Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.4 20-Sep-1999  lukem back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.3 16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.2 03-May-1999  christos fix unaligned access lint warning.
 1.1 04-Feb-1999  explorer add sha1 functions, like md5/4
 1.5.4.2 22-Mar-2001  he Pull up revision 1.7 (requested by simonb):
Fix workspace alignment problems. Fixes PR#12417.
 1.5.4.1 19-Oct-2000  he Pull up revision 1.6 (requested by eeh):
Prevent the compiler from blowing up on sparc64.
 1.6.2.2 25-Apr-2002  nathanw Catch up to -current.
 1.6.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.10 24-Sep-2005  elad Organize hashing in libc.
 1.9 27-Oct-2003  lukem Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
 1.8 31-Mar-2002  bjh21 In userland, use <sha1.h>, not <sys/sha1.h>.
 1.7 31-Mar-2002  bjh21 Add the md[245], sha1 and rmd160 functions to libnbcompat, conditional on their
not being in the host libc.
This will be necessary to make cksum into a host tool.
 1.6 05-Jul-2000  ad branches: 1.6.2;
Insert newline after RCS ID line.
 1.5 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.4 20-Sep-1999  lukem back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.3 16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.2 03-May-1999  christos Avoid non portable shifts.
 1.1 04-Feb-1999  explorer add sha1 functions, like md5/4
 1.6.2.1 25-Apr-2002  nathanw Catch up to -current.
 1.1 24-Sep-2005  elad Put public domain MD2 implementation in libc/hash/md2.
 1.3 17-Dec-2018  wiz Use An in AUTHORS section.
 1.2 16-Dec-2018  abhinav Remove self reference in SEE ALSO
Add references consistent with those in md4(3) and md5(3)

Reported by kamil
 1.1 24-Sep-2005  elad branches: 1.1.84; 1.1.86;
Put public domain MD2 implementation in libc/hash/md2.
 1.1.86.1 10-Jun-2019  christos Sync with HEAD
 1.1.84.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.9 26-Jan-2024  christos move MD2Transform first.
 1.8 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.7 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.6 20-Mar-2012  matt Use C89 definition.
u_int*_t -> uint*_t
 1.5 28-Apr-2008  martin branches: 1.5.4; 1.5.8;
Remove clause 3 and 4 from TNF licenses
 1.4 12-May-2006  mrg branches: 1.4.18;
since we rename and provide a weak symbol for MD2Transform make it non-static.
 1.3 29-Nov-2005  christos WARNS=4
 1.2 25-Sep-2005  elad Fix weak aliasing after recent changes.

Inspired by comments from christos@, xtraeme@, mlelstv@, mhitch@, mrg@,
and uwe@; all the bugs are mine.
 1.1 24-Sep-2005  elad Put public domain MD2 implementation in libc/hash/md2.
 1.4.18.1 18-May-2008  yamt sync with head.
 1.5.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5.8.1 28-Apr-2008  martin file md2.c was added on branch christos-time_t on 2008-04-28 20:23:01 +0000
 1.5.4.2 30-Oct-2012  yamt sync with head
 1.5.4.1 17-Apr-2012  yamt sync with head
 1.4 13-Apr-2008  dholland branches: 1.4.10;
Fix replicated typo
 1.3 28-Sep-2005  christos Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
 1.2 26-Sep-2005  christos The weak alias macros can only work before namespace.h gets included because
when the strings get expanded we gain an _ from namespace.h. So define a
macro to point to the appropriate include file for the hash function, and
include the hash function later, from the .c file we always include. This
allows us to eliminate the hack of including namespace.h twice as well as
nbtool_config.h.
 1.1 24-Sep-2005  elad Put public domain MD2 implementation in libc/hash/md2.
 1.4.10.2 13-Apr-2008  dholland Fix replicated typo
 1.4.10.1 13-Apr-2008  dholland file md2hl.c was added on branch christos-time_t on 2008-04-13 02:04:32 +0000
 1.1 08-Jul-2012  rmind branches: 1.1.4;
Add Makefile in libc for murmurhash, missed in previous commit.
 1.1.4.2 30-Oct-2012  yamt sync with head
 1.1.4.1 08-Jul-2012  yamt file Makefile.inc was added on branch yamt-pagecache on 2012-10-30 18:58:50 +0000
 1.1 24-Sep-2005  elad Organize hashing in libc.
 1.4 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.3 05-Apr-2010  joerg \\ -> \e
 1.2 26-Dec-2005  perry u_intN_t -> uintN_t
 1.1 24-Sep-2005  elad Add man-pages forgotten in previous commit.
 1.5 27-Oct-2006  christos this moved to common/lib/libc/hash
 1.4 09-Feb-2006  dogcow change #include <sys/endian.h> => #include <machine/endian.h> so that
it's (more) consistent in the tree; this, along with changing tools/compat's
autoconf detection from AC_CHECK_FUNCS to AC_CHECK_DECLS makes the vast
majority of htobe16 and friends' redefinition errors bite the dust.
Tested with -current and FreeBSD.
 1.3 25-Sep-2005  elad Fix weak aliasing after recent changes.

Inspired by comments from christos@, xtraeme@, mlelstv@, mhitch@, mrg@,
and uwe@; all the bugs are mine.
 1.2 24-Sep-2005  elad Need namespace.h here too.
 1.1 24-Sep-2005  elad Organize hashing in libc.
 1.6 13-Apr-2008  dholland branches: 1.6.10;
Fix replicated typo
 1.5 28-Oct-2006  agc More cleanup after sha2.h and rmd160.h moved house
 1.4 28-Sep-2005  christos Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
 1.3 26-Sep-2005  christos The weak alias macros can only work before namespace.h gets included because
when the strings get expanded we gain an _ from namespace.h. So define a
macro to point to the appropriate include file for the hash function, and
include the hash function later, from the .c file we always include. This
allows us to eliminate the hack of including namespace.h twice as well as
nbtool_config.h.
 1.2 24-Sep-2005  elad Use crypto/rmd160.h.
 1.1 24-Sep-2005  elad Organize hashing in libc.
 1.6.10.2 13-Apr-2008  dholland Fix replicated typo
 1.6.10.1 13-Apr-2008  dholland file rmd160hl.c was added on branch christos-time_t on 2008-04-13 02:04:33 +0000
 1.3 27-Nov-2018  kamil Fix link sha1.3 <- SHA1File.3

This SHA1File used to link to sha2(3).
 1.2 27-Oct-2006  drochner branches: 1.2.82; 1.2.84;
As discussed back in June, remove hmac_sha1 and hmac_md5 from libc, to
reduce bloat and namespace trouble. (both were never public; hmac_sha1
is moved to libcrypt now because it is used locally there)
 1.1 24-Sep-2005  elad Organize hashing in libc.
 1.2.84.1 10-Jun-2019  christos Sync with HEAD
 1.2.82.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.3 27-Oct-2006  drochner As discussed back in June, remove hmac_sha1 and hmac_md5 from libc, to
reduce bloat and namespace trouble. (both were never public; hmac_sha1
is moved to libcrypt now because it is used locally there)
 1.2 23-Jun-2006  christos Make these weak as Matthias Drochner pointed out.
 1.1 24-Sep-2005  elad Organize hashing in libc.
 1.9 27-Nov-2018  wiz More macros, less whitespace.
 1.8 27-Nov-2018  kamil Document SHA1FileChunk(3) in sha1(3)

Description taken from OpenBSD.
 1.7 03-Jul-2017  wiz branches: 1.7.4; 1.7.6;
Remove workaround for ancient HTML generation code.
 1.6 05-Apr-2010  joerg \\ -> \e
 1.5 06-Nov-2009  joerg Improve portability and clarity by using uint8_t for the byte data
and expanding u_int to not depend on the !POSIX types.
 1.4 22-Oct-2009  snj Pull in revisions 1.24 and 1.25 from upstream, which change this file's
license to ISC-style.
 1.3 10-Mar-2009  joerg Add missing .Os.
 1.2 26-Dec-2005  perry branches: 1.2.30;
u_intN_t -> uintN_t
 1.1 24-Sep-2005  elad Add man-pages forgotten in previous commit.
 1.2.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.7.6.1 10-Jun-2019  christos Sync with HEAD
 1.7.4.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.3 20-Dec-2005  christos Use reach-over sources from common/lib/libc
 1.2 29-Nov-2005  christos WARNS=4
 1.1 24-Sep-2005  elad Organize hashing in libc.
 1.4 13-Apr-2008  dholland branches: 1.4.10;
Fix replicated typo
 1.3 28-Sep-2005  christos Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
 1.2 26-Sep-2005  christos The weak alias macros can only work before namespace.h gets included because
when the strings get expanded we gain an _ from namespace.h. So define a
macro to point to the appropriate include file for the hash function, and
include the hash function later, from the .c file we always include. This
allows us to eliminate the hack of including namespace.h twice as well as
nbtool_config.h.
 1.1 24-Sep-2005  elad Organize hashing in libc.
 1.4.10.2 13-Apr-2008  dholland Fix replicated typo
 1.4.10.1 13-Apr-2008  dholland file sha1hl.c was added on branch christos-time_t on 2008-04-13 02:04:33 +0000
 1.4 26-May-2009  joerg Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.3 23-Aug-2005  elad branches: 1.3.2; 1.3.6; 1.3.16; 1.3.28; 1.3.34;
We don't have SHA{256,384,512}_Pad, but we do have _Transform.
 1.2 23-Aug-2005  elad Add helper routines (end, filechunk, file, data) for SHA2.
 1.1 20-Aug-2005  elad Add SHA2 hashing routines to userland.

At the moment there's only code for the init/transform/update/final
routines.

Man-page from OpenBSD.
 1.3.34.1 14-Jul-2009  snj branches: 1.3.34.1.2;
Pull up following revisions (requested by joerg in ticket #855):
common/lib/libc/hash/sha2/sha2.c: revisions 1.8-1.18 via patch
crypto/dist/openssl/crypto/evp/m_sha1.c: revisions 1.2-1.3 via patch
distrib/sets/lists/base/md.amd64: revision 1.51 via patch
distrib/sets/lists/base/md.sparc64: revision 1.46 via patch
distrib/sets/lists/base/shl.mi: revision 1.474 via patch
distrib/sets/lists/comp/mi: revision 1.1263 via patch
lib/libc/shlib_version: patch
lib/libc/hash/sha2/Makefile.inc: revision 1.4 via patch
lib/libc/hash/sha2/sha2.3: revision 1.5 via patch
lib/libc/hash/sha2/sha224hl.c: revision 1.1 via patch
lib/libc/include/namespace.h: revision 1.138 via patch
lib/libcrypto/libc-sha256.c: revision 1.1 via patch
lib/libcrypto/libc-sha512.c: revision 1.1 via patch
lib/libcrypto/sha.inc: revision 1.10 via patch
lib/libcrypto/shlib_version: patch
sys/lib/libkern/arch/vax/Makefile.inc: revision 1.21 via patch
sys/sys/sha2.h: revision 1.3 via patch
Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.3.34.1.2.1 21-Apr-2010  matt sync to netbsd-5
 1.3.28.1 14-Jul-2009  snj Pull up following revisions (requested by joerg in ticket #855):
common/lib/libc/hash/sha2/sha2.c: revisions 1.8-1.18 via patch
crypto/dist/openssl/crypto/evp/m_sha1.c: revisions 1.2-1.3 via patch
distrib/sets/lists/base/md.amd64: revision 1.51 via patch
distrib/sets/lists/base/md.sparc64: revision 1.46 via patch
distrib/sets/lists/base/shl.mi: revision 1.474 via patch
distrib/sets/lists/comp/mi: revision 1.1263 via patch
lib/libc/shlib_version: patch
lib/libc/hash/sha2/Makefile.inc: revision 1.4 via patch
lib/libc/hash/sha2/sha2.3: revision 1.5 via patch
lib/libc/hash/sha2/sha224hl.c: revision 1.1 via patch
lib/libc/include/namespace.h: revision 1.138 via patch
lib/libcrypto/libc-sha256.c: revision 1.1 via patch
lib/libcrypto/libc-sha512.c: revision 1.1 via patch
lib/libcrypto/sha.inc: revision 1.10 via patch
lib/libcrypto/shlib_version: patch
sys/sys/sha2.h: revision 1.3 via patch
Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.3.16.1 22-Jul-2009  snj Apply patch (requested by joerg in ticket #1338):
- Add support for SHA224 to libc
- Fix Big Endian support in some cases
- Use libc support in libcrypto
 1.3.6.1 22-Jul-2009  snj Apply patch (requested by joerg in ticket #1338):
- Add support for SHA224 to libc
- Fix Big Endian support in some cases
- Use libc support in libcrypto
 1.3.2.2 08-Sep-2005  tron Apply patch (requested by elad in ticket #743):
Introduce SHA2 hashing routines in userland, including the common
helper routines.
 1.3.2.1 23-Aug-2005  tron file Makefile.inc was added on branch netbsd-3 on 2005-09-08 19:15:44 +0000
 1.9 09-Oct-2018  kamil Drop Pad functions from sha2(3)

This man-page first appeared before porting all the features to NetBSD and
actually Pad ones were never ported. Keeping it in the documentation is
misleading and actually caused bugs in handling of these functions in 3rd
party software.
 1.8 30-Oct-2017  wiz branches: 1.8.2; 1.8.4;
Remove Tn. Do not split on An lines.
 1.7 25-Oct-2017  abhinav Add sha_224, sha_384 and sha_512 family of functions to the NAME section as well.
Also use .An for authors in the AUTHORS section
 1.6 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.5 26-May-2009  joerg Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.4 26-Dec-2005  perry branches: 1.4.4; 1.4.14; 1.4.26; 1.4.32;
u_intN_t -> uintN_t
 1.3 22-Nov-2005  tron SHA2 support appeared in NetBSD 3.0.
 1.2 10-Sep-2005  wiz Prefer
.In foo
to
.Fd #include <foo>
Mark up NULL with .Dv.
Use \*[Am], \*[Lt] for HTML output.
Add missing commas in enumerations.
 1.1 20-Aug-2005  elad branches: 1.1.2;
Add SHA2 hashing routines to userland.

At the moment there's only code for the init/transform/update/final
routines.

Man-page from OpenBSD.
 1.1.2.3 22-Nov-2005  riz Pull up following revision(s) (requested by tron in ticket #986):
lib/libc/hash/sha2/sha2.3: revision 1.3
SHA2 support appeared in NetBSD 3.0.
 1.1.2.2 08-Sep-2005  tron Apply patch (requested by elad in ticket #743):
Introduce SHA2 hashing routines in userland, including the common
helper routines.
 1.1.2.1 20-Aug-2005  tron file sha2.3 was added on branch netbsd-3 on 2005-09-08 19:15:44 +0000
 1.4.32.1 14-Jul-2009  snj branches: 1.4.32.1.2;
Pull up following revisions (requested by joerg in ticket #855):
common/lib/libc/hash/sha2/sha2.c: revisions 1.8-1.18 via patch
crypto/dist/openssl/crypto/evp/m_sha1.c: revisions 1.2-1.3 via patch
distrib/sets/lists/base/md.amd64: revision 1.51 via patch
distrib/sets/lists/base/md.sparc64: revision 1.46 via patch
distrib/sets/lists/base/shl.mi: revision 1.474 via patch
distrib/sets/lists/comp/mi: revision 1.1263 via patch
lib/libc/shlib_version: patch
lib/libc/hash/sha2/Makefile.inc: revision 1.4 via patch
lib/libc/hash/sha2/sha2.3: revision 1.5 via patch
lib/libc/hash/sha2/sha224hl.c: revision 1.1 via patch
lib/libc/include/namespace.h: revision 1.138 via patch
lib/libcrypto/libc-sha256.c: revision 1.1 via patch
lib/libcrypto/libc-sha512.c: revision 1.1 via patch
lib/libcrypto/sha.inc: revision 1.10 via patch
lib/libcrypto/shlib_version: patch
sys/lib/libkern/arch/vax/Makefile.inc: revision 1.21 via patch
sys/sys/sha2.h: revision 1.3 via patch
Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.4.32.1.2.1 21-Apr-2010  matt sync to netbsd-5
 1.4.26.1 14-Jul-2009  snj Pull up following revisions (requested by joerg in ticket #855):
common/lib/libc/hash/sha2/sha2.c: revisions 1.8-1.18 via patch
crypto/dist/openssl/crypto/evp/m_sha1.c: revisions 1.2-1.3 via patch
distrib/sets/lists/base/md.amd64: revision 1.51 via patch
distrib/sets/lists/base/md.sparc64: revision 1.46 via patch
distrib/sets/lists/base/shl.mi: revision 1.474 via patch
distrib/sets/lists/comp/mi: revision 1.1263 via patch
lib/libc/shlib_version: patch
lib/libc/hash/sha2/Makefile.inc: revision 1.4 via patch
lib/libc/hash/sha2/sha2.3: revision 1.5 via patch
lib/libc/hash/sha2/sha224hl.c: revision 1.1 via patch
lib/libc/include/namespace.h: revision 1.138 via patch
lib/libcrypto/libc-sha256.c: revision 1.1 via patch
lib/libcrypto/libc-sha512.c: revision 1.1 via patch
lib/libcrypto/sha.inc: revision 1.10 via patch
lib/libcrypto/shlib_version: patch
sys/sys/sha2.h: revision 1.3 via patch
Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.4.14.1 22-Jul-2009  snj Apply patch (requested by joerg in ticket #1338):
- Add support for SHA224 to libc
- Fix Big Endian support in some cases
- Use libc support in libcrypto
 1.4.4.1 22-Jul-2009  snj Apply patch (requested by joerg in ticket #1338):
- Add support for SHA224 to libc
- Fix Big Endian support in some cases
- Use libc support in libcrypto
 1.8.4.1 10-Jun-2019  christos Sync with HEAD
 1.8.2.1 20-Oct-2018  pgoyette Sync with head
 1.7 27-Oct-2006  christos this moved to common/lib/libc/hash
 1.6 15-Oct-2006  christos static before const.
 1.5 26-Sep-2005  christos Add missing SHA384_Transform. XXX: Is that correct?
 1.4 25-Sep-2005  elad Fix weak aliasing after recent changes.

Inspired by comments from christos@, xtraeme@, mlelstv@, mhitch@, mrg@,
and uwe@; all the bugs are mine.
 1.3 26-Aug-2005  elad branches: 1.3.2;
Include namespace.h to make this build in nbcompat.
 1.2 20-Aug-2005  elad Pass lint and make this compile.
Also change bcopy, bzero -> memcpy, memset.
 1.1 20-Aug-2005  elad Add SHA2 hashing routines to userland.

At the moment there's only code for the init/transform/update/final
routines.

Man-page from OpenBSD.
 1.3.2.3 28-Aug-2007  ghen Pull up patches (requested by joerg in ticket #1812):
lib/libc/hash/sha2/sha2.c: patch
sys/crypto/ripemd160/rmd160.c: patch
sys/crypto/sha2/sha2.c: patch
Fix SIGBUS issues on strict alignment issues. Use le32dec in RMD160
as the data pointer to RMD160_Update doesn't have to be aligned.
In SHA256_Update and SHA512_Update, only operate directly on the passed
in data if no left-over in the context exists and the data is correctly
aligned. The problem was exposed by the audit-packages rewrite in C
and reported for the libnbcompat version in PR pkg/36662.
cast to void* to avoid a fatal warning
 1.3.2.2 08-Sep-2005  tron branches: 1.3.2.2.2; 1.3.2.2.4;
Apply patch (requested by elad in ticket #743):
Introduce SHA2 hashing routines in userland, including the common
helper routines.
 1.3.2.1 26-Aug-2005  tron branches: 1.3.2.1.2; 1.3.2.1.4;
file sha2.c was added on branch netbsd-3 on 2005-09-08 19:15:44 +0000
 1.3.2.2.4.1 28-Aug-2007  ghen Pull up patches (requested by joerg in ticket #1812):
lib/libc/hash/sha2/sha2.c: patch
sys/crypto/ripemd160/rmd160.c: patch
sys/crypto/sha2/sha2.c: patch
Fix SIGBUS issues on strict alignment issues. Use le32dec in RMD160
as the data pointer to RMD160_Update doesn't have to be aligned.
In SHA256_Update and SHA512_Update, only operate directly on the passed
in data if no left-over in the context exists and the data is correctly
aligned. The problem was exposed by the audit-packages rewrite in C
and reported for the libnbcompat version in PR pkg/36662.
cast to void* to avoid a fatal warning
 1.3.2.2.2.1 28-Aug-2007  ghen Pull up patches (requested by joerg in ticket #1812):
lib/libc/hash/sha2/sha2.c: patch
sys/crypto/ripemd160/rmd160.c: patch
sys/crypto/sha2/sha2.c: patch
Fix SIGBUS issues on strict alignment issues. Use le32dec in RMD160
as the data pointer to RMD160_Update doesn't have to be aligned.
In SHA256_Update and SHA512_Update, only operate directly on the passed
in data if no left-over in the context exists and the data is correctly
aligned. The problem was exposed by the audit-packages rewrite in C
and reported for the libnbcompat version in PR pkg/36662.
cast to void* to avoid a fatal warning
 1.3.2.1.4.1 locked by: joerg; 26-Aug-2005  ghen file sha2.c was added on branch netbsd-3 on 2007-08-28 13:33:03 +0000
 1.3.2.1.2.1 locked by: joerg; 26-Aug-2005  ghen file sha2.c was added on branch netbsd-3 on 2007-08-28 13:32:31 +0000
 1.2 11-Dec-2014  riastradh Fix rcsid comment.
 1.1 26-May-2009  joerg branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.1.8.2 22-Jul-2009  snj Apply patch (requested by joerg in ticket #1338):
- Add support for SHA224 to libc
- Fix Big Endian support in some cases
- Use libc support in libcrypto
 1.1.8.1 26-May-2009  snj file sha224hl.c was added on branch netbsd-4-0 on 2009-07-22 22:39:46 +0000
 1.1.6.2 22-Jul-2009  snj Apply patch (requested by joerg in ticket #1338):
- Add support for SHA224 to libc
- Fix Big Endian support in some cases
- Use libc support in libcrypto
 1.1.6.1 26-May-2009  snj file sha224hl.c was added on branch netbsd-4 on 2009-07-22 22:31:07 +0000
 1.1.4.2 14-Jul-2009  snj Pull up following revisions (requested by joerg in ticket #855):
common/lib/libc/hash/sha2/sha2.c: revisions 1.8-1.18 via patch
crypto/dist/openssl/crypto/evp/m_sha1.c: revisions 1.2-1.3 via patch
distrib/sets/lists/base/md.amd64: revision 1.51 via patch
distrib/sets/lists/base/md.sparc64: revision 1.46 via patch
distrib/sets/lists/base/shl.mi: revision 1.474 via patch
distrib/sets/lists/comp/mi: revision 1.1263 via patch
lib/libc/shlib_version: patch
lib/libc/hash/sha2/Makefile.inc: revision 1.4 via patch
lib/libc/hash/sha2/sha2.3: revision 1.5 via patch
lib/libc/hash/sha2/sha224hl.c: revision 1.1 via patch
lib/libc/include/namespace.h: revision 1.138 via patch
lib/libcrypto/libc-sha256.c: revision 1.1 via patch
lib/libcrypto/libc-sha512.c: revision 1.1 via patch
lib/libcrypto/sha.inc: revision 1.10 via patch
lib/libcrypto/shlib_version: patch
sys/sys/sha2.h: revision 1.3 via patch
Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.1.4.1 26-May-2009  snj file sha224hl.c was added on branch netbsd-5 on 2009-07-14 19:48:04 +0000
 1.1.2.2 14-Jul-2009  snj branches: 1.1.2.2.2;
Pull up following revisions (requested by joerg in ticket #855):
common/lib/libc/hash/sha2/sha2.c: revisions 1.8-1.18 via patch
crypto/dist/openssl/crypto/evp/m_sha1.c: revisions 1.2-1.3 via patch
distrib/sets/lists/base/md.amd64: revision 1.51 via patch
distrib/sets/lists/base/md.sparc64: revision 1.46 via patch
distrib/sets/lists/base/shl.mi: revision 1.474 via patch
distrib/sets/lists/comp/mi: revision 1.1263 via patch
lib/libc/shlib_version: patch
lib/libc/hash/sha2/Makefile.inc: revision 1.4 via patch
lib/libc/hash/sha2/sha2.3: revision 1.5 via patch
lib/libc/hash/sha2/sha224hl.c: revision 1.1 via patch
lib/libc/include/namespace.h: revision 1.138 via patch
lib/libcrypto/libc-sha256.c: revision 1.1 via patch
lib/libcrypto/libc-sha512.c: revision 1.1 via patch
lib/libcrypto/sha.inc: revision 1.10 via patch
lib/libcrypto/shlib_version: patch
sys/lib/libkern/arch/vax/Makefile.inc: revision 1.21 via patch
sys/sys/sha2.h: revision 1.3 via patch
Add SHA224 implementation to libc.
Make libcrypto use the SHA2 implementation of libc.
Bump minor versions of libc and libcrypto.
 1.1.2.1 26-May-2009  snj file sha224hl.c was added on branch netbsd-5-0 on 2009-07-14 19:35:23 +0000
 1.1.2.2.2.1 21-Apr-2010  matt sync to netbsd-5
 1.8 13-Apr-2008  dholland branches: 1.8.10;
Fix replicated typo
 1.7 28-Oct-2006  agc More cleanup after sha2.h and rmd160.h moved house
 1.6 28-Sep-2005  christos Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
 1.5 26-Sep-2005  christos The weak alias macros can only work before namespace.h gets included because
when the strings get expanded we gain an _ from namespace.h. So define a
macro to point to the appropriate include file for the hash function, and
include the hash function later, from the .c file we always include. This
allows us to eliminate the hack of including namespace.h twice as well as
nbtool_config.h.
 1.4 24-Sep-2005  elad Use common code from hash.c.
 1.3 26-Aug-2005  elad branches: 1.3.2;
Include namespace.h to make this build in nbcompat.
 1.2 24-Aug-2005  tron Fix lint warnings.
 1.1 23-Aug-2005  elad Add helper routines (end, filechunk, file, data) for SHA2.
 1.3.2.2 08-Sep-2005  tron Apply patch (requested by elad in ticket #743):
Introduce SHA2 hashing routines in userland, including the common
helper routines.
 1.3.2.1 26-Aug-2005  tron file sha256hl.c was added on branch netbsd-3 on 2005-09-08 19:15:44 +0000
 1.8.10.2 13-Apr-2008  dholland Fix replicated typo
 1.8.10.1 13-Apr-2008  dholland file sha256hl.c was added on branch christos-time_t on 2008-04-13 02:04:33 +0000
 1.8 13-Apr-2008  dholland branches: 1.8.10;
Fix replicated typo
 1.7 28-Oct-2006  agc More cleanup after sha2.h and rmd160.h moved house
 1.6 28-Sep-2005  christos Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
 1.5 26-Sep-2005  christos The weak alias macros can only work before namespace.h gets included because
when the strings get expanded we gain an _ from namespace.h. So define a
macro to point to the appropriate include file for the hash function, and
include the hash function later, from the .c file we always include. This
allows us to eliminate the hack of including namespace.h twice as well as
nbtool_config.h.
 1.4 24-Sep-2005  elad Use common code from hash.c.
 1.3 26-Aug-2005  elad branches: 1.3.2;
Include namespace.h to make this build in nbcompat.
 1.2 24-Aug-2005  tron Fix lint warnings.
 1.1 23-Aug-2005  elad Add helper routines (end, filechunk, file, data) for SHA2.
 1.3.2.2 08-Sep-2005  tron Apply patch (requested by elad in ticket #743):
Introduce SHA2 hashing routines in userland, including the common
helper routines.
 1.3.2.1 26-Aug-2005  tron file sha384hl.c was added on branch netbsd-3 on 2005-09-08 19:15:44 +0000
 1.8.10.2 13-Apr-2008  dholland Fix replicated typo
 1.8.10.1 13-Apr-2008  dholland file sha384hl.c was added on branch christos-time_t on 2008-04-13 02:04:33 +0000
 1.8 13-Apr-2008  dholland branches: 1.8.10;
Fix replicated typo
 1.7 28-Oct-2006  agc More cleanup after sha2.h and rmd160.h moved house
 1.6 28-Sep-2005  christos Rename "hash.c" to "hashhl.c" since this is included from *hl.c files.
The name "hash.c" is already used in db/hash/hash.c, and having duplicated
names, aside from it being bad style, breaks the tools/nbcompat build
because it picks the wrong hash.c file. Thanks to greg for helping debug
this.
 1.5 26-Sep-2005  christos The weak alias macros can only work before namespace.h gets included because
when the strings get expanded we gain an _ from namespace.h. So define a
macro to point to the appropriate include file for the hash function, and
include the hash function later, from the .c file we always include. This
allows us to eliminate the hack of including namespace.h twice as well as
nbtool_config.h.
 1.4 24-Sep-2005  elad Use common code from hash.c.
 1.3 26-Aug-2005  elad branches: 1.3.2;
Include namespace.h to make this build in nbcompat.
 1.2 24-Aug-2005  tron Fix lint warnings.
 1.1 23-Aug-2005  elad Add helper routines (end, filechunk, file, data) for SHA2.
 1.3.2.2 08-Sep-2005  tron Apply patch (requested by elad in ticket #743):
Introduce SHA2 hashing routines in userland, including the common
helper routines.
 1.3.2.1 26-Aug-2005  tron file sha512hl.c was added on branch netbsd-3 on 2005-09-08 19:15:44 +0000
 1.8.10.2 13-Apr-2008  dholland Fix replicated typo
 1.8.10.1 13-Apr-2008  dholland file sha512hl.c was added on branch christos-time_t on 2008-04-13 02:04:33 +0000
 1.2 30-Nov-2017  wiz Add riastradh's man pages for sha3 and friends.

Commented out since the symbols themselves are not yet public.
 1.1 30-Nov-2017  riastradh Import SHA-3 code into libc and libkern.

No new public symbols in libc, but publishing the symbols is a simple
matter if/when we decide to do so.

Proposed on tech-kern and tech-userlevel with no objections:

https://mail-index.NetBSD.org/tech-kern/2017/11/11/msg022581.html
https://mail-index.NetBSD.org/tech-userlevel/2017/11/11/msg010968.html
 1.1 30-Nov-2017  wiz Add riastradh's man pages for sha3 and friends.

Commented out since the symbols themselves are not yet public.
 1.1 30-Nov-2017  wiz Add riastradh's man pages for sha3 and friends.

Commented out since the symbols themselves are not yet public.
 1.1 30-Nov-2017  wiz Add riastradh's man pages for sha3 and friends.

Commented out since the symbols themselves are not yet public.
 1.1 30-Nov-2017  wiz Add riastradh's man pages for sha3 and friends.

Commented out since the symbols themselves are not yet public.

RSS XML Feed