openssl/crypto
David Benjamin dc55e4f70f Fix a bug in ecp_nistp224.c.
felem_neg does not produce an output within the tight bounds suitable
for felem_contract. This affects build configurations which set
enable-ec_nistp_64_gcc_128.

point_double and point_add, in the non-z*_is_zero cases, tolerate and
fix up the wider bounds, so this only affects point_add calls where the
other point is infinity. Thus it only affects the final addition in
arbitrary-point multiplication, giving the wrong y-coordinate. This is a
no-op for ECDH and ECDSA, which only use the x-coordinate of
arbitrary-point operations.

Note: ecp_nistp521.c has the same issue in that the documented
preconditions are violated by the test case. I have not addressed this
in this PR. ecp_nistp521.c does not immediately produce the wrong
answer; felem_contract there appears to be a bit more tolerant than its
documented preconditions. However, I haven't checked the point_add
property above holds. ecp_nistp521.c should either get this same fix, to
be conservative, or have the bounds analysis and comments reworked for
the wider bounds.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5779)
2018-04-03 16:09:20 -04:00
..
aes Update copyright year 2018-03-20 13:08:46 +00:00
aria
asn1 Set error code on alloc failures 2018-04-03 11:31:16 -04:00
async Set error code on alloc failures 2018-04-03 11:31:16 -04:00
bf
bio Set error code on alloc failures 2018-04-03 11:31:16 -04:00
blake2
bn Set error code on alloc failures 2018-04-03 11:31:16 -04:00
buffer Update copyright year 2018-04-03 13:57:12 +01:00
camellia
cast
chacha
cmac
cms Set error code on alloc failures 2018-04-03 11:31:16 -04:00
comp Update copyright year 2018-04-03 13:57:12 +01:00
conf Set error code on alloc failures 2018-04-03 11:31:16 -04:00
ct
des Update copyright year 2018-04-03 13:57:12 +01:00
dh Set error code on alloc failures 2018-04-03 11:31:16 -04:00
dsa Update copyright year 2018-04-03 13:57:12 +01:00
dso Add dladdr() for AIX 2018-03-20 21:33:50 -04:00
ec Fix a bug in ecp_nistp224.c. 2018-04-03 16:09:20 -04:00
engine Set error code on alloc failures 2018-04-03 11:31:16 -04:00
err VMS: stricter acquisition of entropy for the pool 2018-04-03 18:24:41 +02:00
evp Set error code on alloc failures 2018-04-03 11:31:16 -04:00
hmac Update copyright year 2018-03-20 13:08:46 +00:00
idea
include/internal Update copyright year 2018-04-03 13:57:12 +01:00
kdf Set error code on alloc failures 2018-04-03 11:31:16 -04:00
lhash
md2
md4
md5
mdc2
modes
objects Set error code on alloc failures 2018-04-03 11:31:16 -04:00
ocsp
pem Set error code on alloc failures 2018-04-03 11:31:16 -04:00
perlasm
pkcs7 Update copyright year 2018-03-20 13:08:46 +00:00
pkcs12
poly1305 Update copyright year 2018-03-20 13:08:46 +00:00
rand VMS: stricter acquisition of entropy for the pool 2018-04-03 18:24:41 +02:00
rc2
rc4 Update copyright year 2018-03-20 13:08:46 +00:00
rc5
ripemd
rsa Set error code on alloc failures 2018-04-03 11:31:16 -04:00
seed
sha Update copyright year 2018-03-20 13:08:46 +00:00
siphash Update copyright year 2018-03-20 13:08:46 +00:00
sm2 Update copyright year 2018-03-20 13:08:46 +00:00
sm3
sm4
srp Set error code on alloc failures 2018-04-03 11:31:16 -04:00
stack Set error code on alloc failures 2018-04-03 11:31:16 -04:00
store store/loader_file.c: rename variables causing conflicts with Android NDK. 2018-03-13 19:31:44 +01:00
ts o_time.c: use gmtime_s with MSVC 2018-03-27 20:12:34 +02:00
txt_db Update copyright year 2018-04-03 13:57:12 +01:00
ui Set error code on alloc failures 2018-04-03 11:31:16 -04:00
whrlpool
x509 Update copyright year 2018-04-03 13:57:12 +01:00
x509v3
alphacpuid.pl
arm64cpuid.pl
arm_arch.h
armcap.c crypto/armcap.c: mask SHA512 hardware detection on iOS. 2018-03-06 23:18:24 +01:00
armv4cpuid.pl
build.info Remove import/use of File::Spec::Function 2018-04-01 22:41:04 +02:00
c64xpluscpuid.pl
cpt_err.c Set error code on alloc failures 2018-04-03 11:31:16 -04:00
cryptlib.c Enabled OneCore Conf for Console Apps (removed nonUniversal API) 2018-04-03 18:39:22 +02:00
ctype.c
cversion.c
dllmain.c
ebcdic.c
ex_data.c
ia64cpuid.S
init.c Set error code on alloc failures 2018-04-03 11:31:16 -04:00
LPdir_nyi.c
LPdir_unix.c Adjust LPdir_unix.c on VMS for OpenSSL expectations 2018-03-12 23:01:02 +01:00
LPdir_vms.c
LPdir_win32.c
LPdir_win.c
LPdir_wince.c
mem_clr.c
mem_dbg.c
mem_sec.c mem_sec.c: portability fixup. 2018-03-12 11:03:17 +01:00
mem.c Avoid unconditional store in CRYPTO_malloc. 2018-03-06 13:21:49 -05:00
mips_arch.h
o_dir.c
o_fips.c
o_fopen.c Set error code on alloc failures 2018-04-03 11:31:16 -04:00
o_init.c
o_str.c
o_time.c Update copyright year 2018-04-03 13:57:12 +01:00
pariscid.pl Update copyright year 2018-04-03 13:57:12 +01:00
ppc_arch.h
ppccap.c
ppccpuid.pl
s390x_arch.h s390x assembly pack: add KMF code path for aes-cfb/cfb8 2018-03-28 23:31:01 +02:00
s390xcap.c
s390xcpuid.pl s390x assembly pack: add KMF code path for aes-cfb/cfb8 2018-03-28 23:31:01 +02:00
sparc_arch.h
sparccpuid.S
sparcv9cap.c
threads_none.c
threads_pthread.c
threads_win.c
uid.c
vms_rms.h
x86_64cpuid.pl Fix issues in ia32 RDRAND asm leading to reduced entropy 2018-03-08 10:27:49 -05:00
x86cpuid.pl Fix issues in ia32 RDRAND asm leading to reduced entropy 2018-03-08 10:27:49 -05:00