diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_mont.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ecp_mont.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/libcrypto/ec/ecp_mont.c b/src/lib/libcrypto/ec/ecp_mont.c index 079e47431b..9fc4a466a5 100644 --- a/src/lib/libcrypto/ec/ecp_mont.c +++ b/src/lib/libcrypto/ec/ecp_mont.c | |||
| @@ -63,20 +63,12 @@ | |||
| 63 | 63 | ||
| 64 | #include <openssl/err.h> | 64 | #include <openssl/err.h> |
| 65 | 65 | ||
| 66 | #ifdef OPENSSL_FIPS | ||
| 67 | #include <openssl/fips.h> | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #include "ec_lcl.h" | 66 | #include "ec_lcl.h" |
| 71 | 67 | ||
| 72 | 68 | ||
| 73 | const EC_METHOD *EC_GFp_mont_method(void) | 69 | const EC_METHOD *EC_GFp_mont_method(void) |
| 74 | { | 70 | { |
| 75 | #ifdef OPENSSL_FIPS | ||
| 76 | return fips_ec_gfp_mont_method(); | ||
| 77 | #else | ||
| 78 | static const EC_METHOD ret = { | 71 | static const EC_METHOD ret = { |
| 79 | EC_FLAGS_DEFAULT_OCT, | ||
| 80 | NID_X9_62_prime_field, | 72 | NID_X9_62_prime_field, |
| 81 | ec_GFp_mont_group_init, | 73 | ec_GFp_mont_group_init, |
| 82 | ec_GFp_mont_group_finish, | 74 | ec_GFp_mont_group_finish, |
| @@ -95,7 +87,9 @@ const EC_METHOD *EC_GFp_mont_method(void) | |||
| 95 | ec_GFp_simple_get_Jprojective_coordinates_GFp, | 87 | ec_GFp_simple_get_Jprojective_coordinates_GFp, |
| 96 | ec_GFp_simple_point_set_affine_coordinates, | 88 | ec_GFp_simple_point_set_affine_coordinates, |
| 97 | ec_GFp_simple_point_get_affine_coordinates, | 89 | ec_GFp_simple_point_get_affine_coordinates, |
| 98 | 0,0,0, | 90 | ec_GFp_simple_set_compressed_coordinates, |
| 91 | ec_GFp_simple_point2oct, | ||
| 92 | ec_GFp_simple_oct2point, | ||
| 99 | ec_GFp_simple_add, | 93 | ec_GFp_simple_add, |
| 100 | ec_GFp_simple_dbl, | 94 | ec_GFp_simple_dbl, |
| 101 | ec_GFp_simple_invert, | 95 | ec_GFp_simple_invert, |
| @@ -114,9 +108,7 @@ const EC_METHOD *EC_GFp_mont_method(void) | |||
| 114 | ec_GFp_mont_field_decode, | 108 | ec_GFp_mont_field_decode, |
| 115 | ec_GFp_mont_field_set_to_one }; | 109 | ec_GFp_mont_field_set_to_one }; |
| 116 | 110 | ||
| 117 | |||
| 118 | return &ret; | 111 | return &ret; |
| 119 | #endif | ||
| 120 | } | 112 | } |
| 121 | 113 | ||
| 122 | 114 | ||
