GoAnywhere is dependent upon the ability of the Security Provider used to generate DH keypairs during the key exchange. Depending upon the key exchange algorithm used, the server MAY require a key size larger than the default Java Security Provider can support.
The solution is one of the following:
Disable the key exchange algorithm that is negotiating a key size larger than the supported max (version 5.2.4 or higher required)
Implement the BouncyCastle workaround (see below) to use the BC provider for DH key pair generation, which supports up to 8192 bit key sizes (version 5.2.4 or higher required)
Enable FIPS mode, which supports up to 8192 bit key sizes (any version of GoAnywhere) - This version has the most potential negative impact because it implements the JSafeJCE provider in a way that affects all encryption
Diffie-Hellman Key Exchange Algorithms
DH Key Exchange Algorithm
DH Key Size
diffie-hellman-group-exchange-sha1 Negotiated between 1024 and 8192
diffie-hellman-group-exchange-sha256 Negotiated between 1024 and 8192
Security Provider Max DH Key Sizes
Max DH Key Size
Default SunJCE (Oracle Java 1.7) 1024
Default SunJCE (Oracle Java 1.8) 2048
JSafeJCE (FIPS certified provider) 8192
BouncyCastle Workaround ***Version GAMFT 5.2.4 or higher Required***
Add the following line to the [INSTALL_DIR]/config/system.properties and restart (stop then start) GoAnywhere MFT.
NOTE: Java may fix this issue in a future version and this will not be needed anymore. The work around is using Bounce Castle instead of Sun JCE. Bounce Castle can create keys up to size 8192. This fixes the Client side since Server side was already using BC as the default.
NOTE: on Version 5.4.3 we got the following error