Re: Concurrent access to /dev/urandom

From: Matt Mackall
Date: Wed Dec 08 2004 - 23:53:37 EST


On Wed, Dec 08, 2004 at 07:10:16PM -0800, David Lang wrote:
> On Tue, 7 Dec 2004, Bernard Normier wrote:
>
> >I am just trying to generate UUIDs (without duplicates, obviously).
> >
>
> pulling data from /dev/random or /dev/urandom will not ensure that you
> don't have duplicates.

No, but this problem can generate duplicates as large as an SHA hash
with relative ease when it should be essentially impossible. In other
words, it works exactly wrong for UUIDs, which needs fixing.

--
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/