diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec2_smpl.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ec2_smpl.c | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/src/lib/libcrypto/ec/ec2_smpl.c b/src/lib/libcrypto/ec/ec2_smpl.c index 0cf681fa9d..5682bfab37 100644 --- a/src/lib/libcrypto/ec/ec2_smpl.c +++ b/src/lib/libcrypto/ec/ec2_smpl.c | |||
| @@ -73,52 +73,51 @@ | |||
| 73 | 73 | ||
| 74 | #ifndef OPENSSL_NO_EC2M | 74 | #ifndef OPENSSL_NO_EC2M |
| 75 | 75 | ||
| 76 | const EC_METHOD *EC_GF2m_simple_method(void) | 76 | const EC_METHOD * |
| 77 | { | 77 | EC_GF2m_simple_method(void) |
| 78 | { | ||
| 78 | static const EC_METHOD ret = { | 79 | static const EC_METHOD ret = { |
| 79 | EC_FLAGS_DEFAULT_OCT, | 80 | .flags = EC_FLAGS_DEFAULT_OCT, |
| 80 | NID_X9_62_characteristic_two_field, | 81 | .field_type = NID_X9_62_characteristic_two_field, |
| 81 | ec_GF2m_simple_group_init, | 82 | .group_init = ec_GF2m_simple_group_init, |
| 82 | ec_GF2m_simple_group_finish, | 83 | .group_finish = ec_GF2m_simple_group_finish, |
| 83 | ec_GF2m_simple_group_clear_finish, | 84 | .group_clear_finish = ec_GF2m_simple_group_clear_finish, |
| 84 | ec_GF2m_simple_group_copy, | 85 | .group_copy = ec_GF2m_simple_group_copy, |
| 85 | ec_GF2m_simple_group_set_curve, | 86 | .group_set_curve = ec_GF2m_simple_group_set_curve, |
| 86 | ec_GF2m_simple_group_get_curve, | 87 | .group_get_curve = ec_GF2m_simple_group_get_curve, |
| 87 | ec_GF2m_simple_group_get_degree, | 88 | .group_get_degree = ec_GF2m_simple_group_get_degree, |
| 88 | ec_GF2m_simple_group_check_discriminant, | 89 | .group_check_discriminant = |
| 89 | ec_GF2m_simple_point_init, | 90 | ec_GF2m_simple_group_check_discriminant, |
| 90 | ec_GF2m_simple_point_finish, | 91 | .point_init = ec_GF2m_simple_point_init, |
| 91 | ec_GF2m_simple_point_clear_finish, | 92 | .point_finish = ec_GF2m_simple_point_finish, |
| 92 | ec_GF2m_simple_point_copy, | 93 | .point_clear_finish = ec_GF2m_simple_point_clear_finish, |
| 93 | ec_GF2m_simple_point_set_to_infinity, | 94 | .point_copy = ec_GF2m_simple_point_copy, |
| 94 | 0 /* set_Jprojective_coordinates_GFp */, | 95 | .point_set_to_infinity = ec_GF2m_simple_point_set_to_infinity, |
| 95 | 0 /* get_Jprojective_coordinates_GFp */, | 96 | .point_set_affine_coordinates = |
| 96 | ec_GF2m_simple_point_set_affine_coordinates, | 97 | ec_GF2m_simple_point_set_affine_coordinates, |
| 97 | ec_GF2m_simple_point_get_affine_coordinates, | 98 | .point_get_affine_coordinates = |
| 98 | 0,0,0, | 99 | ec_GF2m_simple_point_get_affine_coordinates, |
| 99 | ec_GF2m_simple_add, | 100 | .add = ec_GF2m_simple_add, |
| 100 | ec_GF2m_simple_dbl, | 101 | .dbl = ec_GF2m_simple_dbl, |
| 101 | ec_GF2m_simple_invert, | 102 | .invert = ec_GF2m_simple_invert, |
| 102 | ec_GF2m_simple_is_at_infinity, | 103 | .is_at_infinity = ec_GF2m_simple_is_at_infinity, |
| 103 | ec_GF2m_simple_is_on_curve, | 104 | .is_on_curve = ec_GF2m_simple_is_on_curve, |
| 104 | ec_GF2m_simple_cmp, | 105 | .point_cmp = ec_GF2m_simple_cmp, |
| 105 | ec_GF2m_simple_make_affine, | 106 | .make_affine = ec_GF2m_simple_make_affine, |
| 106 | ec_GF2m_simple_points_make_affine, | 107 | .points_make_affine = ec_GF2m_simple_points_make_affine, |
| 107 | 108 | ||
| 108 | /* the following three method functions are defined in ec2_mult.c */ | 109 | /* the following three method functions are defined in ec2_mult.c */ |
| 109 | ec_GF2m_simple_mul, | 110 | .mul = ec_GF2m_simple_mul, |
| 110 | ec_GF2m_precompute_mult, | 111 | .precompute_mult = ec_GF2m_precompute_mult, |
| 111 | ec_GF2m_have_precompute_mult, | 112 | .have_precompute_mult = ec_GF2m_have_precompute_mult, |
| 112 | 113 | ||
| 113 | ec_GF2m_simple_field_mul, | 114 | .field_mul = ec_GF2m_simple_field_mul, |
| 114 | ec_GF2m_simple_field_sqr, | 115 | .field_sqr = ec_GF2m_simple_field_sqr, |
| 115 | ec_GF2m_simple_field_div, | 116 | .field_div = ec_GF2m_simple_field_div, |
| 116 | 0 /* field_encode */, | 117 | }; |
| 117 | 0 /* field_decode */, | ||
| 118 | 0 /* field_set_to_one */ }; | ||
| 119 | 118 | ||
| 120 | return &ret; | 119 | return &ret; |
| 121 | } | 120 | } |
| 122 | 121 | ||
| 123 | 122 | ||
| 124 | /* Initialize a GF(2^m)-based EC_GROUP structure. | 123 | /* Initialize a GF(2^m)-based EC_GROUP structure. |
