diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nist.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_nist.c | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nist.c b/src/lib/libcrypto/ec/ecp_nist.c index ac5b814238..479cff8fc9 100644 --- a/src/lib/libcrypto/ec/ecp_nist.c +++ b/src/lib/libcrypto/ec/ecp_nist.c | |||
@@ -67,49 +67,48 @@ | |||
67 | #include <openssl/obj_mac.h> | 67 | #include <openssl/obj_mac.h> |
68 | #include "ec_lcl.h" | 68 | #include "ec_lcl.h" |
69 | 69 | ||
70 | const EC_METHOD *EC_GFp_nist_method(void) | 70 | const EC_METHOD * |
71 | { | 71 | EC_GFp_nist_method(void) |
72 | { | ||
72 | static const EC_METHOD ret = { | 73 | static const EC_METHOD ret = { |
73 | EC_FLAGS_DEFAULT_OCT, | 74 | .flags = EC_FLAGS_DEFAULT_OCT, |
74 | NID_X9_62_prime_field, | 75 | .field_type = NID_X9_62_prime_field, |
75 | ec_GFp_simple_group_init, | 76 | .group_init = ec_GFp_simple_group_init, |
76 | ec_GFp_simple_group_finish, | 77 | .group_finish = ec_GFp_simple_group_finish, |
77 | ec_GFp_simple_group_clear_finish, | 78 | .group_clear_finish = ec_GFp_simple_group_clear_finish, |
78 | ec_GFp_nist_group_copy, | 79 | .group_copy = ec_GFp_nist_group_copy, |
79 | ec_GFp_nist_group_set_curve, | 80 | .group_set_curve = ec_GFp_nist_group_set_curve, |
80 | ec_GFp_simple_group_get_curve, | 81 | .group_get_curve = ec_GFp_simple_group_get_curve, |
81 | ec_GFp_simple_group_get_degree, | 82 | .group_get_degree = ec_GFp_simple_group_get_degree, |
82 | ec_GFp_simple_group_check_discriminant, | 83 | .group_check_discriminant = |
83 | ec_GFp_simple_point_init, | 84 | ec_GFp_simple_group_check_discriminant, |
84 | ec_GFp_simple_point_finish, | 85 | .point_init = ec_GFp_simple_point_init, |
85 | ec_GFp_simple_point_clear_finish, | 86 | .point_finish = ec_GFp_simple_point_finish, |
86 | ec_GFp_simple_point_copy, | 87 | .point_clear_finish = ec_GFp_simple_point_clear_finish, |
87 | ec_GFp_simple_point_set_to_infinity, | 88 | .point_copy = ec_GFp_simple_point_copy, |
88 | ec_GFp_simple_set_Jprojective_coordinates_GFp, | 89 | .point_set_to_infinity = ec_GFp_simple_point_set_to_infinity, |
89 | ec_GFp_simple_get_Jprojective_coordinates_GFp, | 90 | .point_set_Jprojective_coordinates_GFp = |
90 | ec_GFp_simple_point_set_affine_coordinates, | 91 | ec_GFp_simple_set_Jprojective_coordinates_GFp, |
91 | ec_GFp_simple_point_get_affine_coordinates, | 92 | .point_get_Jprojective_coordinates_GFp = |
92 | 0,0,0, | 93 | ec_GFp_simple_get_Jprojective_coordinates_GFp, |
93 | ec_GFp_simple_add, | 94 | .point_set_affine_coordinates = |
94 | ec_GFp_simple_dbl, | 95 | ec_GFp_simple_point_set_affine_coordinates, |
95 | ec_GFp_simple_invert, | 96 | .point_get_affine_coordinates = |
96 | ec_GFp_simple_is_at_infinity, | 97 | ec_GFp_simple_point_get_affine_coordinates, |
97 | ec_GFp_simple_is_on_curve, | 98 | .add = ec_GFp_simple_add, |
98 | ec_GFp_simple_cmp, | 99 | .dbl = ec_GFp_simple_dbl, |
99 | ec_GFp_simple_make_affine, | 100 | .invert = ec_GFp_simple_invert, |
100 | ec_GFp_simple_points_make_affine, | 101 | .is_at_infinity = ec_GFp_simple_is_at_infinity, |
101 | 0 /* mul */, | 102 | .is_on_curve = ec_GFp_simple_is_on_curve, |
102 | 0 /* precompute_mult */, | 103 | .point_cmp = ec_GFp_simple_cmp, |
103 | 0 /* have_precompute_mult */, | 104 | .make_affine = ec_GFp_simple_make_affine, |
104 | ec_GFp_nist_field_mul, | 105 | .points_make_affine = ec_GFp_simple_points_make_affine, |
105 | ec_GFp_nist_field_sqr, | 106 | .field_mul = ec_GFp_nist_field_mul, |
106 | 0 /* field_div */, | 107 | .field_sqr = ec_GFp_nist_field_sqr |
107 | 0 /* field_encode */, | 108 | }; |
108 | 0 /* field_decode */, | ||
109 | 0 /* field_set_to_one */ }; | ||
110 | 109 | ||
111 | return &ret; | 110 | return &ret; |
112 | } | 111 | } |
113 | 112 | ||
114 | int ec_GFp_nist_group_copy(EC_GROUP *dest, const EC_GROUP *src) | 113 | int ec_GFp_nist_group_copy(EC_GROUP *dest, const EC_GROUP *src) |
115 | { | 114 | { |