Hacker News new | ask | show | jobs
by jongjong 39 days ago
Interesting! That said, these examples appear to be crafted in a special way to cause the collision. In a practical scenario with normal usage, I suspect it would be essentially impossible. Sure, it can be a problem in some niche scenarios with a determined attacker but a collision would just mean that the user is not able to create the resource (the system would falsely indicate that the resource already exists); but that's not too bad. At worst, it would reveal the existence of a resource with a specific UUID, but could the attacker have achieved the collision if they didn't know the target UUID already? It doesn't seem like a viable attack given how little information it gives you.
1 comments

Correct, this is a very specific attack where an attacker can generate UUIDv5 collisions but cannot force a collision of a chosen UUID. If your usage doesn't serve any security functions then its fine to use an insecure hash function.

One thing I find interesting is that we seem to be at the end of the road for secure hash-based UUIDs. SHA-1 was already truncated (I.E. weakened) from 160 bits to 122 bits to fit the UUID width. To fit a SHA-256 hash you'd need to throw away a majority of the bits!