lkml.org 
[lkml]   [2005]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: /dev/random vs. /dev/urandom
On Fri, Jan 07, 2005 at 05:39:46PM -0500, linux-os wrote:

> Also, the following shows that the AND operation will destroy
> the randomness of the data. In this case I AND with 1, which
> should produce as many '1's as '0's, ... and clearly does not.

You do not sound like a reliable source of information
about randomness.

> LINUX> gcc -Wall -O2 -o xxx xxx.c
> LINUX> ./xxx
> Trying /dev/random
> 0100000101010000010001000101000000000000000101000100010000000101
> odds = 14 evens = 18
> Trying /dev/urandom
> 0001010001000100000101000100010001000000000000000000010000000000
> odds = 10 evens = 22
> LINUX> ./xxx
> Trying /dev/random
> 0100000100010101000101010101010101000100010000010001010000000101
> odds = 20 evens = 12
> Trying /dev/urandom
> 0100000100000101010001000101010001010001000000010101010100010000
> odds = 18 evens = 14
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:1.761 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site