www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19836] New: Excessive probability of UUID collisions in

https://issues.dlang.org/show_bug.cgi?id=19836

          Issue ID: 19836
           Summary: Excessive probability of UUID collisions in
                    std.uuid.randomUUID
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: n8sh.secondary hotmail.com

`std.uuid.randomUUID` defaults to using `rndGen`. Because every `rndGen` starts
in one of 2^^32 states then if 77000 independent programs each generate a
single UUID there is a 50% chance that at least two of them generate the same
initial UUID (and all
subsequent UUIDs from those programs would be identical as well). This problem
is shared by C++ boost::uuids::random_generator which also generates UUIDs
using a PRNG initialized with a 32-bit seed.

--
Apr 28 2019