java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 2048 (inclusive)

GitHub | fd0 | 9 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug tip
    You're either not using a valid size or you're out the boundaries. If you really must use a number bigger than 1024 please consider using BouncyCastle, as the JDK SSL only supports up to 1024
  2. 0

    Error on Debian with Java 8: "Could not generate DH keypair"

    GitHub | 9 months ago | fd0
    java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 2048 (inclusive)
  3. 0

    Grinder - User - Testing a TLS server with > 1024-bit DH params causes java.security.InvalidAlgorithmParameterException

    nabble.com | 7 months ago
    java.security.InvalidAlgorithmParameterException: Prime > size must be multiple of 64, and can only range from 512 to 1024 > (inclusive)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How can I fetch an SSL page using Diffie-Hellman with a 480-bit key length?

    Stack Overflow | 1 year ago | Mridang Agarwalla
    javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair

    9 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.security.InvalidAlgorithmParameterException

      Prime size must be multiple of 64, and can only range from 512 to 2048 (inclusive)

      at com.sun.crypto.provider.DHKeyPairGenerator.initialize()
    2. com.sun.crypto
      DHKeyPairGenerator.initialize
      1. com.sun.crypto.provider.DHKeyPairGenerator.initialize(DHKeyPairGenerator.java:120)
      1 frame
    3. Java RT
      KeyPairGenerator$Delegate.initialize
      1. java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:674)
      1 frame
    4. Java JSSE
      DHCrypt.<init>
      1. sun.security.ssl.DHCrypt.<init>(DHCrypt.java:128)
      1 frame