summaryrefslogtreecommitdiff
path: root/lib/libc/crypt/arc4random.c
AgeCommit message (Expand)Author
2015-09-13Wrap <stdlib.h> so that calls go direct and the symbols not in thePhilip Guenther
2015-09-10Add support for building arc4random with MSVC.Brent Cook
2015-01-16Move to the <limits.h> universe.Theo de Raadt
2015-01-15back in september I did the large abstraction refactoring to allow theseTheo de Raadt
2014-07-21missing newlineTheo de Raadt
2014-07-20Move more OS-specific functionality to arc4random.h headers.bcook
2014-07-19Change _rs_allocate so it can combine the two regions (rs and rsx)Theo de Raadt
2014-07-18Seperate arc4random's os-dependent parts into static inline functions,Theo de Raadt
2014-07-17"Race-free because we're running single-threaded in a newTheo de Raadt
2014-07-16#ifdef wrap the _rs_forkhandlerTheo de Raadt
2014-07-16added handler for an atfork hook from kettenis@bcook
2014-07-13While we thought this would make portable life easier it actuallyBob Beck
2014-07-12Wrap "thread_private.h" with #ifdef __OpenBSD__ so that other systemsTheo de Raadt
2014-07-12Split arc4random_uniform into it's own file, to assist other projectsTheo de Raadt
2014-07-09changes to improve portabilitybcook
2014-06-27re-init and init code paths are now more shared, so the getpid()-basedTheo de Raadt
2014-06-26Add back an #ifndef MAP_INHERIT_ZERO chunk to support the old getpid()Theo de Raadt
2014-06-25document why we explicit_bzeroTheo de Raadt
2014-06-20arc4random: hard fail with raise(SIGKILL) if getentropy() returns -1Matthew Dempsky
2014-06-19Move rs_chacha and rs_buf into the same memory page and don't mark itMatthew Dempsky
2014-06-17Use MAP_INHERIT_ZERO in arc4random(3)Matthew Dempsky
2014-06-13For now... assume success of getentropy() just like we assumed successTheo de Raadt
2014-06-13use getgentropy() call. If it fails, things are pretty bad --Theo de Raadt
2014-05-31Delete the extraneous "return" statement at the end of a void function.Jeremie Courreges-Anglas
2014-05-06missing NULL checks to see if init is needed. found hard way by deraadt.Ted Unangst
2014-05-06clear a stack buffer with explicit_bzeroTed Unangst
2014-05-06move chacha context and buffer out of bss and allow mmap to place themTed Unangst
2014-05-04delete useless test codeTheo de Raadt
2013-10-21Remove arc4random_stir() and arc4random_addrandom(), which none shouldTheo de Raadt
2013-10-01replace rc4 with ChaCha20; inspired by Nick Mathewson's work on libottery;Markus Friedl
2013-06-11spacingTheo de Raadt
2012-06-24Change arc4random_uniform() to calculate ``2**32 % upper_bound'' asMatthew Dempsky
2010-12-22remove comment that hasn't been true for quite a while now;Otto Moerbeek
2009-12-15No point in refreshing the pid from inside arc4_stir() when thatPhilip Guenthe
2008-10-03zap __arc4_getbyte(), it was only used by the old malloc; ok millert@Otto Moerbeek
2008-06-04fix math screwup that reintroduced a bias for upper_bounds in rangeDamien Miller
2008-03-16diff from djm@ committed at his request:Otto Moerbeek
2008-01-01- make arc4random*() functions thread safe. Use a custom spinlock functionKurt Miller
2007-02-12provide an libc internal interface to get random bytes, to be used by mallocOtto Moerbeek
2005-11-30Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a timeOtto Moerbeek
2005-06-06Change email address for author, at his request.Kjell Wooding
2005-06-06Change license to standard OpenBSD boilerplate, with permissionKjell Wooding
2005-06-04use the new fat random sysctl to get initial state. (fallback to looping).Ted Unangst
2004-11-02kill spacesHans-Joerg Hoexer
2003-11-26Discard first 256 bytes of keystream, as per recommendation inDamien Miller
2003-08-16just use sysctl for stirring. thread safe and can't fail.Ted Unangst
2003-06-11ansification; checked by pvalTheo de Raadt
2003-02-14re-stir if pid changes; markus & meTheo de Raadt
2001-06-05License clarification from David Mazieres, ok deraadt@Peter Valchev
1999-09-28Set j = i after arc4random key schedule to be more like arc4 stream cipher;Theo de Raadt