Skip to content

mention tuid#36

Merged
swyxio merged 6 commits intoswyxio:masterfrom
nosovk:patch-1
Jun 18, 2022
Merged

mention tuid#36
swyxio merged 6 commits intoswyxio:masterfrom
nosovk:patch-1

Conversation

@nosovk
Copy link
Contributor

@nosovk nosovk commented Jun 12, 2022

No description provided.

@kurtextrem
Copy link

Please also mention tuid uses Math.random in the JS implementation, making it less secure than the original UUID implementation (that uses the crypto module).

@nosovk
Copy link
Contributor Author

nosovk commented Jun 12, 2022

Lol, never saw that there is a JS implementation there. It usually needed for generation of Primary Keys in databases (mostly PG). Using it allows substituting Serial with less predictable values, without dropping performance. And usually it's compiled as C extension in PG.
But how @kurtextrem mentioned there is some JS implementation available. It's a good point that using JS for cryptography is a bad idea, and you should not rely on naive JS implementations because of security and performance issues. Better use official https://nodejs.org/api/crypto.html or something like https://www.npmjs.com/package/argon2, which uses bindings to C code under the hood.

@swyxio
Copy link
Owner

swyxio commented Jun 12, 2022

Thanks a TON @nosovk and @kurtextrem - i am surprised anyone is paying attention to this repo but this is why i open sourced my list!

i took the advantage to rearrange my list a little bit - have a look at my latest commit

do you have anything else to add? i'd love your input. really appreciate the add.

@kurtextrem
Copy link

I found your HackerNews thread interesting and the comments there, e.g. this one regarding verification of UUIDs. Maybe worth adding as 'ideas'?
Also, an interesting thread with opinions about the UUIDs randomness maybe even being an advantage: https://news.ycombinator.com/item?id=31721983. Curious about benchmarks now.

@kurtextrem
Copy link

kurtextrem commented Jun 13, 2022

Also, I got another set of tools that generate UUID similar things, which I'd personally mention (at least the first two)

The updates look good! 👍🏻

@swyxio swyxio merged commit ff03826 into swyxio:master Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants