summaryrefslogtreecommitdiff
path: root/beecrypt/dsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'beecrypt/dsa.c')
-rw-r--r--beecrypt/dsa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/beecrypt/dsa.c b/beecrypt/dsa.c
index ecea2a1b1..c8222d632 100644
--- a/beecrypt/dsa.c
+++ b/beecrypt/dsa.c
@@ -147,8 +147,10 @@ int dsavrfy(const mpbarrett* p, const mpbarrett* q, const mpnumber* g, const mpn
pwksp = ptemp+2*psize;
qwksp = qtemp+2*qsize;
+ mpsetx(qsize, qtemp+qsize, s->size, s->data);
+
/* compute w = inv(s) mod q */
- if (mpbinv_w(q, s->size, s->data, qtemp, qwksp))
+ if (mpextgcd_w(qsize, qtemp+qsize, q->modl, qtemp, qwksp))
{
/* compute u1 = h(m)*w mod q */
mpbmulmod_w(q, hm->size, hm->data, qsize, qtemp, qtemp+qsize, qwksp);