You can use &quot;truly&quot; random numbers for cryptography. &#x2F;dev&#x2F;random is not recommended (except for perhaps long-term keys if you&#x27;re worried about the randomness algorithms having a vulnerability), use &#x2F;dev&#x2F;urandom.