random: fix output buffer folding
authorMatt Mackall <mpm@selenic.com>
Sat, 16 Jun 2007 17:16:11 +0000 (10:16 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 16 Jun 2007 20:16:16 +0000 (13:16 -0700)
commit679ce0ace6b1a07043bc3b405a34ddccad808886
treeaf185e76fdcae99d9450a3fef7b8c8005eae1cc4
parent39a279026609c205d331ec39fea11b2fd470a054
random: fix output buffer folding

(As reported by linux@horizon.com)

Folding is done to minimize the theoretical possibility of systematic
weakness in the particular bits of the SHA1 hash output.  The result of
this bug is that 16 out of 80 bits are un-folded.  Without a major new
vulnerability being found in SHA1, this is harmless, but still worth
fixing.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Cc: <linux@horizon.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/random.c