Bug 24877 – Randomness in UUID generation is insufficient.

Status
NEW
Severity
major
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-11-25T00:53:20Z
Last change time
2024-12-01T16:43:15Z
Assigned to
No Owner
Creator
John Dougan
Moved to GitHub: phobos#9881 →

Comments

Comment #0 by jdougan — 2024-11-25T00:53:20Z
UUIDs generated by randomUUID() use the random numbers from std.random, granted with an unpredictableSeed, but from a fundamentally insecure and low entropy source. As per the latest UUID RFC, RFC-8562, Section 8 this should at least have the option of using an actual quality entropy source. https://www.rfc-editor.org/rfc/rfc9562.html in section 8 says: "Instead CSPRNG data SHOULD be selected from a source with sufficient entropy to ensure guaranteed uniqueness among UUID generation."
Comment #1 by dfj1esp02 — 2024-11-25T09:49:06Z
There's an overload that accepts an RNG --- UUID randomUUID(RNG)(ref RNG randomGen); ---
Comment #2 by jdougan — 2024-11-26T04:32:30Z
and no cryptographic streng RNG to use with it. https://breakpoint.purrfect.fr/article/cracking_phobos_uuid.html
Comment #3 by robert.schadek — 2024-12-01T16:43:15Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9881 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB