Skip to content

CLJS-2386 random-uuid should use a cryptographically strong PRNG if a…#317

Open
swannodette wants to merge 1 commit into
masterfrom
cljs-2386/uuid-strong-prng
Open

CLJS-2386 random-uuid should use a cryptographically strong PRNG if a…#317
swannodette wants to merge 1 commit into
masterfrom
cljs-2386/uuid-strong-prng

Conversation

@swannodette
Copy link
Copy Markdown
Member

No description provided.

…vailable

Using cryptographically strong PRNG in most cases closes the gap to the
implementation in Clojure where the implementation always uses a cryptographically
strong PRNG. Practical exploitation of Math.random predictability on V8 is known.
Most modern platforms have a randomUUID method, however this works only in a secure
context. The getRandomValues method works as a secure fallback. If none of that works,
the Math.random based is used as a last resort.
Dereferencing the internal uuid-gen-method unveils the uuid generation strategy.
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.

1 participant