title: Fixing the IV for JCE RSA Encryption
body: <p>I'm trying to pass an RSA Key generated in JS to encrypt something in Java. We're passing the exponent and the modulus and then generating a key from that.</p>
  
  <p>However when encrypting in JCE, two ciphertexts are never the same because the initialization creates a random IV, as directed.</p>
  
  <p>Is there some way to fix the IV for initiliazation so the Javascript can pass it to the Java server? The documentation for the JCE gives me nothing.</p>
  
  <p>Thanks in advance, its much appreciated.</p>
  
  <p>EDIT: its come to my attention that the IV is used for the padding. I'm using PKCS1 padding, if that changes anything.</p>
  
  <p>EDIT: I've done some more reading, and apparently the difference between the ciphertexts is due to the padding. While I appreciate that this is working as directed, I need the client to be able to decrypt the encrypted text. If I pass it the ciphertext encrypted with the public key, will the client be able to decrypt it even without knowing anything about the padding, even if its a different library and language doing the decrypting?</p>