News for hackers. Stuff that matters.
Re:Understanding UUIDs, ULIDs and string representations by jandrewrogers on Wednesday January 05, 2022 @10:49AM (#29810416)
This is often dealt with trivially using collision-free hashing. It exports a number in the same domain as the sequence (i.e. 64-bit sequence -> 64-bit id) but is not reversible and is guaranteed to be unique.
Re:Understanding UUIDs, ULIDs and string representations by noodlesUK on Wednesday January 05, 2022 @11:09AM (#29810742)
This is true with identifiers which are already random, but unless you’re doing something like keyed hashing, a naive implementation of say SHA256(predictable_id) isn’t going to solve this problem against a determined attacker, but I’d like to learn a bit more about what you’re discussing here.
Re:Understanding UUIDs, ULIDs and string representations by jandrewrogers on Wednesday January 05, 2022 @11:40AM (#29811234)
For example, running the sequence generator through AES rounds. This is keyed, very fast if the hardware supports it, and permutations of types smaller than the block size are collision-free and non-reversible[0] if the AES block is setup suitably.

In other cases, a 128-bit key is simply encrypted (conveniently being the same block size as AES), which allows you to put arbitrary structure inside the exported key.

[0] http://www.jandrewrogers.com/2019/02/12/fast-perfect-hashing...

Re:Understanding UUIDs, ULIDs and string representations by leetrout on Wednesday January 05, 2022 @11:05AM (#29810661)
I was not aware of this!

Do you have a favorite link for more information on this?