Two weeks ago I was trying to solve this exact problem with the wrong approach they describe in the beginning... see here: https://github.com/mariusAsa/NistEllipticCurvesBounty