openssl/crypto/ec
David Benjamin 15972296af Fix calling convention bug in ecp_nistz256_ord_sqr_mont
The rep parameter takes an int in C, but the assembly implementation
looks at the upper bits. While it's unlikely to happen here, where all
calls pass a constant, in other scenarios x86_64 compilers will leave
arbitrary values in the upper half.

Fix this by making the C prototype match the assembly. (This aspect of
the calling convention implies smaller-than-word arguments in assembly
functions should be avoided. There are far fewer things to test if
everything consistently takes word-sized arguments.)

This was found as part of ABI testing work in BoringSSL.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/8108)
2019-04-14 12:55:53 +02:00
..
asm Fix calling convention bug in ecp_nistz256_ord_sqr_mont 2019-04-14 12:55:53 +02:00
curve448 Fixed linux_x86_icc compiler errors in EC code related to __uint128_t/__int128_t 2019-04-11 08:40:40 +10:00
build.info
curve25519.c Fixed linux_x86_icc compiler errors in EC code related to __uint128_t/__int128_t 2019-04-11 08:40:40 +10:00
ec2_oct.c fixed public range check in ec_GF2m_simple_oct2point 2019-03-30 14:49:00 +01:00
ec2_smpl.c Added NULL check to BN_clear() & BN_CTX_end() 2019-03-19 07:25:48 +01:00
ec_ameth.c
ec_asn1.c
ec_check.c doc fixups 2019-04-11 12:05:38 +03:00
ec_curve.c doc fixups 2019-04-11 12:05:38 +03:00
ec_cvt.c
ec_err.c
ec_key.c ec key validation checks updated 2019-04-11 20:37:13 +10:00
ec_kmeth.c
ec_lcl.h added code to validate EC named curve parameters 2019-04-11 12:05:38 +03:00
ec_lib.c Separate the lookup test 2019-04-11 12:05:38 +03:00
ec_mult.c Don't use coordinate blinding when scalar is group order 2019-04-14 11:24:08 +02:00
ec_oct.c
ec_pmeth.c
ec_print.c
ecdh_kdf.c
ecdh_ossl.c Added NULL check to BN_clear() & BN_CTX_end() 2019-03-19 07:25:48 +01:00
ecdsa_ossl.c EC keygen updates + changed ecdsa_sign to use BN_secure_new 2019-04-09 03:44:13 +03:00
ecdsa_sign.c
ecdsa_vrf.c
eck_prn.c
ecp_mont.c
ecp_nist.c
ecp_nistp224.c Make the array zeroing explicit using memset. 2019-03-29 20:52:00 +10:00
ecp_nistp256.c
ecp_nistp521.c Avoid an underflow in ecp_nistp521.c 2019-03-07 14:42:33 +00:00
ecp_nistputil.c
ecp_nistz256_table.c
ecp_nistz256.c Fix calling convention bug in ecp_nistz256_ord_sqr_mont 2019-04-14 12:55:53 +02:00
ecp_oct.c
ecp_smpl.c Added NULL check to BN_clear() & BN_CTX_end() 2019-03-19 07:25:48 +01:00
ecx_meth.c