7

I would like to deploy an application to heroku which needs to be able to generate cryptographically secure random numbers. What entropy sources can I use?

Tobias
  • 6,388
  • 4
  • 39
  • 64
  • 1
    Related question: when heroku boots up a new machine (presumably with some image) does its entropy pool get seeded with the same data? – Brian Armstrong Jul 25 '13 at 22:32

1 Answers1

3

Your Heroku dyno is basically an Ubuntu Server VM, so you should have access to /dev/random and /dev/urandom like you would on any other Linux-based OS.

If you're using Ruby/Rails, you should probably be using SecureRandom (or ActiveSupport::SecureRandom for older versions of Ruby and Rails) for this.

stevenh512
  • 545
  • 2
  • 8