diff --git a/wolfcrypt/src/port/kcapi/kcapi_ecc.c b/wolfcrypt/src/port/kcapi/kcapi_ecc.c index 23e0e05772..611999f445 100644 --- a/wolfcrypt/src/port/kcapi/kcapi_ecc.c +++ b/wolfcrypt/src/port/kcapi/kcapi_ecc.c @@ -272,6 +272,7 @@ int KcapiEcc_SharedSecret(ecc_key* private_key, ecc_key* public_key, byte* out, } if (buf_aligned != NULL) { + ForceZero(buf_aligned, keySz * 2); #ifdef KCAPI_USE_XMALLOC XFREE(buf_aligned, private_key->heap, DYNAMIC_TYPE_TMP_BUFFER); #else