title: Which padding is used by javax.crypto.Cipher for RSA
body: <p>I need to decrypt messages via RSA in order to send it over an unsecured channel, but I'm afraid of the <a href="https://en.wikipedia.org/wiki/Padding_oracle_attack" rel="noreferrer">Padding Oracle Attack</a>. Therefore I already have asked the follwoing questions:</p>
  
  <ol>
  <li><a href="https://crypto.stackexchange.com/q/27510/8325">How to verify the integrity of RSA encrypted messages?</a></li>
  <li><a href="https://security.stackexchange.com/q/96943/29820">How to ensure message integrity for RSA ciphers by using javax.crypto.Cipher</a></li>
  </ol>
  
  <p>Like suggested in the first question, </p>
  
  <blockquote>
    <p>However, since you are using a high level cryptographic library, this is something you shouldn't have to worry about. The writers of that library should have taken care of it.</p>
  </blockquote>
  
  <p>I shouldn't consider about. As far I know, the RSA implementation of <code>PKCS#1 v1.5</code> is vulnerable to the <code>Padding Oracale Attack</code> whereby <a href="https://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding" rel="noreferrer">OAEP</a> isn't (assumed it's implemented correctly)</p>
  
  <p>Hence I want to know which padding implementation is used by <code>javax.crypt.Cipher</code> by Java 7</p>