1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 15:39:07 +00:00

NTRU Prime: satisfy linter

This commit is contained in:
John M. Schanck 2020-09-02 13:01:19 -04:00 committed by Kris Kwiatkowski
parent b568d01ac6
commit 1a402a1917
6 changed files with 18 additions and 6 deletions

View File

@ -38,7 +38,8 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
i = 0; i = 0;
j = 0; j = 0;
for (q = top; q > p; q >>= 1) { for (q = top; q > p; q >>= 1) {
if (j != i) for (;;) { if (j != i) {
for (;;) {
if (j == n - q) { if (j == n - q) {
goto done; goto done;
} }
@ -53,6 +54,7 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
break; break;
} }
} }
}
while (i + p <= n - q) { while (i + p <= n - q) {
for (j = i; j < i + p; ++j) { for (j = i; j < i + p; ++j) {
int32 a = x[j + p]; int32 a = x[j + p];

View File

@ -38,7 +38,8 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
i = 0; i = 0;
j = 0; j = 0;
for (q = top; q > p; q >>= 1) { for (q = top; q > p; q >>= 1) {
if (j != i) for (;;) { if (j != i) {
for (;;) {
if (j == n - q) { if (j == n - q) {
goto done; goto done;
} }
@ -53,6 +54,7 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
break; break;
} }
} }
}
while (i + p <= n - q) { while (i + p <= n - q) {
for (j = i; j < i + p; ++j) { for (j = i; j < i + p; ++j) {
int32 a = x[j + p]; int32 a = x[j + p];

View File

@ -38,7 +38,8 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
i = 0; i = 0;
j = 0; j = 0;
for (q = top; q > p; q >>= 1) { for (q = top; q > p; q >>= 1) {
if (j != i) for (;;) { if (j != i) {
for (;;) {
if (j == n - q) { if (j == n - q) {
goto done; goto done;
} }
@ -53,6 +54,7 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
break; break;
} }
} }
}
while (i + p <= n - q) { while (i + p <= n - q) {
for (j = i; j < i + p; ++j) { for (j = i; j < i + p; ++j) {
int32 a = x[j + p]; int32 a = x[j + p];

View File

@ -38,7 +38,8 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
i = 0; i = 0;
j = 0; j = 0;
for (q = top; q > p; q >>= 1) { for (q = top; q > p; q >>= 1) {
if (j != i) for (;;) { if (j != i) {
for (;;) {
if (j == n - q) { if (j == n - q) {
goto done; goto done;
} }
@ -53,6 +54,7 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
break; break;
} }
} }
}
while (i + p <= n - q) { while (i + p <= n - q) {
for (j = i; j < i + p; ++j) { for (j = i; j < i + p; ++j) {
int32 a = x[j + p]; int32 a = x[j + p];

View File

@ -38,7 +38,8 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
i = 0; i = 0;
j = 0; j = 0;
for (q = top; q > p; q >>= 1) { for (q = top; q > p; q >>= 1) {
if (j != i) for (;;) { if (j != i) {
for (;;) {
if (j == n - q) { if (j == n - q) {
goto done; goto done;
} }
@ -53,6 +54,7 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
break; break;
} }
} }
}
while (i + p <= n - q) { while (i + p <= n - q) {
for (j = i; j < i + p; ++j) { for (j = i; j < i + p; ++j) {
int32 a = x[j + p]; int32 a = x[j + p];

View File

@ -38,7 +38,8 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
i = 0; i = 0;
j = 0; j = 0;
for (q = top; q > p; q >>= 1) { for (q = top; q > p; q >>= 1) {
if (j != i) for (;;) { if (j != i) {
for (;;) {
if (j == n - q) { if (j == n - q) {
goto done; goto done;
} }
@ -53,6 +54,7 @@ static void crypto_sort_smallindices(int32 *x, int32 n) {
break; break;
} }
} }
}
while (i + p <= n - q) { while (i + p <= n - q) {
for (j = i; j < i + p; ++j) { for (j = i; j < i + p; ++j) {
int32 a = x[j + p]; int32 a = x[j + p];