summaryrefslogtreecommitdiff
path: root/lib/libc/crypt
AgeCommit message (Collapse)Author
2015-05-13If crypt(3) is called with an unknown setting, return NULL insteadAlexander Bluhm
of some undefined value. OK tedu@
2015-04-06bludgeon DES support out of crypt. long live the bcrypt.Ted Unangst
2015-02-24we don't let strtonum errors bleed through now.Ted Unangst
2015-02-24Set errno to EINVAL, instead of letting ERANGE escape out.Ted Unangst
Printing strerror() in that case will say result too large, even if rounds is actually too small. invalid is less specific, but less incorrect. ok millert
2015-02-11use a width specifier for lists, and Sq rather than Dq for single lettersJason McIntyre
to avoid swamping it;
2015-02-11the possible algos for pref should be documented hereTed Unangst
2015-01-28dial the time back to about 0.1s, closer to the original targets andTed Unangst
friendlier for users. requested by deraadt
2015-01-16Move to the <limits.h> universe.Theo de Raadt
review by millert, binary checking process with doug, concept with guenther
2015-01-15remove unused variableCharles Longeau
ok tedu@
2015-01-15back in september I did the large abstraction refactoring to allow theseTheo de Raadt
other systems to fit into the same mold, so add copyright
2015-01-12rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,Ted Unangst
nor are they the same size.
2015-01-07stupid me. need errno.hTed Unangst
2015-01-07set errno = EINVAL for invalid salts and hashes in most functions.Ted Unangst
remember to set EACCES in bcrypt_checkpass for hash differences. the higher level crypt_checkpass function will reset errno to EACCES in all cases, which is probably the right behavior, but this change gives code working with the lower level functions the correct errno if they care.
2015-01-05convert clock() to clock_gettime() for improved precision (and accuracy?)Ted Unangst
guenther suggested using thread time, which actually may improve accuracy if somebody puts this in a threaded program.
2014-12-30copy bcrypt autotune from encrypt(1) and expose via crypt_newhashTed Unangst
ok deraadt miod
2014-12-24simplify crypt_checkpass. The API promise is that this function doesn'tTed Unangst
use global data. The simplest fix is to only check blowfish passwords, and implicitly lock out DES passwords. crypt_checkpass is currently only used in one place, passwd, to verify the local user's password, so this is probably acceptable. Gives people a little more time to migrate away from DES before introduing checkpass into more places.
2014-12-08delete documentation for deleted DES interfacesTed Unangst
2014-12-08remove setkey and encrypt interfaces. they are useless and dangerous.Ted Unangst
ok deraadt naddy
2014-12-02macro cleanup; kaspars at bankovskis dot netIngo Schwarze
2014-11-25rand48(3) not drand48(3) to align with the actual man page and XrTodd C. Miller
entries.
2014-11-25no need for md5 xrTed Unangst
2014-11-25revert the bludgeoning of DES. if we need a thread safe crypt, maybe it'sTed Unangst
better to find one instead of continuing to mangle this mess.
2014-11-25push some global data down into functions to make this threadlier.Ted Unangst
only doing what's needed for crypt_hashpass. sigh.
2014-11-24introduce a hashspace define and check that there's enough space toTed Unangst
write out a hash. also simplify writing out the hash.
2014-11-24check crypt() for null. noticed by Jonas TermansenTed Unangst
2014-11-21space needed between macro args and punctuation;Jason McIntyre
2014-11-21add ERRORS, HISTORY, AUTHORS, Copyright year, and some missing macros;Ingo Schwarze
ok tedu@ on a previous version
2014-11-21Let crypt_checkpass() set EACCES after bcrypt_checkpass() failure;Ingo Schwarze
ok tedu@
2014-11-21change prototype for crypt_newhash. the login_cap_t is a holdover from itsTed Unangst
pwd_gensalt origins, but a string argument works equally work and is more friendly to consumers beyond local user accounts. ok deraadt
2014-11-20split crypt_checkpass off into a new fileTed Unangst
2014-11-18add crypt_newhash to NAME and add an MLINK;Jason McIntyre
2014-11-17add new function crypt_newhash to simplify creating new hashes.Ted Unangst
does most of the work pwd_gensalt did, but also creates the hash. (unused yet)
2014-07-21missing newlineTheo de Raadt
2014-07-20Move more OS-specific functionality to arc4random.h headers.bcook
Move <sys/mman.h> and raise(SIGKILL) calls to OS-specific headers. On OpenBSD, move thread_private.h as well to arc4random.h. On Windows, use TerminateProcess on getentropy failure. ok deraadt@
2014-07-20From ISO/IEC 9899:1999 and 9899:201x,Philip Guenther
6.11.5 - Storage-class specifiers: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Diff from Jean-Philippe Ouellet (jean-philippe (at) ouellet.biz)
2014-07-19arc4random re-seeds with getentropy() now; ok deraadt@ jmc@Christian Weisgerber
2014-07-19Change _rs_allocate so it can combine the two regions (rs and rsx)Theo de Raadt
into one if a system has an awesome getentropy(). In that case it is valid to totally throw away the rsx state in the child. If the getentropy() is not very good and has a lazy reseed operation, this combining is a bad idea, and the reseed should probably continue to use the "something old, something new" mix. _rs_allocate() can accomodate either method, but not on the fly. ok matthew
2014-07-18Seperate arc4random's os-dependent parts into static inline functions,Theo de Raadt
making it much easier for libressl -portable to fill in the gaps. ok bcook beck
2014-07-17"Race-free because we're running single-threaded in a newTheo de Raadt
address space, and once allocated rs is never deallocated." document the forkhandler to save reviewers time, with matthew
2014-07-16#ifdef wrap the _rs_forkhandlerTheo de Raadt
2014-07-16added handler for an atfork hook from kettenis@bcook
ok deraadt@ beck@ kettenis@
2014-07-13While we thought this would make portable life easier it actuallyBob Beck
makes it much harder. ok bcook@ kettenis@
2014-07-12Wrap "thread_private.h" with #ifdef __OpenBSD__ so that other systemsTheo de Raadt
can copy this file (plus chacha_private.h) directly and reuse it trivially. Well, as long as they have a getentropy() as well.. ok beck
2014-07-12Split arc4random_uniform into it's own file, to assist other projectsTheo de Raadt
now using this as upstream code. The particular problem is systems that contain older arc4random derivations lacking arc4random_uniform(). ok tedu miod
2014-07-09Clean up after arc4random u_int32_t uint32_t changeBob Beck
ok jsing@
2014-07-09changes to improve portabilitybcook
ok beck@ deraadt@ jsing@ guenther@
2014-06-27re-init and init code paths are now more shared, so the getpid()-basedTheo de Raadt
portable code path must handle that; with brent cook
2014-06-26Add back an #ifndef MAP_INHERIT_ZERO chunk to support the old getpid()Theo de Raadt
mechanism, to aid in portability to other systems as requested. ok matthew
2014-06-25document why we explicit_bzeroTheo de Raadt
2014-06-20arc4random: hard fail with raise(SIGKILL) if getentropy() returns -1Matthew Dempsky
Allow other non-zero return values in case we change our mind to return an ssize_t byte count instead of simple success/fail. ok deraadt, djm