Re: urandom skew

From: Theodore Y. Ts'o (tytso@MIT.EDU)
Date: Wed Apr 05 2000 - 22:19:03 EST


   Date: Wed, 5 Apr 2000 23:12:38 -0400
   From: "Theodore Y. Ts'o" <tytso@MIT.EDU>

   My guess is that you're probably doing something like this:

           char x;

           read(fd, &x, 1)
           count[x >> 4]++;
           count[x & 0xF]++;

   ...and forgetting to use a signed variable for 'x'.

Sorry, that should have read, "forgetting to use an *unsigned* variable
for 'x'"

                                                   - Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:16 EST