Optimized EC_METHODs need specific 'set_curve' and 'free' functions.
[openssl.git] / crypto / ec / ecp_nist.c
index 0c319c6aedb0ec735dc028fd740e6d774b838960..94a232f74708571824d32a9ab14a171eaf863bf2 100644 (file)
 
 const EC_METHOD *EC_GFp_nist_method(void)
        {
-       static const EC_METHOD ret =
-               {
-                       0 /* XXX */
-               };
+       static const EC_METHOD ret = {
+               ec_GFp_simple_group_init,
+               ec_GFp_nist_group_set_curve_GFp,
+               ec_GFp_nist_group_finish,
+               ec_GFp_nist_group_clear_finish,
+               ec_GFp_simple_group_copy,
+               ec_GFp_simple_group_set_generator,
+               /* TODO: 'set' and 'get' functions for EC_GROUPs */
+               ec_GFp_simple_point_init,
+               ec_GFp_simple_point_finish,
+               ec_GFp_simple_point_clear_finish,
+               ec_GFp_simple_point_copy,
+               /* TODO: 'set' and 'get' functions for EC_POINTs */
+               ec_GFp_simple_point2oct,
+               ec_GFp_simple_oct2point,
+               ec_GFp_simple_add,
+               ec_GFp_simple_dbl,
+               ec_GFp_simple_is_at_infinity,
+               ec_GFp_simple_is_on_curve,
+               ec_GFp_simple_make_affine,
+               ec_GFp_nist_field_mult,
+               ec_GFp_nist_field_sqr,
+               ec_GFp_nist_field_encode,
+               ec_GFp_nist_field_decode };
 
        return &ret;
        }