openssl/crypto/ec
Nicola Tuveri ac8881e160 [ec_asn1.c] Avoid injecting seed when built-in matches
An unintended consequence of https://github.com/openssl/openssl/pull/9808
is that when an explicit parameters curve is matched against one of the
well-known builtin curves we automatically inherit also the associated
seed parameter, even if the input parameters excluded such
parameter.

This later affects the serialization of such parsed keys, causing their
input DER encoding and output DER encoding to differ due to the
additional optional field.

This does not cause problems internally but could affect external
applications, as reported in
https://github.com/openssl/openssl/pull/9811#issuecomment-536153288

This commit fixes the issue by conditionally clearing the seed field if
the original input parameters did not include it.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10140)

(cherry picked from commit f97a8af2f3f3573f0759693117c9d33d2a63c27e)
2019-10-15 15:19:38 +03: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 Reorganize local header files 2019-09-27 23:58:06 +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