RSAKeyPairGenerator.primeDistanceOk
Validates the distance between the two primes.
Implements the FIPS 186-5 guard against Fermat factorization: the primes must differ and their absolute difference must exceed 2^(bitLength/2 - 100), so the modulus cannot be split by searching near its square root.
Parameters
bitLength | The requested modulus length in bits. |
Returns
True when the pair is safe to use.