mbedtls/library
Gilles Peskine 7ff812e0d7 Remove a secret-dependent branch in Montgomery multiplication
In mpi_montmul, an auxiliary function for modular
exponentiation (mbedtls_mpi_mod_exp) that performs Montgomery
multiplication, the last step is a conditional subtraction to force
the result into the correct range. The current implementation uses a
branch and therefore may leak information about secret data to an
adversary who can observe what branch is taken through a side channel.

Avoid this potential leak by always doing the same subtraction and
doing a contant-trace conditional assignment to set the result.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-06-09 11:50:44 +02:00
..
.gitignore
aes.c Zeroize local AES variables before exiting the function 2019-11-12 03:23:51 -05:00
aesni.c
arc4.c
asn1parse.c
asn1write.c
base64.c
bignum.c Remove a secret-dependent branch in Montgomery multiplication 2020-06-09 11:50:44 +02:00
blowfish.c
camellia.c
ccm.c
certs.c Fix comment to match reality 2020-02-04 09:52:27 +01:00
cipher.c Remove redundant block_size validity check 2020-01-22 19:09:05 +01:00
cipher_wrap.c
cmac.c
CMakeLists.txt Bump version to Mbed TLS 2.7.15 2020-04-08 17:22:51 +01:00
ctr_drbg.c Merge remote-tracking branch 'origin/mbedtls-2.7' into mbedtls-2.7-restricted 2020-01-15 16:59:10 +00:00
debug.c
des.c
dhm.c
ecdh.c
ecdsa.c ECDSA: Fix side channel vulnerability 2019-10-25 09:01:34 +01:00
ecjpake.c Fix handling of md failure 2019-07-08 15:26:09 +02:00
ecp.c Fix leakage of projective coordinates in ECC 2020-04-01 11:28:08 +02:00
ecp_curves.c
entropy.c
entropy_poll.c
error.c
gcm.c
havege.c Prevent building the HAVEGE module on platforms where it doesn't work 2019-07-05 11:33:10 +02:00
hmac_drbg.c HMAC_DRBG: support set_entropy_len() before seed() 2019-10-23 18:01:25 +02:00
Makefile
md.c
md2.c
md4.c
md5.c
md_wrap.c
memory_buffer_alloc.c
net_sockets.c net_sockets: Fix typo in net_would_block() 2019-06-20 16:28:10 +01:00
oid.c
padlock.c
pem.c
pk.c
pk_wrap.c
pkcs5.c
pkcs11.c
pkcs12.c
pkparse.c Fix pkparse bug wrt MBEDTLS_RSA_ALT 2020-02-18 11:27:08 +01:00
pkwrite.c
platform.c
ripemd160.c
rsa.c Parse RSA parameters DP, DQ and QP from PKCS1 private keys 2020-01-29 13:13:04 -05:00
rsa_internal.c
sha1.c
sha256.c
sha512.c
ssl_cache.c
ssl_ciphersuites.c
ssl_cli.c Merge remote-tracking branch 'restricted/pr/671' into mbedtls-2.7-restricted 2020-04-09 11:57:18 +02:00
ssl_cookie.c
ssl_srv.c
ssl_ticket.c
ssl_tls.c Fix bug in handling of DTLS client hard reconnect 2020-03-31 13:04:19 +02:00
threading.c
timing.c timing: Remove redundant include file 2019-06-20 16:28:10 +01:00
version.c
version_features.c
x509.c Correct comment on the configuration option in x509.c 2020-03-28 00:43:40 +00:00
x509_create.c
x509_crl.c
x509_crt.c Guard from undefined behaviour in case of an INT_MAX max_pathlen 2020-04-17 11:30:21 +02:00
x509_csr.c
x509write_crt.c
x509write_csr.c Add missing return code check on call to mbedtls_md() 2020-01-22 19:06:32 +01:00
xtea.c