cvs commit: src/lib/libc/gen arc4random.c

Andrey A. Chernov ache at
Mon Jul 21 21:57:45 UTC 2008

ache        2008-07-21 21:57:30 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/gen         arc4random.c 
  SVN rev 180676 on 2008-07-21 21:57:30Z by ache
  1) Use __packed attr on rdat structure to make it exact 128 bytes.
  2) Use gettimeofday() and getpid() only if reading from /dev/urandom
  fails or impossible.
  3) Discard N bytes on very first initialization only (i.e. don't
  discard on re-stir).
  4) Reduce N from 1024 to 512 as really suggested in the
  "(Not So) Random Shuffles of RC4" paper:
  Revision  Changes    Path
  1.17      +17 -10    src/lib/libc/gen/arc4random.c

More information about the cvs-src mailing list