Commit Graph

35 Commits

Author SHA1 Message Date
sjg 3a0c68edfd 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.
2004-07-02 00:05:23 +00:00
lukem 59efd8a9dd remove unnecessary rules 2003-07-22 12:34:40 +00:00
lha 508f668a25 Don't build a separate kpasswd program, passwd can handle Kerberos
password changing. Fixes last part of bin/14988.
2003-04-06 16:35:37 +00:00
itojun e91a21c27c add DPADD. 2002-10-23 01:25:35 +00:00
thorpej 9c33b55e7c Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

	* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
	  of the infratsructure (libraries, support programs, etc.)

	* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
	  building of support for using the corresponding API
	  in various libraries/programs that can use it.

As discussed on tech-toolchain.
2002-03-22 18:10:19 +00:00
simonb 9b22175a26 Remove INSTALLFLAGS=-fschg, as per change to usr.bin/ssh/ssh/Makefile. 2000-10-18 00:24:18 +00:00
assar 6d7f2da1a1 remove -lvers, it's not used 2000-08-03 22:56:29 +00:00
assar 549a4d9cdc update build infrastructure for heimdal 0.3a 2000-08-03 04:02:29 +00:00
ad a7d94ddf80 Add pwd_gensalt() - generates password salt/setting for crypt(), based upon
target user and information obtained from passwd.conf. From OpenBSD.
2000-07-06 11:16:50 +00:00
veego f3b06ab74b Add a MKKERBEROS check to enable/disable kerberos support during the build. 2000-06-24 06:52:10 +00:00
thorpej e7d6b96938 Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so.  Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
2000-06-20 06:00:24 +00:00
mjl 4b9294447c Wrap login.conf database access in ifdef LOGIN_CAP. 2000-01-12 05:13:32 +00:00
mjl 4f10733450 Fix yppasswd part of passwd. This has never worked since the
password map was split and master.passwd.byname was introduced.

XXX This is a temporary fix until luke finds some time to add
the necessary support glue to libc for TRT.
1999-12-23 01:02:52 +00:00
mrg 51a96a002f optionally include CRYPTOPATH Makefile.frag files. 1999-07-20 09:35:18 +00:00
thorpej 9630ed475e Use bsd.crypto.mk. 1999-07-12 22:11:37 +00:00
scottr 8481f548e2 Remove the crypto-related bits until such time as we have a fully-
integrated source tree.  Export-controlled versions of these are now
built during the domestic build process.
1999-02-18 21:22:51 +00:00
lukem 8ba07ab0b3 use CPPFLAGS instead of CFLAGS 1997-10-24 09:00:17 +00:00
mrg bda99ff7a0 find "namespace.h" ... 1997-07-23 03:10:54 +00:00
gwr 10e180cc49 Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr 012e528f2e Use .PATH.c: ... 1997-05-06 20:44:56 +00:00
tls d47b2b42f1 remove vestigal Berkeley kpasswdd support 1997-01-07 04:02:11 +00:00
tls 28316c21d3 Sync with 4.4BSD-Lite2 (whew!) 1996-12-28 04:30:02 +00:00
thorpej 27643ee095 Slight semantics change: ALWAYS use YP if the system is bound to a
YP server.  This is required if the passwd database is to stay in sync
if this program is run on the YP server.  Note, local passwd database
operations can still be performed by passing the -l flag.

Also, some minor cleanup and RCS id police.
1996-08-09 09:19:33 +00:00
jtc 370990b210 Updated to use new password file functions in libutil.
From Greg Hudson <ghudson@MIT.EDU>.
1996-05-15 21:50:39 +00:00
hpeyerl db2ac90d67 Fix minor -Ibooboo 1995-03-31 05:49:37 +00:00
phil 68bbf97073 Make passwd work with a link to yppasswd. (From Jason Thorpe) 1995-02-12 17:45:54 +00:00
mycroft 3dbc1e9443 Patch from Giles Lean to make compilation flags more consistent. 1995-01-07 23:07:03 +00:00
brezak 304b4efcdf Fix krb4 build. From Michael Graff <explorer@vorpal.com> 1994-10-17 18:36:57 +00:00
brezak 9adfc4104e Add conditional kerberosIV and kerberos5 support 1994-07-27 03:28:11 +00:00
cgd 4b30c543a0 always use libcrypt 1993-10-07 02:16:39 +00:00
mycroft 07832ac9cf Add RCS identifiers. 1993-07-31 00:20:24 +00:00
brezak 96267d0e22 Add YP support. 1993-06-11 00:34:38 +00:00
cgd 86677cb02a changed to use new libcrypt scheme. 1993-04-26 14:42:34 +00:00
cgd 649bd7ccc5 added support for using real crypt 1993-03-22 23:27:33 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00