#在new_curve = EC_GROUP_new_curve_GFp;下一行新增 #if !defined(OPENSSL_NO_EC2M) #在new_curve = EC_GROUP_new_curve_GF2m;下一行新增 #endif ---如下--- if (id == s_GFp) { new_curve = EC_GROUP_new_curve_GFp; #if !defined(OPENSSL_NO_EC2M) } else if (id == s_GF2m) { ne...
field = BN_CTX_get(ctx);if(!EC_GROUP_get_curve_GFp(group, field,NULL,NULL, ctx)) { ret=-2;gotoerr; }if(BN_cmp(x, field) >=0) { ret=0;gotoerr; }if((R = EC_POINT_new(group)) ==NULL) { ret =-2;gotoerr; }if(!EC_POINT_set_compressed_coordinates_GFp(group, R, x, ...
EC_GROUP* p256group = EC_GROUP_new_by_curve_name(NID_X9_62_prime256v1);if(!p256group) {fprintf(stderr,"error: EC_GROUP_new_by_curve_name() failed.\n");return4; } EC_POINT* point = EC_POINT_new(p256group);if(!point) {fprintf(stderr,"error: EC_POINT_new() failed.\n")...
49. if(NULL == (generator = EC_POINT_new(curve))) handleErrors(); 50. if(1 != EC_POINT_set_affine_coordinates_GFp(curve, generator, x, y, ctx)) 51. handleErrors(); 52. 53. /* Set the generator and the order */ 54. if(1 != EC_GROUP_set_generator(curve, generator, orde...
#define EC_F_EC_GROUP_NEW_FROM_DATA 175 #define EC_F_EC_GROUP_PRECOMPUTE_MULT 142 #define EC_F_EC_GROUP_SET_CURVE_GF2M 176 #define EC_F_EC_GROUP_SET_CURVE_GFP 109 #define EC_F_EC_GROUP_SET_EXTRA_DATA 110 #define EC_F_EC_GROUP_SET_GENERATOR 111 #define EC_F_EC_KEY_CHECK_KE...
EC_GROUP_new_by_curve_name() and EC_GROUP_new_from_ecparameters() are selecting different methods. I assume this is because EC_GROUP_new_from_ecparameters is using a method that has extra functions for loading. When ec_nistp_64_gcc_128 is enabled shouldnt it end up using the same meth...
EC_GROUP_cmp() behaviour Consider the following code snippet: int nid, rv; EC_GROUP *group1 = NULL, *group2 = NULL; ECPARAMETERS *ecparameters = NULL; BN_CTX *ctx = BN_CTX_new(); group1 = EC_GROUP_new_by_curve_name(nid); ecparameters = E...
int EC_GROUP_set_curve_GFp (EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) int EC_GROUP_get_curve_GFp (const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) int EC_GROUP_set_curve_GF2m (EC_GROUP *group, const BIGNUM *p,...
{ERR_FUNC(EC_F_EC_GFP_NIST_FIELD_SQR), "ec_GFp_nist_field_sqr"}, {ERR_FUNC(EC_F_EC_GFP_NIST_GROUP_SET_CURVE), "ec_GFp_nist_group_set_curve"}, {ERR_FUNC(EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT), "ec_GFp_simple_group_check_discriminant"}, {ERR_FUNC(EC_F_EC_GFP_SIMPLE...
if(curveName!=null){ returnOpenSSLECGroupContext.getCurveByName(curveName); } finalEllipticCurvecurve=params.getCurve(); finalECFieldfield=curve.getField(); finalinttype; finalBigIntegerp; if(fieldinstanceofECFieldFp){ type=NativeCrypto.EC_CURVE_GFP; ...