From b7c3a340c101172cf479f8820e66d66148b2ed2a Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 23 Jan 2017 09:12:03 -0800 Subject: [PATCH] Fix issue with wc_ecc_verify_hash_ex when not using SHAMIR and using static memory. Fixes issue #722. --- wolfcrypt/src/ecc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index b889396cf..cff8b9acb 100755 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -3785,9 +3785,9 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash, /* compute u1*mG + u2*mQ = mG */ if (err == MP_OKAY) - err = wc_ecc_mulmod(&u1, mG, mG, curve->Af, curve->prime, 0); + err = wc_ecc_mulmod_ex(&u1, mG, mG, curve->Af, curve->prime, 0, key->heap); if (err == MP_OKAY) - err = wc_ecc_mulmod(&u2, mQ, mQ, curve->Af, curve->prime, 0); + err = wc_ecc_mulmod_ex(&u2, mQ, mQ, curve->Af, curve->prime, 0, key->heap); /* find the montgomery mp */ if (err == MP_OKAY)