Math.random() is not cryptographically secure
Open
- Dominant language
- CSS
- Stars
- 59
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
For something where you don't want a possible attacker to have any knowledge of the upcoming lane, the randomizer needs to be cryptographically secure.
Thankfully, this is easy to fix by just using https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues instead of Math.random().
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the randomizer code that calls Math.random() and read how the upcoming lane is selected. Use the browser RandomSource/getRandomValues API described in the issue, then verify that lane generation no longer relies on Math.random().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100