Comment by motohagiography

1 year ago

how many sequential chars of a uuid do you need to calculate the rest of it, or infer the rest of it from a smaller set of all possible ones?

All of them, more or less. There are a few marker bits but the rest are pure data. There is no error correct or redundancy.

  • I didn't think v4 uuid's were completely random over that 128bit space for some reason, and this was wrong, but interestingly.

    for a uuid like 414c1bde-b676-4242-be35-887f01a24f10, if I take its suffix 887f01a24f10 (12 chars, 48 bits) there are still 19 chars (76 bits) to the left of it. (barring the constant 13th char identifier 4)

    There still are 2^76 uuid's with that suffix to search through. It made sense with ipv6 addresses and cryptography, but for some reason I had this idea that uuid's didn't use an CRNG that covered the whole 128 bit space. A lot of wrong stuff rattling around in my memory for some reason, thanks for clarifying.

    • There are 6 fixed bits. The other two are in the 17th hex character.

      But overall you have that right. Every bit is either completely random or fixed. There are no reduced-randomness patterns unless you generated it wrong.