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