3 ms·
What you stated makes intuitive sense, but it does make me wonder why the RFC states the following in the security considerations: > Implementations SHOULD NOT
by lulzury 2y ago
What you stated makes intuitive sense, but it does make me wonder why the RFC states the following in the security considerations:
> Implementations SHOULD NOT assume that UUIDs are hard to guess. For example, they MUST NOT be used as security capabilities (identifiers whose mere possession grants access). Discovery of predictability in a random number source will result in a vulnerability.
https://datatracker.ietf.org/doc/html/rfc9562#name-security-considerations https://datatracker.ietf.org/doc/html/rfc9562#name-security-...
- jrochkind1 2y agoI don't know the math here specifically, but being hard to guess is a different quantity than chance of collision when following the algorithm. That is, if you aren't trying to have a collision and following the algorithm that has that aim, a collision can be exceedingly unlikely; but they can still be easy to guess if you are trying to predict someone else's assignment.
- stoperaticless 2y agoto illustrate point above: Sequence that easy to guess, but will never collide until it wraps back to 1. n1=1,n2=2,… (Caveat: if generated only by single node/thread)
- jrochkind1 2y agoThanks, not sure what's up with the downvotes, it's simply a fact of the math, and in particular the math here. A computer random number generator with a seed deterministically based on MAC address is another less trivial demonstration of the idea.
- necovek 2y agoThat's mostly focusing on broken RNG properties (i.e. static seed for a pseudo random generator, an outright bad algorithm, or bad entropy source for non-pseudo RNG). They make random numbers predictable, thus your UUIDs become predictable. Cryptographic hashes are usually also dependent on RNGs having good properties (encryption has been broken due to bad RNGs too), but they are a bit more involved to figure out even if you know the input randomness, and are easier to invalidate (change the secret).