diff options
Diffstat (limited to 'ecc-secp224r1.c')
-rw-r--r-- | ecc-secp224r1.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ecc-secp224r1.c b/ecc-secp224r1.c index 3d19fde7..bb321298 100644 --- a/ecc-secp224r1.c +++ b/ecc-secp224r1.c @@ -189,10 +189,11 @@ ecc_secp224r1_sqrt (const struct ecc_modulo *p, if (m == r) { - /* No square root. Will always be detected on first round in - the outer loop. */ + /* We get here if there is no square root, or input is zero. + Will always be detected on first round in the outer + loop. */ assert (r == ECC_SQRT_E); - return 0; + return ecc_mod_zero_p (p, xp); } if (m < r - 1) |