MatrixAI / js-id

ID generation for JavaScript & TypeScript Applications
https://polykey.com
Apache License 2.0
10 stars 1 forks source link

Change to using sha256 for IdDeterministic #3

Open CMCDragonkai opened 2 years ago

CMCDragonkai commented 2 years ago

Specification

The current IdDeterministic uses uuidv5 which uses sha1. The sha1 is now broken and not cryptographically secure. Our usage of IdDeterministic is meant to be cryptographically secure so it would be best to change to sha256 and just truncate to 128 bits. We can keep the uuidv5 spec though as it's indistinguishable from a uuidv5.

Tasks

  1. ...
  2. ...
  3. ...