Skip to content

Commit cdf04b6

Browse files
committed
fix mp_montgomery_setup
1 parent a937f23 commit cdf04b6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/pk/ecc/ecc_verify_hash.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ static int _ecc_verify_hash(const unsigned char *sig, unsigned long siglen,
126126
if ((err = ltc_mp.ecc_ptmul(u1, mG, mG, m, 0)) != CRYPT_OK) { goto error; }
127127
if ((err = ltc_mp.ecc_ptmul(u2, mQ, mQ, m, 0)) != CRYPT_OK) { goto error; }
128128

129+
/* find the montgomery mp */
130+
if ((err = mp_montgomery_setup(m, &mp)) != CRYPT_OK) { goto error; }
131+
129132
/* add them */
130133
if ((err = ltc_mp.ecc_ptadd(mQ, mG, mG, m, mp)) != CRYPT_OK) { goto error; }
131134

0 commit comments

Comments
 (0)