aboutsummaryrefslogtreecommitdiff
path: root/lib/libcrypt/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Skein was not meant to be connected to libcryptoAllan Jude2016-06-011-16/+4
| | | | | | | | | It is not a password hashing algorithm Reported by: cem Notes: svn path=/head/; revision=301168
* Import the skein hashing algorithm, based on the threefish block cipherAllan Jude2016-05-291-4/+16
| | | | | | | | | | | | | | | | Connect it to userland (libmd, libcrypt, sbin/md5) and kernel (crypto.ko) Support for skein as a ZFS checksum algorithm was introduced in r289422 but is disconnected because FreeBSD lacked a Skein implementation. A further commit will enable it in ZFS. Reviewed by: cem Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D6166 Notes: svn path=/head/; revision=300921
* Implement SHA-512 truncated (224 and 256 bits)Allan Jude2016-05-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=300903
* First pass through library packaging.Glen Barber2016-02-041-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295278
* Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.cAllan Jude2015-12-271-0/+1
| | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=292782
* META MODE: Avoid dirdep dependency on lib/libmd.Bryan Drewery2015-11-251-1/+2
| | | | | | | | | | | | | This avoids using the staged headers for sys/crypto/sha2/*.h, such as sha256.h, which added an unneeded pre-build dependency on libmd to libcrypt. This header is an INCS in lib/libmd, but found via .PATH in sys/crypto/sha2. Since the libcrypt build was already using the in-src libmd headers directly, just teach it how to find the sha256.h header as well. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291325
* Revert r284417 it is not necessary anymoreBaptiste Daroussin2015-06-151-1/+1
| | | | Notes: svn path=/head/; revision=284421
* Enforce overwritting SHLIBDIRBaptiste Daroussin2015-06-151-1/+1
| | | | | | | | | | | | Since METAMODE has been added, sys.mk loads bsd.mkopt.mk which ends load loading bsd.own.mk which then defines SHLIBDIR before all the Makefile.inc everywhere. This makes /lib being populated again. Reported by: many Notes: svn path=/head/; revision=284417
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* replace the kernel's version w/ cperciva's implementation... In allJohn-Mark Gurney2014-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | my tests, it is faster ~20%, even on an old IXP425 533MHz it is ~45% faster... This is partly due to loop unrolling, so the code size does significantly increase... I do plan on committing a version that rolls up the loops again for smaller code size for embedded systems where size is more important than absolute performance (it'll save ~6k code)... The kernel implementation is now shared w/ userland's libcrypt and libmd... We drop support for sha256 from sha2.c, so now sha2.c only contains sha384 and sha512... Reviewed by: secteam@ Notes: svn path=/head/; revision=263218
* Set up the /usr/tests hierarchy.Rui Paulo2013-10-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | Populate /usr/tests with the only test programs that currently live in the tree (those in lib/libcrypt/tests/) and add all the build machinery to accompany this change. In particular: - Add a WITHOUT_TESTS variable that users can define to request that no tests be put in /usr/tests. - Add a top-level Kyuafile for /usr/tests and a way to create similar Kyuafiles in top-level subdirectories. - Add a BSD.tests.dist file to define the directory layout of /usr/tests. Submitted by: Julio Merino jmmv google.com Reviewed by: sjg MFC after: 2 weeks Notes: svn path=/head/; revision=257097
* Stop using auth_getval() now that it always returns NULL. Instead,Dag-Erling Smørgrav2012-06-121-5/+1
| | | | | | | | | | hardcode the default to what it would be if we didn't hardcode it, i.e. DES if supported and MD5 otherwise. MFC after: 3 weeks Notes: svn path=/head/; revision=236967
* Protect the reachover built symbols after the SHA256/512 crypt(3) addition.David E. O'Brien2011-04-271-1/+3
| | | | Notes: svn path=/head/; revision=221142
* Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn'tMark Murray2011-04-091-1/+3
| | | | | | | | | | | hurt us. PR: misc/124164 Submitted by: KIMURA Yasuhiro < yasu utahime org > MFC after: 1 month Notes: svn path=/head/; revision=220497
* Build lib/ with WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway. Notes: svn path=/head/; revision=201381
* Bump the version of all non-symbol-versioned shared libraries inKen Smith2009-07-191-1/+1
| | | | | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson) Notes: svn path=/head/; revision=195767
* Bump library versions in preparation for 7.0.Daniel Eischen2007-05-211-1/+1
| | | | | | | Ok'd by: kan Notes: svn path=/head/; revision=169807
* Provide alternate default for SHLIBDIR before bsd.own.mk does this.Ruslan Ermilov2006-03-181-1/+2
| | | | | | | Reported by: phk Notes: svn path=/head/; revision=156837
* Reimplementation of world/kernel build options. For details, see:Ruslan Ermilov2006-03-171-1/+3
| | | | | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine) Notes: svn path=/head/; revision=156813
* Bump the shared library version number of all libraries that have notKen Smith2005-07-221-1/+1
| | | | | | | | | | been bumped since RELENG_5. Reviewed by: ru Approved by: re (not needed for commit check but in principle...) Notes: svn path=/head/; revision=148297
* NOCRYPT -> NO_CRYPTRuslan Ermilov2004-12-211-1/+1
| | | | Notes: svn path=/head/; revision=139113
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-241-1/+1
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* Stage 3 of dynamic root support. Make all the libraries needed to runGordon Tetlow2003-08-171-0/+1
| | | | | | | | | binaries in /bin and /sbin installed in /lib. Only the versioned files reside in /lib, the .so symlink continues to live /usr/lib so the toolchain doesn't need to be modified. Notes: svn path=/head/; revision=119017
* Add a new hash type. This "NT-hash" is compatible with the passwordMark Murray2003-06-021-7/+11
| | | | | | | | | | hashing scheme used in Microsoft's NT machines. IT IS NOT SECURE! DON'T USE IT! This is for the use of competent sysadmins only! Submitted by: Michael Bretterklieber Notes: svn path=/head/; revision=115720
* Retire the useless NOSECURE knob.Dag-Erling Smørgrav2003-05-191-1/+1
| | | | | | | Approved by: re (scottl) Notes: svn path=/head/; revision=115157
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-1/+1
| | | | Notes: svn path=/head/; revision=74870
* Help standalone builds by getting libutil.h from src/lib/libutilPeter Wemm2001-03-211-1/+1
| | | | Notes: svn path=/head/; revision=74607
* Add OpenBSD-style blowfish password hashing. This makes one lessMark Murray2001-03-111-2/+2
| | | | | | | | | | | | | gratuitous difference between us and our sister project. This was given to me _ages_ ago. May apologies to Paul for the length of time its taken me to commit. Obtained from: Niels Provos <provos@physnet.uni-hamburg.de>/OpenBSD Submitted by: Paul Herman <pherman@frenchfries.net> Notes: svn path=/head/; revision=74106
* Merge into a single US-exportable libcrypt, which only providesPeter Wemm2000-12-281-54/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one-way hash functions for authentication purposes. There is no more "set the libcrypt->libXXXcrypt" nightmare. - Undo the libmd.so hack, use -D to hide the md5c.c internals. - Remove the symlink hacks in release/Makefile - the algorthm is set by set_crypt_format() as before. If this is not called, it tries to heuristically figure out the hash format, and if all else fails, it uses the optional auth.conf entry to chose the overall default hash. - Since source has non-hidden crypto in it there may be some issues with having the source it in some countries, so preserve the "secure/*" division. You can still build a des-free libcrypt library if you want to badly enough. This should not be a problem in the US or exporting from the US as freebsd.org had notified BXA some time ago. That makes this stuff re-exportable by anyone. - For consistancy, the default in absence of any other clues is md5. This is to try and minimize POLA across buildworld where folk may suddenly be activating des-crypt()-hash support. Since the des hash may not always be present, it seemed sensible to make the stronger md5 algorithm the default. All things being equal, no functionality is lost. Reviewed-by: jkh (flame-proof suit on) Notes: svn path=/head/; revision=70419
* How did you sneak in...Brian Feldman2000-08-221-1/+1
| | | | Notes: svn path=/head/; revision=64919
* Add working and easy crypt(3)-switching. Yes, we need a whole new APIBrian Feldman2000-08-221-1/+2
| | | | | | | | | | | | | | | | | for crypt(3) by now. In any case: Add crypt_set_format(3) + documentation to -lcrypt. Add login_setcryptfmt(3) + documentation to -lutil. Support for switching crypt formats in passwd(8). Support for switching crypt formats in pw(8). The simple synopsis is: edit login.conf; add a passwd_format field set to "des" or "md5"; go nuts :) Reviewed by: peter Notes: svn path=/head/; revision=64918
* Zap SHA1 password support. This will be re-implemented at a later date.Kris Kennaway2000-01-071-2/+2
| | | | Notes: svn path=/head/; revision=55535
* Remove -lmd. Use dlopen() and dlsym() instead for calls to the MD5* andPeter Wemm1999-12-171-3/+0
| | | | | | | | SHA* routines so that callers of libcrypt are not exposed to the internal implementation. Notes: svn path=/head/; revision=54751
* Someone changed major numbers of the libraries from 2 to 3 for 0 (zero) reasons.Dmitrij Tejblum1999-09-211-1/+1
| | | | | | | | | | | | Revert the major number back to 2. libcrypt only export one function, before the recent changes and now: char *crypt(const char *key, const char *salt); The prototype didn't changed. Internal representation of `char' and `char *' didn't changed. Therefore, there is no reason to change the version number. Notes: svn path=/head/; revision=51510
* Somebody deleted the SONAME override causing the symlink to be expandedPeter Wemm1999-09-211-0/+4
| | | | | | | | at link time and the target name compiled into the binaries. ie: everything used libscrypt or libdescrypt explicitly. Notes: svn path=/head/; revision=51505
* Big code cleanup. (Inspired by Brandon Gillespie). Also move asMark Murray1999-09-201-15/+35
| | | | | | | much as possible away from secure/ to make extending easier. Notes: svn path=/head/; revision=51462
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Simplified using new SYMLINKS macro, mainly to test this macro. TheBruce Evans1999-03-231-26/+15
| | | | | | | | | | | | | ifdefs are too ugly for this to be much of a simplification. The existence tests are even uglier now. Note that the previous commit was not submitted by me. It missed the point and just added a second layer of unused removals. Fixed hard-coded "libcrypt"s. The LCRYPTBASE macro mainly makes things hard to read, but use it while we have it. Notes: svn path=/head/; revision=44947
* Fix symlinking. Without the -f "force" option, the wrong versionMark Murray1999-01-241-4/+4
| | | | | | | | can be found. Submitted by: Bruce Notes: svn path=/head/; revision=43152
* The new crypt code broke "make world". Back it out.Mark Murray1999-01-231-27/+27
| | | | Notes: svn path=/head/; revision=43092
* Rewrite of crypt library to be more modular, and addition of theBrandon Gillespie1999-01-211-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Secure Hashing Algorithm - 1 (SHA-1), along with the further refinement of what $x$salt$hash means. With this new crypt the following are all acceptable: $1$ $MD5$ $SHA1$ Note: $2$ is used by OpenBSD's Blowfish, which I considered adding as $BF$, but there is no actual need for it with SHA-1. However, somebody wishing to add OpenBSD password support could easilly add it in now. There is also a malloc_crypt() available in the library now, which behaves exactly the same as crypt(), but it uses a malloced buffer instead of a static buffer. However, this is not standard so will likely not be used much (at all). Also, for those interested I did a brief speed test Pentium 166/MMX, which shows the DES crypt to do approximately 2640 crypts a CPU second, MD5 to do about 62 crypts a CPU second and SHA1 to do about 18 crypts a CPU second. Reviewed by: Mark Murray Notes: svn path=/head/; revision=42981
* Fixed the elf case of the creation of the libcrypt.so -> libscrypt->soBruce Evans1998-09-021-2/+2
| | | | | | | link. Shared libraries are in ${SHLIBDIR}, not necessarily in ${LIBDIR}. Notes: svn path=/head/; revision=38753
* BINFORMAT -> OBJFORMAT ready for E-day.John Birrell1998-08-301-3/+3
| | | | Notes: svn path=/head/; revision=38635
* BINFORMAT -> OBJFORMAT ready for E-day.John Birrell1998-08-301-2/+2
| | | | Notes: svn path=/head/; revision=38632
* Turn on the rcsid storage so that it's easier to tell the differencePeter Wemm1998-05-281-2/+2
| | | | | | | between libscrypt.a and libdescrypt.a Notes: svn path=/head/; revision=36443
* When compiling under elf, use correct library naming conventions. AlsoPeter Wemm1997-09-051-3/+19
| | | | | | | | add the required extra symlink. Set the -soname to libcrypt.so so that the symlink is used at runtime rather than resolved at compile time. Notes: svn path=/head/; revision=29146
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-2/+2
| | | | Notes: svn path=/head/; revision=8870
* Install shared libraries in ${DESTDIR}${SHLIBDIR} instead of inBruce Evans1994-11-141-15/+15
| | | | | | | | | | | | | $(DESTDIR)/$(LIBDIR) (I need SHLIBDIR. The / was a bug and the $(...) style was inconsistent.) Install ordinary libraries in ${DESTDIR}${LIBDIR} instead of in $(DESTDIR)/$(LIBDIR). Change remaining $(...) to ${...}. Notes: svn path=/head/; revision=4454