Lets say I want to generate a name-based UUID using v5 of the RFC 4122 using sensitive information as the input (for example the password to my bank account). And lets say I give the generated UUID to a malicious user who wishes to reverse it and obtain my password. Given the following about how UUID v5 is generated:
- Password and namespace are hashed with SHA-1, which is a one-way function, that is, a function which is practically infeasible to invert
- Only the first 16 bytes of the 20 byte SHA-1 hash are kept
The malicious user cannot reverse the UUID to obtain my password. Is this a safe assumption to make? And if so, why does the RFC 4122 specification state "Do not assume that UUIDs are hard to guess; they should not be used as security capabilities (identifiers whose mere possession grants access), for example."? Does the fact that SHA-1 is a one way function alone makes it fairly secure, assuming you're not using any data that is susceptible to dictionary attacks or rainbow tables?