Security Implications of "caching randomness"
See original GitHub issueThere are some possible security implications of caching randomness as discussed here
Since the original ticket was about “mockability” of uuid, I’m opening this ticket for further discussion on the security implications.
The gist of the problem is:
- Using
crypto.randomBytes
made it extremely hard (impossible) to know previous or predict future values generated by this library - In https://github.com/uuidjs/uuid/pull/435 this library started using a pool, which now makes it very easy to know previous and predict future values generated by looking at a memory dump
The question is should we care and why.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Security Implications of Caching Randomness
1 Answer 1 · The key must be truly random. · The key must be at least as long as the plaintext. ·...
Read more >What is a Cache? - UpGuard
A cache is a temporary data storage location that stores copies of frequently accessed data or files. Learn more about its types and...
Read more >The Security Impact of HTTP Caching Headers - SANS Institute
Earlier this week, an update for Media-Wiki fixed a bug in how it used caching headers [2]. The headers allowed authenticated content to...
Read more >Randomized Last-Level Caches Are Still Vulnerable to ... - arXiv
Abstract—Cache randomization has recently been revived as a promising defense against conflict-based cache side-channel attacks.
Read more >Web cache poisoning | Web Security Academy - PortSwigger
As a result, the impact can range from non-existent to massive depending on whether the page is popular or not. If an attacker...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ctavan I’d say that the main difference is that with one approach you can easily “flush” (i.e. wait for all externally triggered operations to complete), while there is no easy way of clearing the uuid cache (which you might not even know about).
I’m no expert by any means and hence posted on stackexchange here. Let’s see if we can get someone who is an expert!
Sounds good. We’ve since moved away from this library to
crypto.randomUUID
, sinceuuid
wasn’t working with our test library anymore after state aka caching of randomness was introduced. So I don’t really have a reason to persue this.OK to remain closed 👍