openssl/crypto/ec
Nicola Tuveri 01ad66f85d EC2M Lopez-Dahab ladder: use it also for ECDSA verify
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)
2018-07-16 10:17:40 +01:00
..
asm ec/asm/x25519-x86_64.pl: add CFI directives and Windows SE handler. 2018-07-15 19:05:57 +02:00
curve448 Remove some logically dead code 2018-05-31 10:38:51 +01:00
build.info ECC: unify generic ec2 and ecp scalar multiplication, deprecate ec2_mult.c 2018-05-09 13:30:38 +02:00
curve25519.c ec/curve25519.c: reorganize for better accessibility. 2018-07-15 19:06:06 +02:00
ec2_oct.c Modify Sun copyright to follow OpenSSL style 2017-06-20 11:13:45 -04:00
ec2_smpl.c EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ec_ameth.c Update copyright year 2018-06-20 15:29:23 +01:00
ec_asn1.c ECDSA_SIG: add simple getters for commonly used struct members 2018-05-28 19:11:23 +02:00
ec_check.c
ec_curve.c Improve compatibility of point and curve checks 2018-05-24 17:17:44 +01:00
ec_cvt.c Modify Sun copyright to follow OpenSSL style 2017-06-20 11:13:45 -04:00
ec_err.c EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ec_key.c Update copyright year 2018-04-17 15:18:40 +02:00
ec_kmeth.c Fix const correctness of EC_KEY_METHOD_get_* 2017-07-23 11:34:11 +02:00
ec_lcl.h EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ec_lib.c EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ec_mult.c EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ec_oct.c Improve compatibility of point and curve checks 2018-05-24 17:17:44 +01:00
ec_pmeth.c ec/ec_pmeth.c: minor cleanups and readability fixes. 2018-06-25 16:42:43 +02:00
ec_print.c Update copyright year 2018-04-17 15:18:40 +02:00
ecdh_kdf.c
ecdh_ossl.c Update copyright year 2018-04-03 13:57:12 +01:00
ecdsa_ossl.c ecdsa_ossl: address coverity nit 2018-06-22 11:54:30 -05:00
ecdsa_sign.c
ecdsa_vrf.c
eck_prn.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
ecp_mont.c EC point multiplication: add ladder scaffold 2018-07-16 10:17:40 +01:00
ecp_nist.c EC point multiplication: add ladder scaffold 2018-07-16 10:17:40 +01:00
ecp_nistp224.c EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ecp_nistp256.c EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ecp_nistp521.c EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ecp_nistputil.c
ecp_nistz256.c EC2M Lopez-Dahab ladder: use it also for ECDSA verify 2018-07-16 10:17:40 +01:00
ecp_nistz256_table.c
ecp_oct.c Many spelling fixes/typo's corrected. 2017-11-11 19:03:10 -05:00
ecp_smpl.c EC point multiplication: add ladder scaffold 2018-07-16 10:17:40 +01:00
ecx_meth.c Add support getting raw private/public keys 2018-06-08 10:04:09 +01:00