Fix for constant time (step 7)

This commit is contained in:
NIIBE Yutaka
2014-01-22 14:26:41 +09:00
parent 6a69c31c3b
commit 251760d5da
2 changed files with 4 additions and 3 deletions

View File

@@ -220,8 +220,7 @@ bn256_sqr (bn512 *X, const bn256 *A)
uv = ((uint64_t )A->word[i])*((uint64_t )A->word[j]);
if (i < j)
{
if ((uv >> 63) != 0)
r2++;
r2 += ((uv >> 63) != 0);
uv <<= 1;
}
v = uv;