question: private boolean resultsIdentical ( String namedCurve , BigInteger badX , BigInteger badY , BigInteger secret , int iter ) throws InvalidAlgorithmParameterException , NoSuchAlgorithmException , InvalidKeySpecException , InvalidKeyException { for ( int i = 0 ; i < iter ; i ++ ) { secret = secret . add ( BigInteger . ONE ) ; BigInteger resultCustom = computeSecretWithCustomAlgorithm ( namedCurve , badX , badY , secret ) ; BigInteger resultSun = computeSecretWithSunAlgorithm ( namedCurve , badX , badY , secret ) ; if ( resultSun != null && ! resultSun . equals ( resultCustom ) ) { return false ; } } return true ; }
target:  Executes point multiplication with custom and java sun computation. In case the results differ, returns false. In case Sun returns null, the result is not observed (sun returns null, by accident?)