openssl/crypto/ec
Nicola Tuveri d47c108756 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)
2019-11-13 18:02:51 +02:00
..
asm Unify all assembler file generators 2019-09-16 16:29:57 +02:00
curve448 Fix header file include guard names 2019-09-28 20:26:36 +02:00
build.info s390x: fix build errors 2019-11-01 17:24:52 +01:00
curve25519.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec2_oct.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec2_smpl.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec_ameth.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
ec_asn1.c [ec_asn1.c] Avoid injecting seed when built-in matches 2019-10-15 15:06:02 +03:00
ec_check.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec_curve.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec_cvt.c Avoid using EC_GROUP_clear_free() internally 2019-10-23 00:49:46 +03:00
ec_err.c util/mkerr.pl: make it not depend on the function code 2019-09-12 17:59:52 +02:00
ec_key.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec_kmeth.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec_lib.c Update source files for deprecation at 3.0 2019-11-07 11:37:25 +01:00
ec_local.h Reorganize local header files 2019-09-28 20:26:35 +02:00
ec_mult.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec_oct.c Update source files for deprecation at 3.0 2019-11-07 11:37:25 +01:00
ec_pmeth.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ec_print.c Fix EC_POINT_bn2point() for BN_zero() 2019-11-13 18:02:51 +02:00
ecdh_kdf.c Update source files for deprecation at 3.0 2019-11-07 11:37:25 +01:00
ecdh_ossl.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecdsa_ossl.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecdsa_sign.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecdsa_vrf.c Reorganize local header files 2019-09-28 20:26:35 +02:00
eck_prn.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecp_mont.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_nist.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_nistp224.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_nistp256.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_nistp521.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_nistputil.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_nistz256_table.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecp_nistz256.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_oct.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_s390x_nistp.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecp_smpl.c Reorganize local header files 2019-09-28 20:26:35 +02:00
ecx_meth.c s390x assembly pack: process x25519 and x448 non-canonical values 2019-11-05 13:53:04 +01:00