3

Given this:

Unless you have a hardware random number generator, the bytes will be pseudo-random—generated predictably from a seed value. The seed is generated from an OS-specific source (/dev/urandom on Unix-like systems, CryptGenRandom on Windows).

Wondering how you enable the use of a hardware random number generator in Node.js.

Lance
  • 75,200
  • 93
  • 289
  • 503
  • To which OS and which CPUs are you referring to? For Windows 10 on Intel see: https://www.npmjs.com/package/drng for Ubuntu Linux 13.x, x64 on Intel you have: https://www.npmjs.com/package/rdrand. And there might be other relevant libs. – Nir Alfasi Nov 29 '17 at 01:30
  • Are you sure you understand what the answer is saying? Unless you have unusual requirements you don't need a hardware random number generator. – President James K. Polk Nov 29 '17 at 03:14
  • 1
    I guess you could use a library like [serialport](https://www.npmjs.com/package/serialport) to connect a hardware random number generator via serial port. – TGrif Nov 29 '17 at 08:44
  • I think the question is meant in another way. nodejs is implicitly using a RNG in it's cryptography module, e.g. for Crypto.createECDH('prime256v1').generateKeys(). The question is: is then RNG hardware used? If yes, how can this be proven in a software certification process? – Joerg Veigel Jul 17 '19 at 13:40

0 Answers0