01ad66f85d
By default `ec_scalar_mul_ladder` (which uses the Lopez-Dahab ladder implementation) is used only for (k * Generator) or (k * VariablePoint). ECDSA verification uses (a * Generator + b * VariablePoint): this commit forces the use of `ec_scalar_mul_ladder` also for the ECDSA verification path, while using the default wNAF implementation for any other case. With this commit `ec_scalar_mul_ladder` loses the static attribute, and is added to ec_lcl.h so EC_METHODs can directly use it. While working on a new custom EC_POINTs_mul implementation, I realized that many checks (e.g. all the points being compatible with the given EC_GROUP, creating a temporary BN_CTX if `ctx == NULL`, check for the corner case `scalar == NULL && num == 0`) were duplicated again and again in every single implementation (and actually some implementations lacked some of the tests). I thought that it makes way more sense for those checks that are independent from the actual implementation and should always be done, to be moved in the EC_POINTs_mul wrapper: so this commit also includes these changes. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6690) |
||
---|---|---|
.. | ||
asm | ||
curve448 | ||
build.info | ||
curve25519.c | ||
ec2_oct.c | ||
ec2_smpl.c | ||
ec_ameth.c | ||
ec_asn1.c | ||
ec_check.c | ||
ec_curve.c | ||
ec_cvt.c | ||
ec_err.c | ||
ec_key.c | ||
ec_kmeth.c | ||
ec_lcl.h | ||
ec_lib.c | ||
ec_mult.c | ||
ec_oct.c | ||
ec_pmeth.c | ||
ec_print.c | ||
ecdh_kdf.c | ||
ecdh_ossl.c | ||
ecdsa_ossl.c | ||
ecdsa_sign.c | ||
ecdsa_vrf.c | ||
eck_prn.c | ||
ecp_mont.c | ||
ecp_nist.c | ||
ecp_nistp224.c | ||
ecp_nistp256.c | ||
ecp_nistp521.c | ||
ecp_nistputil.c | ||
ecp_nistz256.c | ||
ecp_nistz256_table.c | ||
ecp_oct.c | ||
ecp_smpl.c | ||
ecx_meth.c |