... yet it seems you are free to use it as you please (like the rest of the library does) internally, so it depends on what you are doing. (Modifying the library or creating an application -- since you posted code snippets I assumed the former, Matt points out the proper way externally.)
BBB On Fri, Dec 20, 2013 at 12:44 AM, Matt Caswell <fr...@baggins.org> wrote: > On 19 December 2013 18:52, Billy Brumley <bbrum...@gmail.com> wrote: >> It's in the EC_GROUP structure: group->field. Check crypto/ec/ec_lcl.h. BBB >> > > Anything in the *lcl.h header files does not form part of the public > API and you shouldn't really rely on it as it may change. > > Better is to use: > int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM > *a, BIGNUM *b, BN_CTX *ctx); > > or > > int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM > *a, BIGNUM *b, BN_CTX *ctx); > > as appropriate dependent on the type of curve that you have. > > >> On Thu, Dec 19, 2013 at 9:54 AM, Patrick McCorry <stonecold...@gmail.com> >> wrote: >>>>>> From what I can see in the implementation (ecs_ossl.c) when using >>>>> ecdsa_sign_setup - the 'q' field size is never used! >>>>> >>>>> /* >>>>> * Does the multiplciation of G (generator) * k to produce curve point >>>>> (x,y) >>>>> */ >>>>> EC_POINT_mul(group, temp_point, k, NULL, NULL, ctx) >>>>> > > What you call 'q' (called 'p' within openssl) is used in this > operation. It is a parameter of the group and is required to do the > point multiplication. > > > Matt > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org