commit | 61f412eb587dcb842c9388b93505bc078a58aac4 | [log] [tgz] |
---|---|---|
author | Teppo Järvelin <teppo.jarvelin@arm.com> | Thu Oct 03 12:25:22 2019 +0300 |
committer | Teppo Järvelin <teppo.jarvelin@arm.com> | Thu Oct 03 13:14:33 2019 +0300 |
tree | aeec04ea080257880d100f8e848b7d91bbe739e1 | |
parent | 51f65e4b86f59c7976168eeb61dbe16bbda88356 [diff] [blame] |
Changed every memcmp to SCA equivalent mbedtls_platform_memcmp This makes physical attacks more difficult. Selftest memcmp functions were not changed.
diff --git a/library/rsa.c b/library/rsa.c index 3bfc73e..e3d5124 100644 --- a/library/rsa.c +++ b/library/rsa.c
@@ -2266,7 +2266,7 @@ if ( ret != 0 ) goto exit; - if( memcmp( hash_start, result, hlen ) != 0 ) + if( mbedtls_platform_memcmp( hash_start, result, hlen ) != 0 ) { ret = MBEDTLS_ERR_RSA_VERIFY_FAILED; goto exit;