Koblitz Curve Support

Cherry picked from vbuterin.
Thanks!