summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Document a known bug in the DES crypt cipher implementation which we'restsp2012-11-301-2/+6
| | | | | | | | | | not going to fix in order to stay compatible with legacy password data. Nobody should use DES crypt anyway these days. See http://www.freebsd.org/security/advisories/FreeBSD-SA-12:02.crypt.asc for details about this bug. Discussed with deraadt and beck about half a year ago (I'm pruning Ms from my tree).
* arc4random_buf is the easy way to fill a buffer now. ok deraadttedu2012-09-041-10/+3
|
* remove reference to no longer existing description of nonexistent devices;naddy2012-07-261-7/+4
| | | | ok deraadt@ tedu@, wording tweaks jmc@
* Change arc4random_uniform() to calculate ``2**32 % upper_bound'' asmatthew2012-06-241-12/+3
| | | | | | | | | | ``-upper_bound % upper_bound''. Simplifies the code and makes it the same on both ILP32 and LP64 architectures, and also slightly faster on LP64 architectures by using a 32-bit remainder instead of a 64-bit remainder. Pointed out by Jorden Verwer on tech@ ok deraadt; no objections from djm or otto
* Update STANDARDS section for a few <stdlib.h> functionsguenther2012-06-021-5/+6
| | | | | | Update SYNOPSIS for setkey() to show it's in <stdlib.h> ok jmc@, millert@
* remove comment that hasn't been true for quite a while now;otto2010-12-221-6/+1
| | | | ok deraadt@ djm@
* remove skipjack and cast from the libc; ok deraadtmikeb2010-10-283-1053/+2
|
* Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentmiod2010-02-031-2/+2
| | | | | | | files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
* No point in refreshing the pid from inside arc4_stir() when thatguenther2009-12-151-6/+15
| | | | | | | | | doesn't test it, so factor out the two places that test it into a routine and do the refreshing there. With this, arch4random_buf() doesn't trigger superfluous calls to getpid() when filling large buffers. ok deraadt@, "looks nicer indeed" otto@
* s/Mhz/MHz/, MHz is a multiple of the SI unit hertz (whose symbol is Hz).sobrado2009-10-311-2/+2
|
* repair the ARC4 story; ok jmc djm millertderaadt2008-12-231-5/+7
|
* zap __arc4_getbyte(), it was only used by the old malloc; ok millert@otto2008-10-031-14/+1
| | | | kurt@
* fix an Xr, and use a more appropriate macro;jmc2008-06-091-4/+4
|
* arc4random_stir() does not use /dev/arandom anymore, but sysctl kern.arandomderaadt2008-06-081-4/+6
|
* fix math screwup that reintroduced a bias for upper_bounds in rangedjm2008-06-041-2/+2
| | | | | | | (2^30,2^31). Nothing in the tree yet requests random numbers bounded by this range. report jakob!deraadt; ok deraadt@
* Zero state buffers on return. OK deraadt@millert2008-04-021-1/+5
|
* - add NAME entries for arc4random_buf and arc4random_uniformjmc2008-03-161-2/+4
| | | | - simplify a macro call (Do/Dc -> Dq)
* Add missing MLINKSderaadt2008-03-161-1/+2
|
* diff from djm@ committed at his request:otto2008-03-162-3/+84
| | | | | | | | | | | | | | introduce two new APIs for requesting strong random numbers: arc4random_buf() - fill an arbitrary memory range with random numbers arc4random_uniform() - return a uniformly distributed random number below a specified upper bound, avoiding the bias that comes from a naive "arc4random() % upper_bound" construction. these mirror similarly-named functions in the kernel; lots of discussion deraadt@ mcbride@
* - make arc4random*() functions thread safe. Use a custom spinlock functionkurt2008-01-011-41/+56
| | | | | | | | | | | instead of the generic pthread macros since free(3) uses __arc4_getbyte() when freeing small sized allocations and the generic pthread macros call malloc(3). - eliminate passing pointers to a static variable with global scope (rs) for additional code clarity and reduction. - shlib minor bumps for libc and libpthread due to new functions. From andreas@ with some bits from me. okay tedu@ marc@ w/some spot checking from millert@
* add a RETURN VALUES section.pyr2007-10-081-9/+9
| | | | ok jmc@
* convert to new .Dd format;jmc2007-05-313-6/+6
|
* macros at start of line require a `.';jmc2007-05-021-2/+2
|
* Document the lack of error return value in arc4random.pyr2007-05-021-1/+4
| | | | Sync the documentation in getpid with arc4random's format.
* Get rid of useless #if 0 block, especially since the code is includedray2007-03-191-5/+1
| | | | | | immediately after. OK millert@.
* Change hard coded numbers to sizeof(buf). Also change someray2007-02-201-3/+3
| | | | | | | | sizeof(buf) - 1 to sizeof(buf), since fgets takes the whole buffer size. Based on diff from Charles Longeau <chl at tuxfamily dot org> long ago. OK millert@.
* provide an libc internal interface to get random bytes, to be used by mallocotto2007-02-121-3/+12
| | | | to get random data without calling getpid(), ok millert@ deraadt@
* no point mentioning functions if we have nothing useful to sayjmc2006-08-051-13/+1
| | | | | | about them; ok djm
* wording/grammar tweaks;jmc2006-07-261-3/+4
|
* better macros;jmc2006-07-261-6/+6
|
* document `iv';jmc2006-07-261-1/+4
| | | | | from eren elci; tweaked by djm ok djm
* updates from nicholas marriott;jmc2006-07-251-5/+9
| | | | re-worded and ok djm
* allocate gsalt large enough; from Matthew R. Dempsky <mrd at alkemiootto2006-07-041-2/+2
| | | | dot org>; ok djm@ deraadt@
* be more careful with atoi() result; ok ottoderaadt2006-04-031-3/+5
|
* Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a timeotto2005-11-301-9/+2
| | | | | | | and remove fallback code. If somebody is dumb enough to make the sysctl fail using systrace, he deserves what he gets. Saves 7 syscalls on process startup. looks good miod@ ok deraadt@ tedu@
* add bf_{ecb,cbc}_{en,de}crypt to the .Nm list;jmc2005-10-021-2/+6
|
* add bcrypt_gensalt, bcrypt, and md5crypt, to the .Nm list;jmc2005-10-021-2/+5
|
* zap remaining rcsid.espie2005-08-083-15/+3
| | | | | | Kill old files that are no longer compiled. okay theo
* punctuation and minor rewording, ok jmcjaredy2005-07-172-6/+6
|
* RC4 is a trademark. Rest of text left intact.kjell2005-06-071-2/+2
|
* Change email address for author, at his request.kjell2005-06-061-2/+2
|
* Change license to standard OpenBSD boilerplate, with permissionkjell2005-06-061-6/+15
| | | | from original author (David Mazieres)
* use the new fat random sysctl to get initial state. (fallback to looping).tedu2005-06-041-12/+14
| | | | stir after eating 400000 words. ok + input deraadt
* sync setkey prototype with realitymillert2005-05-261-2/+2
|
* Be correct in our man pages when talking about NUL termination (that is,cloder2005-02-251-4/+4
| | | | | termination with '\0') vs. null termination. Input from krw@, jaredy@, jmc@. OK deraadt@
* Test the upper limit for the max # of rounds to, to avoid wrapping and endingotto2004-12-221-2/+7
| | | | up with a low number of rounds. Spotted by mpech@; ok mpech@ millert@
* knf, no binary changehshoexer2004-11-031-54/+65
| | | | ok krw@ millert@
* ansi, indentation, etc.hshoexer2004-11-021-17/+8
| | | | ok markus@ krw@ cloder@ millert@
* kill spaceshshoexer2004-11-021-3/+3
| | | | ok djm@
* add some missing $, ok djm@ 'That looks fine to me' millert@jsg2004-10-011-0/+2
|