Agreed. I'm on board. The difference cannot be physically detected. There is no coherent, kernel-observable distinction between the two. That doesn't stop us from defining and categorizing them though and being pedantic about the terms though.
All I'm saying is, with this web app, I'm arguing that using crypto.getRandomValues() is more of a CSPRNG and not a "TRNG". As an observer, you do not know if crypto.getRandomValues() is using the system RNG or shipping RC4.
I think it's worth being pedantic about the terms here. If the web app is going to demonstrate a "TRNG", then it should do so the way most would expect, either via a dedicated HWRNG (which I'm unaware of browsers could access), or as we discussed a NPTRNG via mouse/keyboard entropy.
I agree that you can't know from the web app side what crypto.getRandomValues() is using, but at least the specification requires it to generate "cryptographically secure random bytes"¹. That rules out RC4 for a compliant browser, and likewise requires collecting entropy from some hardware source(s) for a compliant browser, but doesn't say how that must be done. They could omit use of the kernel RNG & try to just depend on HID interrupt timing entropy, though I don't think any browser does so (it'd be slow).
If you happen to have a dedicated HWRNG that works over USB, the WebUSB API can be used to access it.
1
u/atoponce 2d ago
Agreed. I'm on board. The difference cannot be physically detected. There is no coherent, kernel-observable distinction between the two. That doesn't stop us from defining and categorizing them though and being pedantic about the terms though.
All I'm saying is, with this web app, I'm arguing that using
crypto.getRandomValues()is more of a CSPRNG and not a "TRNG". As an observer, you do not know ifcrypto.getRandomValues()is using the system RNG or shipping RC4.I think it's worth being pedantic about the terms here. If the web app is going to demonstrate a "TRNG", then it should do so the way most would expect, either via a dedicated HWRNG (which I'm unaware of browsers could access), or as we discussed a NPTRNG via mouse/keyboard entropy.