minor fixes.

This commit is contained in:
NIIBE Yutaka
2014-04-14 18:37:25 +09:00
parent 53aa3de9b4
commit 4d6f59079a
5 changed files with 17 additions and 8 deletions

View File

@@ -185,9 +185,11 @@ FUNC(jpc_to_ac) (ac *X, const jpc *A)
{
bn256 z_inv[1], z_inv_sqr[1];
if (mod_inv (z_inv, A->z, CONST_P256) < 0)
if (bn256_is_zero (A->z))
return -1;
mod_inv (z_inv, A->z, CONST_P256);
MFNC(sqr) (z_inv_sqr, z_inv);
MFNC(mul) (z_inv, z_inv, z_inv_sqr);