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 Build: Remove BEGINRAW / ENDRAW / OVERRIDE 2019-01-31 16:19:49 +01:00
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 Fix the default digest algorthm of SM2 2019-02-27 10:05:17 +08:00
ec_asn1.c constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
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 Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ec_err.c SCA hardening for mod. field inversion in EC_GROUP 2019-02-17 21:02:36 +02:00
ec_key.c ec key validation checks updated 2019-04-11 20:37:13 +10:00
ec_kmeth.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
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 Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ec_pmeth.c constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
ec_print.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecdh_kdf.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
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 Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecdsa_vrf.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01: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 SCA hardening for mod. field inversion in EC_GROUP 2019-02-17 21:02:36 +02:00
ecp_nist.c SCA hardening for mod. field inversion in EC_GROUP 2019-02-17 21:02:36 +02:00
ecp_nistp224.c Make the array zeroing explicit using memset. 2019-03-29 20:52:00 +10:00
ecp_nistp256.c SCA hardening for mod. field inversion in EC_GROUP 2019-02-17 21:02:36 +02:00
ecp_nistp521.c Avoid an underflow in ecp_nistp521.c 2019-03-07 14:42:33 +00:00
ecp_nistputil.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecp_nistz256.c Fix calling convention bug in ecp_nistz256_ord_sqr_mont 2019-04-14 12:55:53 +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_oct.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecp_smpl.c Added NULL check to BN_clear() & BN_CTX_end() 2019-03-19 07:25:48 +01:00
ecx_meth.c Rearrange the inclusion of curve448/curve448_lcl.h 2019-02-25 19:38:06 +01:00