mbedtls/library
Manuel Pégourié-Gonnard 72a8c9e7dc Force some compilers to respect volatile reads
Inspection of the generated assembly showed that before this commit, armcc 5
was optimizing away the successive reads to the volatile local variable that's
used for double-checks. Inspection also reveals that inserting a call to an
external function is enough to prevent it from doing that.

The tested versions of ARM-GCC, Clang and Armcc 6 (aka armclang) all keep the
double read, with our without a call to an external function in the middle.

The inserted function can also be changed to insert a random delay if
desired in the future, as it is appropriately places between the reads.
2019-11-21 15:14:59 +01:00
..
.gitignore Split libs with make + general make cleanups 2015-06-25 10:59:56 +02:00
aes.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
aesni.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
arc4.c Changed mbedtls_platform_memcpy back to memcpy for selftest and test functions 2019-10-30 14:07:04 +02:00
aria.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
asn1parse.c Merge remote-tracking branch 'public/pr/2877' into baremetal 2019-10-23 14:53:29 +01:00
asn1write.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
base64.c Changed every memcmp to SCA equivalent mbedtls_platform_memcmp 2019-10-03 13:14:33 +03:00
bignum.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
blowfish.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
camellia.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
ccm.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
certs.c Fixup certs.c: Remove redundant TinyCrypt guard 2019-09-04 16:19:49 +01:00
chacha20.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
chachapoly.c Replace memset() with mbedtls_platform_memset() 2019-10-22 10:03:07 +02:00
cipher.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
cipher_wrap.c Consistently use (type *) instead of (type*) for pointer conversion 2019-06-25 09:10:57 +01:00
cmac.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
CMakeLists.txt Merge remote-tracking branch 'origin/pr/652' into baremetal 2019-09-25 16:37:07 +01:00
ctr_drbg.c Changed mbedtls_platform_memcpy back to memcpy for selftest and test functions 2019-10-30 14:07:04 +02:00
debug.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
des.c Changed mbedtls_platform_memcpy back to memcpy for selftest and test functions 2019-10-30 14:07:04 +02:00
dhm.c Replace memset() with mbedtls_platform_memset() 2019-10-22 10:03:07 +02:00
ecdh.c Replace memset() with mbedtls_platform_memset() 2019-10-22 10:03:07 +02:00
ecdsa.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
ecjpake.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
ecp.c Replace memset() with mbedtls_platform_memset() 2019-10-22 10:03:07 +02:00
ecp_curves.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
entropy.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
entropy_poll.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
error.c Add error code MBEDTLS_ERR_PLATFORM_FAULT_DETECTED 2019-11-21 15:14:59 +01:00
gcm.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
havege.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
hkdf.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
hmac_drbg.c Changed mbedtls_platform_memcpy back to memcpy for selftest and test functions 2019-10-30 14:07:04 +02:00
Makefile Merge remote-tracking branch 'public/pr/2867' into baremetal 2019-10-08 18:57:31 +01:00
md.c Use plain memset() in context init functions 2019-10-22 10:03:07 +02:00
md2.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
md4.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
md5.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
memory_buffer_alloc.c Replace memset() with mbedtls_platform_memset() 2019-10-22 10:03:07 +02:00
net_sockets.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
nist_kw.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
oid.c Changed every memcmp to SCA equivalent mbedtls_platform_memcmp 2019-10-03 13:14:33 +03:00
padlock.c Added include platform_util.h to padlock.c to fix compile with all defines variants 2019-10-30 14:07:04 +02:00
pem.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
pk.c Force some compilers to respect volatile reads 2019-11-21 15:14:59 +01:00
pkcs5.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
pkcs11.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
pkcs12.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
pkparse.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
pkwrite.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
platform.c Omit runtime configuration of calloc/free if macro config enabled 2018-10-11 11:04:20 +01:00
platform_util.c Force some compilers to respect volatile reads 2019-11-21 15:14:59 +01:00
poly1305.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
ripemd160.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
rsa.c Changed mbedtls_platform_memcpy back to memcpy for selftest and test functions 2019-10-30 14:07:04 +02:00
rsa_internal.c Bignum: Deprecate mbedtls_mpi_is_prime() 2018-10-09 16:36:53 +01:00
sha1.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
sha256.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
sha512.c Changed mbedtls_platform_memset/cpy/cmp in selftest functions back to original methods 2019-10-30 14:07:04 +02:00
ssl_cache.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
ssl_ciphersuites.c Fixup: Add missing TinyCrypt guards 2019-09-04 16:17:45 +01:00
ssl_cli.c Changed mbedtls_platform_memcpy to memcpy in places which don't handle critical data 2019-10-30 14:07:04 +02:00
ssl_cookie.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
ssl_srv.c Changed mbedtls_platform_memcpy to memcpy in places which don't handle critical data 2019-10-30 14:07:04 +02:00
ssl_ticket.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
ssl_tls.c Changed mbedtls_platform_memcpy to memcpy in places which don't handle critical data 2019-10-30 14:07:04 +02:00
threading.c Don't declare and define gmtime()-mutex on Windows platforms 2018-09-06 12:09:56 +01:00
timing.c timing: Remove redundant include file 2019-06-20 16:33:02 +01:00
version.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
version_features.c Add config option for AES encryption only 2019-10-24 12:19:33 +03:00
x509.c Merge remote-tracking branch 'public/pr/2877' into baremetal 2019-10-23 14:53:29 +01:00
x509_create.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
x509_crl.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
x509_crt.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
x509_csr.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
x509write_crt.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
x509write_csr.c Changed every memcpy to SCA equivalent mbedtls_platform_memcpy 2019-10-30 14:07:04 +02:00
xtea.c Changed mbedtls_platform_memcpy back to memcpy for selftest and test functions 2019-10-30 14:07:04 +02:00