openssl/crypto/ec
Nicola Tuveri 6f6adf1d7b Fix EC_POINT_bn2point() for BN_zero()
EC_POINT_bn2point() rejected BIGNUMs with a zero value.

This behavior indirectly caused failures when converting a point
at infinity through EC_POINT_point2hex() and then back to a point with
EC_POINT_hex2point().

With this change such BIGNUMs are treated like any other and exported to
an octet buffer filled with zero.
It is then EC_POINT_oct2point() (either the default implementation or
the custom one in group->meth->oct2point) to determine if such encoding
maps to a valid point (generally the point at infinity is encoded as
0x00).

Fixes #10258

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10329)

(cherry picked from commit d47c10875656790d146f62ac3c437db54c58dbf7)
2019-11-13 18:11:50 +02:00
..
asm Update copyright year 2019-09-10 13:56:40 +01:00
curve448 Fix header file include guard names 2019-09-27 23:58:12 +02:00
build.info Add ec/asm/x25519-ppc64.pl module. 2018-07-26 14:01:49 +02:00
curve25519.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec2_oct.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec2_smpl.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_ameth.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_asn1.c [ec_asn1.c] Avoid injecting seed when built-in matches 2019-10-15 15:19:38 +03:00
ec_check.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_curve.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_cvt.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_err.c SCA hardening for mod. field inversion in EC_GROUP 2019-02-20 19:54:19 +02:00
ec_key.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_kmeth.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_lib.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_local.h Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_mult.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_oct.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_pmeth.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ec_print.c Fix EC_POINT_bn2point() for BN_zero() 2019-11-13 18:11:50 +02:00
ecdh_kdf.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecdh_ossl.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecdsa_ossl.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecdsa_sign.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecdsa_vrf.c Reorganize local header files 2019-09-27 23:58:06 +02:00
eck_prn.c Update copyright year 2018-09-11 13:45:17 +01:00
ecp_mont.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecp_nist.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecp_nistp224.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecp_nistp256.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecp_nistp521.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecp_nistputil.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecp_nistz256.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecp_nistz256_table.c
ecp_oct.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecp_smpl.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ecx_meth.c Reorganize local header files 2019-09-27 23:58:06 +02:00