title: Cannot connect to SFP sever using key file with JSch and Java 8
body: <p>I am trying to connect to a SFTP server using a 2048 bit RSA key file. It works fine running against version 7r45 of the JRE using JSch but i get the follow exception when running against version 8r31 of the JRE.</p>
  
  <p><code>com.jcraft.jsch.JSchException: Session.connect: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 2048 (inclusive).</code></p>
  
  <p>It's not an issue with limited Java security policy as I have tried it with and without the unlimited strength jars for both versions of java.</p>
  
  <p>I have seen other references to this exception suggesting replacing the default java JCE provider with the BouncyCastle one, but why would there be a difference between java 7 and java 8? I did try this by running 
  <code>Security.addProvider(new BouncyCastleProvider());</code> at program start up but it doesn't seem to make any difference.</p>