-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge branch 'main' into clear-stack"
- Loading branch information
1 parent
43b91c3
commit 8f7bb04
Showing
21 changed files
with
284 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
src/crypto_scalarmult/curve25519/amd64/common/51/decode_u5.jinc
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
src/crypto_scalarmult/curve25519/amd64/common/51/init_points5.jinc
This file was deleted.
Oops, something went wrong.
113 changes: 113 additions & 0 deletions
113
src/crypto_scalarmult/curve25519/amd64/common/51/load5.jinc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
inline fn __decode_u_coordinate5(reg u64 up) -> reg u64[5] | ||
{ | ||
inline int i; | ||
reg u64[4] t; | ||
reg u64[5] u; | ||
reg u64 mask; | ||
|
||
for i=0 to 4 | ||
{ t[i] = [up + 8*i]; } | ||
mask = 0x7ffffffffffff; | ||
|
||
//u[0] = t[0] & mask; // 51; 13 left | ||
u[0] = t[0]; | ||
u[0] &= mask; | ||
|
||
//u[1] = (t[1] << 13) || (t[0] >> 51) & mask; // 38; 26 left | ||
u[1] = t[1]; | ||
u[1] <<= 13; | ||
t[0] >>= 51; | ||
u[1] |= t[0]; | ||
u[1] &= mask; | ||
|
||
//u[2] = (t[2] << 26) || (t[1] >> 38) & mask; // 25; 39 left | ||
u[2] = t[2]; | ||
u[2] <<= 26; | ||
t[1] >>= 38; | ||
u[2] |= t[1]; | ||
u[2] &= mask; | ||
|
||
//u[3] = (t[3] << 39) || (t[2] >> 25) & mask; // 12; '52' left | ||
u[3] = t[3]; | ||
u[3] <<= 39; | ||
t[2] >>= 25; | ||
u[3] |= t[2]; | ||
u[3] &= mask; | ||
|
||
//u[4] = (t[3] >> 12) & mask; | ||
u[4] = t[3]; | ||
u[4] >>= 12; | ||
u[4] &= mask; | ||
|
||
return u; | ||
} | ||
|
||
inline fn __decode_u_coordinate_base5() -> reg u64[5] | ||
{ | ||
reg u64[5] u; | ||
|
||
u[0] = 9; | ||
u[1] = 0; | ||
u[2] = 0; | ||
u[3] = 0; | ||
u[4] = 0; | ||
|
||
return u; | ||
} | ||
|
||
inline fn __init_points5( | ||
reg u64[5] initr) | ||
-> | ||
stack u64[5], | ||
reg u64[5], | ||
stack u64[5], | ||
stack u64[5] | ||
{ | ||
inline int i; | ||
stack u64[5] x2 x3 z3; | ||
reg u64[5] z2r; | ||
reg u64 z; | ||
|
||
?{}, z = #set0(); | ||
|
||
x2[0] = 1; | ||
z2r[0] = 0; | ||
x3 = #copy(initr); | ||
z3[0] = 1; | ||
|
||
for i=1 to 5 | ||
{ x2[i] = z; | ||
z2r[i] = z; | ||
z3[i] = z; | ||
} | ||
|
||
// (1, 0, init, 1) | ||
return x2, z2r, x3, z3; | ||
} | ||
|
||
inline fn __init_points5_x3() | ||
-> | ||
stack u64[5], | ||
reg u64[5], | ||
stack u64[5] | ||
{ | ||
inline int i; | ||
stack u64[5] f1s f3s; | ||
reg u64[5] f2; | ||
reg u64 z; | ||
|
||
?{}, z = #set0(); | ||
|
||
f1s[0] = 1; | ||
f2[0] = 1; | ||
f3s[0] = 1; | ||
|
||
for i=1 to 5 | ||
{ f1s[i] = z; | ||
f2[i] = z; | ||
f3s[i] = z; | ||
} | ||
|
||
return f1s, f2, f3s; | ||
} | ||
|
18 changes: 0 additions & 18 deletions
18
src/crypto_scalarmult/curve25519/amd64/common/64/decode_u4.jinc
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
...ve25519/amd64/common/64/init_points4.jinc → ...ult/curve25519/amd64/common/64/load4.jinc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
inline fn __decode_scalar(reg u64 kp) -> stack u8[32] | ||
{ | ||
inline int i; | ||
stack u8[32] k; | ||
reg u64 t; | ||
|
||
for i=0 to 4 | ||
{ t = [kp + 8*i]; | ||
k[u64 i] = t; } | ||
|
||
k[0] &= 0xf8; | ||
k[31] &= 0x7f; | ||
k[31] |= 0x40; | ||
|
||
return k; | ||
} | ||
|
||
inline fn __decode_scalar_shl1(reg u64 kp) -> stack u64[4] | ||
{ | ||
inline int i; | ||
reg u64[4] k; | ||
stack u64[4] ks; | ||
|
||
for i=0 to 4 | ||
{ k[i] = [kp + 8*i]; } | ||
k[3] <<= 1; | ||
k[0] &= 0xfffffffffffffff8; | ||
k[3] |= 0x8000000000000000; | ||
|
||
ks = #copy(k); | ||
|
||
return ks; | ||
} | ||
|
28 changes: 0 additions & 28 deletions
28
src/crypto_scalarmult/curve25519/amd64/common/decode_scalar.jinc
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.