diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-02-14 16:52:12 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-02-14 16:52:12 +0000 |
commit | 84b08eee4b37c6594e43568f637d3aacbfd6105a (patch) | |
tree | 9b1a6b901e906516f2a1378e154575f21591d1bf /crypto/ec/ecp_mont.c | |
parent | bf2546f94762f6579ff40f71d6f333adbf72ffc4 (diff) |
Reorganise ECC code for inclusion in FIPS module.
Move compression, point2oct and oct2point functions into separate files.
Add a flags field to EC_METHOD.
Add a flag EC_FLAGS_DEFAULT_OCT to use the default compession and oct
functions (all existing methods do this). This removes dependencies from
EC_METHOD while keeping original functionality.
Diffstat (limited to 'crypto/ec/ecp_mont.c')
-rw-r--r-- | crypto/ec/ecp_mont.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/ec/ecp_mont.c b/crypto/ec/ecp_mont.c index 9fc4a466a5..232ae34e2a 100644 --- a/crypto/ec/ecp_mont.c +++ b/crypto/ec/ecp_mont.c @@ -61,6 +61,8 @@ * and contributed to the OpenSSL project. */ +#define OPENSSL_FIPSAPI + #include <openssl/err.h> #include "ec_lcl.h" @@ -69,6 +71,7 @@ const EC_METHOD *EC_GFp_mont_method(void) { static const EC_METHOD ret = { + EC_FLAGS_DEFAULT_OCT, NID_X9_62_prime_field, ec_GFp_mont_group_init, ec_GFp_mont_group_finish, @@ -87,9 +90,7 @@ const EC_METHOD *EC_GFp_mont_method(void) ec_GFp_simple_get_Jprojective_coordinates_GFp, ec_GFp_simple_point_set_affine_coordinates, ec_GFp_simple_point_get_affine_coordinates, - ec_GFp_simple_set_compressed_coordinates, - ec_GFp_simple_point2oct, - ec_GFp_simple_oct2point, + 0,0,0, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, |