Fix ecp_gen_keypair()

Too few tries caused failures for some curves (esp. secp224k1)
2 files changed