Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a comparison in the README of the project:

https://github.com/paralleldrive/cuid2#the-contenders

Some of the arguments mentioned are explained elsewhere in the README, others are assumed.

One argument standing out for me is the lack of collision-resistance for UUIDv4 which is surprising for me and I didn't spot any sources for that argument.

Another argument is the entropy source where they go about that Math.random is not reliable as a single entropy source but glimpsing at the source code, they sprinkle the CUID with Math.random data.

I am no expert in ID security, so I am not qualified to speak about the validity of their arguments, only that there's insufficient information to validate without prior knowledge about the problem domain.



crypto.randomUUID should generate UUIDv4 with a cryptographically secure RNG (ie not math.random)

Collision of UUIDV4 (which are 122 bits of entropy) are unlikely enough that it should fit most definitions of the word "impossible".

The argument listed in this library README feels like total bullshit to me, I'd avoid using it for this reason alone.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: