How trustworthy is javascript's random implementation in various browsers?

后端 未结 5 1006
闹比i
闹比i 2020-12-03 11:00

I would like to do some experimenting with javascript and encryption and I got curious as to how unpredictable the implementation of the random function is. Has anyone done

5条回答
  •  旧巷少年郎
    2020-12-03 11:10

    Generally you can't rely on pseudo random number generation in javascript to be even remotely cryptographically secure. You might consider implementing your own PNRG using an entropy gathering system, or perhaps using an external source of random numbers such as hotbits.

提交回复
热议问题