Optimize the calculation of the private key.