title: Does "isProbablePrime" really need to spend most time reading files?
body: <p>I've just solved <a href="http://projecteuler.net/problem=60" rel="nofollow">the Project Euler Problem 60</a>, but my program is still a bit too slow. I've found out that most of the time gets spend in reading from a file...</p>
  
  <p>It looks like <code>BigInteger.isProbablePrime</code> uses <code>SecureRandom</code> which reads from a Linux device all the time. My questions are:</p>
  
  <ul>
  <li>Is it really necessary to use <code>SecureRandom</code>?</li>
  <li>Does <code>/dev/random</code> or <code>/dev/urandom</code> get used?</li>
  <li>Is reading them from the OS really the best way for generating good random numbers?</li>
  </ul>
  
  <p>AFAIK, java used to get a few bytes from the OS which were used as a seed of an SHA1-based PRNG, which should IMHO be faster.</p>