title: DBMS_RANDOM considered dangerous?
body: <p>Our database team wants to revoke execute on DBMS_RANDOM from PUBLIC to address security issues. If you google for it, some security experts consider the package dangerous, but fail to say why. Ingram and Shaul's book "Practical Oracle Security" states</p>
  
  <blockquote>
    <p>...granting PUBLIC access to DBMS_RANDOM in environments where the
    function is used in cryptographic key generation could lead to
    compromise of the encrypted data...</p>
  </blockquote>
  
  <p>The Oracle documentation says</p>
  
  <blockquote>
    <p>DBMS_RANDOM is not intended for cryptography.</p>
  </blockquote>
  
  <p>... and ...</p>
  
  <blockquote>
    <p>DBMS_CRYPTO.RANDOMBYTES ... returns a RAW value containing a
    cryptographically secure pseudo-random sequence of bytes, which can be
    used to generate random material for encryption keys.</p>
  </blockquote>
  
  <p>So, DMBS_RANDOM seems to be fine for generating pseudorandom numbers (as long as you don't fabricate passwords with it). Why on earth is this too dangerous for PUBLIC? </p>
  
  <p><strong>Edit</strong>:
  Just found a new <a href="https://www.stigviewer.com/stig/oracle_database_11g_instance/2016-06-15/finding/V-2539" rel="nofollow noreferrer">source</a>, which claims that </p>
  
  <blockquote>
    <p>DBMS_RANDOM: allows encrypting of data without requiring safe management of encryption keys.</p>
  </blockquote>
  
  <p>This is nonsense, too, isn't it?</p>