more fix on ecc

This commit is contained in:
NIIBE Yutaka
2014-01-22 10:02:08 +09:00
parent 8d05addc87
commit 486f20bfd4
3 changed files with 15 additions and 30 deletions

View File

@@ -37,8 +37,12 @@ void
jpc_double (jpc *X, const jpc *A)
{
bn256 a[1], b[1], c[1], tmp0[1];
bn256 *d = X->x;
bn256 *d;
if (bn256_is_zero (A->z)) /* A is infinite */
return;
d = X->x;
modp256_sqr (a, A->y);
memcpy (b, a, sizeof (bn256));
modp256_mul (a, a, A->x);