From 8a7bb3fad4168c562786286a79bb51bdc24eb18e Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Fri, 11 Nov 2016 12:53:48 +1000 Subject: [PATCH] Z will be 0 not 1 --- wolfcrypt/src/ecc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index de7d30bef..400136024 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -1069,7 +1069,7 @@ int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R, /* if Z is one then these are no-operations */ if (err == MP_OKAY) { - if (!mp_isone(Q->z)) { + if (!mp_iszero(Q->z)) { /* T1 = Z' * Z' */ err = mp_sqr(Q->z, &t1); if (err == MP_OKAY) @@ -1163,7 +1163,7 @@ int ecc_projective_add_point(ecc_point* P, ecc_point* Q, ecc_point* R, } if (err == MP_OKAY) { - if (!mp_isone(Q->z)) { + if (!mp_iszero(Q->z)) { /* Z = Z * Z' */ err = mp_mul(z, Q->z, z); if (err == MP_OKAY)