summaryrefslogtreecommitdiff
path: root/lib/libc/crypt
AgeCommit message (Collapse)Author
2010-02-03Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentMiod Vallat
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@
2009-12-15No point in refreshing the pid from inside arc4_stir() when thatPhilip Guenthe
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@
2009-10-31s/Mhz/MHz/, MHz is a multiple of the SI unit hertz (whose symbol is Hz).Igor Sobrado
2008-12-23repair the ARC4 story; ok jmc djm millertTheo de Raadt
2008-10-03zap __arc4_getbyte(), it was only used by the old malloc; ok millert@Otto Moerbeek
kurt@
2008-06-09fix an Xr, and use a more appropriate macro;Jason McIntyre
2008-06-08arc4random_stir() does not use /dev/arandom anymore, but sysctl kern.arandomTheo de Raadt
2008-06-04fix math screwup that reintroduced a bias for upper_bounds in rangeDamien Miller
(2^30,2^31). Nothing in the tree yet requests random numbers bounded by this range. report jakob!deraadt; ok deraadt@
2008-04-02Zero state buffers on return. OK deraadt@Todd C. Miller
2008-03-16- add NAME entries for arc4random_buf and arc4random_uniformJason McIntyre
- simplify a macro call (Do/Dc -> Dq)
2008-03-16Add missing MLINKSTheo de Raadt
2008-03-16diff from djm@ committed at his request:Otto Moerbeek
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@
2008-01-01- make arc4random*() functions thread safe. Use a custom spinlock functionKurt Miller
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@
2007-10-08add a RETURN VALUES section.Pierre-Yves Ritschard
ok jmc@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-02macros at start of line require a `.';Jason McIntyre
2007-05-02Document the lack of error return value in arc4random.Pierre-Yves Ritschard
Sync the documentation in getpid with arc4random's format.
2007-03-19Get rid of useless #if 0 block, especially since the code is includedRay Lai
immediately after. OK millert@.
2007-02-20Change hard coded numbers to sizeof(buf). Also change someRay Lai
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@.
2007-02-12provide an libc internal interface to get random bytes, to be used by mallocOtto Moerbeek
to get random data without calling getpid(), ok millert@ deraadt@
2006-08-05no point mentioning functions if we have nothing useful to sayJason McIntyre
about them; ok djm
2006-07-26wording/grammar tweaks;Jason McIntyre
2006-07-26better macros;Jason McIntyre
2006-07-26document `iv';Jason McIntyre
from eren elci; tweaked by djm ok djm
2006-07-25updates from nicholas marriott;Jason McIntyre
re-worded and ok djm
2006-07-04allocate gsalt large enough; from Matthew R. Dempsky <mrd at alkemioOtto Moerbeek
dot org>; ok djm@ deraadt@
2006-04-03be more careful with atoi() result; ok ottoTheo de Raadt
2005-11-30Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a timeOtto Moerbeek
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@
2005-10-02add bf_{ecb,cbc}_{en,de}crypt to the .Nm list;Jason McIntyre
2005-10-02add bcrypt_gensalt, bcrypt, and md5crypt, to the .Nm list;Jason McIntyre
2005-08-08zap remaining rcsid.Marc Espie
Kill old files that are no longer compiled. okay theo
2005-07-17punctuation and minor rewording, ok jmcJared Yanovich
2005-06-07RC4 is a trademark. Rest of text left intact.Kjell Wooding
2005-06-06Change email address for author, at his request.Kjell Wooding
2005-06-06Change license to standard OpenBSD boilerplate, with permissionKjell Wooding
from original author (David Mazieres)
2005-06-04use the new fat random sysctl to get initial state. (fallback to looping).Ted Unangst
stir after eating 400000 words. ok + input deraadt
2005-05-26sync setkey prototype with realityTodd C. Miller
2005-02-25Be correct in our man pages when talking about NUL termination (that is,Chad Loder
termination with '\0') vs. null termination. Input from krw@, jaredy@, jmc@. OK deraadt@
2004-12-22Test the upper limit for the max # of rounds to, to avoid wrapping and endingOtto Moerbeek
up with a low number of rounds. Spotted by mpech@; ok mpech@ millert@
2004-11-03knf, no binary changeHans-Joerg Hoexer
ok krw@ millert@
2004-11-02ansi, indentation, etc.Hans-Joerg Hoexer
ok markus@ krw@ cloder@ millert@
2004-11-02kill spacesHans-Joerg Hoexer
ok djm@
2004-10-01add some missing $, ok djm@ 'That looks fine to me' millert@Jonathan Gray
2004-09-14do the char * to u_char * song and dance back and forth explicitly asTheo de Raadt
we match API's against each other, fun eh; millert ok
2004-04-06some of these functions are prototyped in pwd.h; ok deraadt@Damien Miller
2003-11-26Discard first 256 bytes of keystream, as per recommendation inDamien Miller
"Weaknesses in the Key Scheduling Algorithm of RC4", Fluhrer, Mantin and Shamir. ok itojun@
2003-08-28wording improvement from Michael Knudsen;Jason McIntyre
2003-08-16just use sysctl for stirring. thread safe and can't fail.Ted Unangst
ok deraadt and co.
2003-08-12Split crypto routine sup again, but differently. This should make theTheo de Raadt
mail floppy parts a fair bit smaller.
2003-08-07unsplice crypt.c and morecrypt.c; start to document some bcrypt and md5cryptTheo de Raadt
things in crypt.3, and create MLINKS