From 196d10662e4d9d19599e14442b3bdc794c8f34f5 Mon Sep 17 00:00:00 2001 From: Chun-Chieh Li Date: Wed, 1 Jun 2022 15:23:45 +0800 Subject: [PATCH] M467: Disable SCAP in RSA H/W This is to follow designer's resolution. --- .../mbedtls/TARGET_NUVOTON/TARGET_M460/rsa/crypto_rsa_hw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M460/rsa/crypto_rsa_hw.c b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M460/rsa/crypto_rsa_hw.c index 676c7da172..40cba47107 100644 --- a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M460/rsa/crypto_rsa_hw.c +++ b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M460/rsa/crypto_rsa_hw.c @@ -50,6 +50,7 @@ * 1. For non-CRT+SCAP (excluding CRT+SCAP) mode, DMA buffer for MADDR6 must be key length plus 128 bits. * 2. DMA buffer must be 4-word aligned, or RSA H/W will trap. * 3. CRT is not well-tested yet, esp with 4096 key bits. + * 4. Following designer's resolution, disable SCAP. */ /* RSA context for DMA */ @@ -224,6 +225,9 @@ int crypto_rsa_crypt(mbedtls_rsa_context *ctx, size_t olen; uint32_t keybits; + /* NOTE: Check above RSA H/W comment for disabling blinding */ + blinding = false; + #if defined(NU_CRYPTO_RSA_ENABLE_DEBUG) mbedtls_printf("[CRPT][RSA] decrypt=%d, crt=%d, blinding=%d\n", decrypt, crt, blinding); #endif