title: openssl RSA_public_encrypt() returned size always = RSA_size(rsa)?
body: <p><code>RSA_size(rsa)</code> returns modulus which equals to 256 in my application.
  and I am encrypting the data with <code>RSA_PKCS1_OAEP_PADDING</code> option, so the max length of the input buffer sent to <code>RSA_public_encrypt()</code> is 256 - 41 = 215</p>
  
  <p>In some case, the length of my input buffer may exceeds the 215 limitation a bit, and I need call <code>RSA_public_encrypt()</code> multitimes.</p>
  
  <p>My question is about the return value of <code>RSA_public_encrypt()</code>.</p>
  
  <p>From my test the return value is 256 (equals to <code>RSA_size(rsa)</code> ), 
  and the <a href="http://www.openssl.org/docs/crypto/RSA_public_encrypt.html" rel="nofollow">doc</a> also says:</p>
  
  <blockquote>
    <p>RSA_public_encrypt() returns the size of the encrypted data (i.e.,
    RSA_size(rsa)).</p>
  </blockquote>
  
  <p>I just want to make sure that there will only be two possibilities for the return value of  <code>RSA_public_encrypt()</code>.</p>
  
  <p><strong>-1 (error)</strong> or <strong>modulus(success)</strong>,  and there is no other possiblity, yes?
  I am curious because I need dividing the encrypted buffer and call <code>RSA_private_decrypt()</code> for each of the block. If the encrypted buffer of each <code>RSA_public_encrypt</code> is the same, then I don't need store the size for each of them.</p>