From 7c3a4a1975882c019d5685dd75940b15cc528a55 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 25 Nov 2019 10:57:09 -0700 Subject: [PATCH] update comment to reflect new sanity check --- wolfcrypt/src/integer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/integer.c b/wolfcrypt/src/integer.c index 4c81c653f..852d291b3 100644 --- a/wolfcrypt/src/integer.c +++ b/wolfcrypt/src/integer.c @@ -964,7 +964,7 @@ int wolfcrypt_mp_invmod(mp_int * a, mp_int * b, mp_int * c) int mp_invmod (mp_int * a, mp_int * b, mp_int * c) #endif { - /* b cannot be negative */ + /* b cannot be negative or zero, and can not divide by 0 (1/a mod b) */ if (b->sign == MP_NEG || mp_iszero(b) == MP_YES || mp_iszero(a) == MP_YES) { return MP_VAL; }