1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00
This commit is contained in:
Frank Denis 2020-08-05 16:34:30 +02:00
parent 1f5f71b015
commit c02379fe8e

View File

@ -92,8 +92,7 @@ fe25519_invert(fe25519 out, const fe25519 z)
fe25519_sq(t3, t3);
}
fe25519_mul(t2, t3, t2);
fe25519_sq(t2, t2);
for (i = 1; i < 10; ++i) {
for (i = 1; i < 11; ++i) {
fe25519_sq(t2, t2);
}
fe25519_mul(t1, t2, t1);
@ -107,13 +106,11 @@ fe25519_invert(fe25519 out, const fe25519 z)
fe25519_sq(t3, t3);
}
fe25519_mul(t2, t3, t2);
fe25519_sq(t2, t2);
for (i = 1; i < 50; ++i) {
for (i = 1; i < 51; ++i) {
fe25519_sq(t2, t2);
}
fe25519_mul(t1, t2, t1);
fe25519_sq(t1, t1);
for (i = 1; i < 5; ++i) {
for (i = 1; i < 6; ++i) {
fe25519_sq(t1, t1);
}
fe25519_mul(out, t1, t0);
@ -147,8 +144,7 @@ fe25519_pow22523(fe25519 out, const fe25519 z)
fe25519_sq(t2, t2);
}
fe25519_mul(t1, t2, t1);
fe25519_sq(t1, t1);
for (i = 1; i < 10; ++i) {
for (i = 1; i < 11; ++i) {
fe25519_sq(t1, t1);
}
fe25519_mul(t0, t1, t0);
@ -162,8 +158,7 @@ fe25519_pow22523(fe25519 out, const fe25519 z)
fe25519_sq(t2, t2);
}
fe25519_mul(t1, t2, t1);
fe25519_sq(t1, t1);
for (i = 1; i < 50; ++i) {
for (i = 1; i < 51; ++i) {
fe25519_sq(t1, t1);
}
fe25519_mul(t0, t1, t0);