summaryrefslogtreecommitdiff
path: root/lib/libc/crypt/arc4random.c
AgeCommit message (Collapse)Author
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-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
2004-11-02kill spacesHans-Joerg Hoexer
ok djm@
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-16just use sysctl for stirring. thread safe and can't fail.Ted Unangst
ok deraadt and co.
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
from conversations between various people
1999-06-29if /dev/arandom is not available for seeding, use data from sysctlNiels Provos
kern.arandom.
1998-03-22$OpenBSD$Niklas Hallqvist
1997-07-09Clean up some -Wall flowers.Todd C. Miller
1996-12-28arc4random() number generator, for use with things like RPC xid's.dm