summaryrefslogtreecommitdiff
path: root/ecc-mod-inv.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2017-08-26 22:54:59 +0200
committerNiels Möller <nisse@lysator.liu.se>2017-08-26 22:54:59 +0200
commit0bf64256ecf10af974c1970d87ffad19cbce7b51 (patch)
tree4ce4c03542cebdef57070d884e4d0b97301dbe3f /ecc-mod-inv.c
parentdcda81d796de2f4a16fd7e9e7a5d07baa288f147 (diff)
downloadnettle-0bf64256ecf10af974c1970d87ffad19cbce7b51.tar.gz
Add missing assert.
Diffstat (limited to 'ecc-mod-inv.c')
-rw-r--r--ecc-mod-inv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ecc-mod-inv.c b/ecc-mod-inv.c
index f65c9da4..8cfd2e3b 100644
--- a/ecc-mod-inv.c
+++ b/ecc-mod-inv.c
@@ -145,6 +145,7 @@ ecc_mod_inv (const struct ecc_modulo *m,
cnd_swap (swap, up, vp, n);
cy = cnd_sub_n (odd, up, vp, n);
cy -= cnd_add_n (cy, up, m->m, n);
+ assert (cy == 0);
cy = mpn_rshift (ap, ap, n, 1);
assert (cy == 0);