summaryrefslogtreecommitdiffstats
path: root/lib/libcrypt
Commit message (Collapse)AuthorAgeFilesLines
* MFC r312452-r312512:ngie2017-02-101-5/+5
| | | | | | | | | | r312452-r312512: - Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output - Use .CURDIR:H instead of .CURDIR to simplify pathing in output, etc
* Skein was not meant to be connected to libcryptoallanjude2016-06-011-16/+4
| | | | | | It is not a password hashing algorithm Reported by: cem
* Import the skein hashing algorithm, based on the threefish block cipherallanjude2016-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
* Implement SHA-512 truncated (224 and 256 bits)allanjude2016-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
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedngie2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
* MFHgjb2016-03-101-0/+1
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * DIRDEPS_BUILD: Connect MK_TESTS.bdrewery2016-03-091-0/+1
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | First pass through library packaging.gjb2016-02-041-0/+1
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | First pass to fix the 'tests' packages.gjb2016-02-021-0/+4
|/ | | | Sponsored by: The FreeBSD Foundation
* Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.callanjude2015-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
* Enable libcrypt tests.rodrigc2015-12-011-7/+7
| | | | | | kyua 0.12 has fix for https://github.com/jmmv/kyua/pull/148 which eliminates invalid XML characters from being written to test reports with "kyua report-junit".
* META MODE: Avoid dirdep dependency on lib/libmd.bdrewery2015-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
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.bdrewery2015-11-251-1/+0
| | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division
* Temporarily comment out the libcrypt tests.rodrigc2015-11-181-7/+7
| | | | | | | | | | They are emitting characters which are triggering a kyua bug which causes kyua to emit invalid XML. This invalid XML is causing false failures in Jenkins. On a separate note, kyua needs to be fixed with this: https://github.com/jmmv/kyua/pull/148 or something similar.
* Integrate contrib/netbsd-tests/lib/libcrypt/t_crypt.c in to the FreeBSDngie2015-11-161-2/+4
| | | | | | | test suite as lib/libcrypt/crypt_test MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-121-2/+0
| | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* META_MODE: Remove DEP_RELDIR from Makefile.depend files.bdrewery2015-09-251-2/+0
| | | | | | This has not been needed since r284171 in projects/bmake. Sponsored by: EMC / Isilon Storage Division
* new dependssjg2015-06-161-0/+1
|
* Revert r284417 it is not necessary anymorebapt2015-06-151-1/+1
|
* Enforce overwritting SHLIBDIRbapt2015-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
* Add META_MODE support.sjg2015-06-132-0/+41
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Fix include of atf-c.hsjg2015-05-302-1/+3
| |
| * Merge sync of headsjg2015-05-271-2/+1
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-192-8/+12
| |\
| * \ Merge head from 7/28sjg2014-08-192-2/+6
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+1
| | | |
| * | | Updated dependenciessjg2014-05-101-0/+2
| | | |
| * | | Merge from headsjg2014-05-081-1/+1
| |\ \ \
| * \ \ \ Merge headsjg2014-04-285-112/+102
| |\ \ \ \
| * | | | | Fix building of crypt_testssjg2013-06-252-2/+20
| | | | | |
| * | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | |
| * | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | |
| * | | | | Sync with HEAD.obrien2013-02-082-0/+64
| |\ \ \ \ \
| | \ \ \ \ \
| | \ \ \ \ \
| *-. \ \ \ \ \ Sync from headsjg2012-11-044-21/+12
| |\ \ \ \ \ \ \
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | Convert libraries to use LIBADDbapt2014-11-251-2/+1
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | While here reduce a bit overlinking
* | | | | | | | Change the hardcoded default back from SHA512 to DES.des2014-10-091-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 192277 MFC after: 3 days
* | | | | | | | Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile ↵ngie2014-08-181-1/+2
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables This fixes "make checkdpadd" Phabric: D620 Approved by: jmmv (mentor) PR: 192729 MFC after: 5 days
* | | | | | | use .Mt to mark up email addresses consistently (part3)bapt2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* | | | | | | Don't break the legacy applications which setume2014-05-281-1/+5
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | just 2 bytes to salt. MFC after: 1 week
* | | | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | from the latter.
* | | | | r261913 broke DES passwords, because the only way they could work,des2014-04-261-77/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since they don't have an easily recognizable signature, was if they were the default. This commit rewrites crypt_set_format(3) etc to address this: - Use a pointer instead of an index to identify the default format. This pointer is initialized at compile time to point to the first first element in the list of supported formats, eliminating the need for crypt_setdefault(). Using a pointer also simplifies iterating through the list. - Associate DES with the magic string "_", which takes care of the Extended DES format. - Finally, as a special case, if the salt does not match any known magic string but matches ^[./0-9A-Za-z]{13}$, it is assumed to be a DES password and is passed on to crypt_des(). MFC after: 1 week
* | | | | replace the kernel's version w/ cperciva's implementation... In alljmg2014-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@
* | | | | Make bsd.test.mk the only public mk fragment for the building of tests.jmmv2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change {atf,plain,tap}.test.mk to be internal implementation details of bsd.test.mk. Makefiles that build tests should now only include bsd.test.mk and declaratively specify what they want to build, without worrying about the internal implementation of the mk files. The reason for this change is to permit building test programs of different interfaces from a single directory, which is something I had a need for while porting tests over from src/tools/regression/. Additionally, this change makes it possible to perform some other requested changes to bsd.test.mk in an easier manner. Coming soon.
* | | | | various formating fixes, use NUL for NUL bytes..jmg2014-03-091-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drop out dated perf numbers (can't imagine people are still running Pentium MMX 166's anymore)... bump date... drop max length of salt of 8 since _PASSWORD_LEN is now large, 128.. and state the max length of the salt depends upon the module, sha-{256,512} have a max salt of 16.. recommend 8 characters of salt instead of just 2... MFC after: 1 week
* | | | | Switch the hardcoded default hash function from MD5 / DES to SHA512.des2014-02-151-5/+1
| | | | |
* | | | | Set up the /usr/tests hierarchy.rpaulo2013-10-252-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Clearly split the logic to build ATF and plain tests apart.rpaulo2013-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new plain.test.mk file that provides the build infrastructure to build test programs that don't use any framework. Most of the code previously in bsd.test.mk moves to plain.test.mk and atf.test.mk is extended with the missing pieces. In doing so, this change pushes all test program building logic to the various *.test.mk files instead of trying to reuse some tiny bits. In fact, this attempt to reuse some definitions makes the code harder to read and harder to extend. The clear benefit of this is that the interface of bsd.test.mk is now clearly delimited. Submitted by: Julio Merino jmmv google.com MFC after: 2 weeks
* | | | | Remove most of the ATF tools and the _atf user.rpaulo2013-10-121-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary because ATF is deprecated and it will be replaced by Kyua. Submitted by: jmmv@netbsd.org Reviewed by: Garrett Cooper Approved by: re
OpenPOWER on IntegriCloud