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/pk.c b/library/pk.c index fb563d0..fbcaa5d 100644 --- a/library/pk.c +++ b/library/pk.c
@@ -556,7 +556,7 @@ const mbedtls_uecc_keypair *uecc_prv = (const mbedtls_uecc_keypair *) prv; - if( memcmp( uecc_pub->public_key, + if( mbedtls_platform_memcmp( uecc_pub->public_key, uecc_prv->public_key, 2 * NUM_ECC_BYTES ) == 0 ) {