Skip to content

Commit

Permalink
Merge pull request aws#94 from jargh/main
Browse files Browse the repository at this point in the history
64-bit SIMD regs in ARM model, better BOUNDER_RULE, slow-ARM field optimizations
s2n-bignum original commit: awslabs/s2n-bignum@06781d2
  • Loading branch information
aqjune-aws authored Nov 17, 2023
2 parents ff03aa3 + 6ecc1e7 commit 16779cd
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion arm/curve25519/edwards25519_scalarmulbase.S
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ S2N_BN_SYMBOL(edwards25519_scalarmulbase):
// (X,Y,Z,T), representing an affine point on the edwards25519 curve
// (x,y) via x = X/Z, y = Y/Z and x * y = T/Z (so X * Y = T * Z).
// In comments B means the standard basepoint (x,4/5) =
// (0x216....f25d51a,0x0x6666..666658).
// (0x216....f25d51a,0x6666..666658).
//
// Initialize accumulator "acc" to either 0 or 2^251 * B depending on
// bit 251 of the (reduced) scalar. That leaves bits 0..250 to handle.
Expand Down
2 changes: 1 addition & 1 deletion arm/curve25519/edwards25519_scalarmulbase_alt.S
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ S2N_BN_SYMBOL(edwards25519_scalarmulbase_alt):
// (X,Y,Z,T), representing an affine point on the edwards25519 curve
// (x,y) via x = X/Z, y = Y/Z and x * y = T/Z (so X * Y = T * Z).
// In comments B means the standard basepoint (x,4/5) =
// (0x216....f25d51a,0x0x6666..666658).
// (0x216....f25d51a,0x6666..666658).
//
// Initialize accumulator "acc" to either 0 or 2^251 * B depending on
// bit 251 of the (reduced) scalar. That leaves bits 0..250 to handle.
Expand Down
2 changes: 1 addition & 1 deletion arm/curve25519/edwards25519_scalarmuldouble.S
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ edwards25519_scalarmuldouble_loop:
// form amounts to swapping the first two fields and negating the third.
// The negation does not always fully reduce even mod 2^256-38 in the zero
// case, instead giving -0 = 2^256-38. But that is fine since the result is
// always fed to a multipliction inside the "pepadd" function below that
// always fed to a multiplication inside the "pepadd" function below that
// handles any 256-bit input.

cmp cf, xzr
Expand Down
2 changes: 1 addition & 1 deletion arm/curve25519/edwards25519_scalarmuldouble_alt.S
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ edwards25519_scalarmuldouble_alt_loop:
// form amounts to swapping the first two fields and negating the third.
// The negation does not always fully reduce even mod 2^256-38 in the zero
// case, instead giving -0 = 2^256-38. But that is fine since the result is
// always fed to a multipliction inside the "pepadd" function below that
// always fed to a multiplication inside the "pepadd" function below that
// handles any 256-bit input.

cmp cf, xzr
Expand Down
2 changes: 1 addition & 1 deletion arm/p384/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 OR ISC
#############################################################################

# If actually on an ARM8 machine, just use the GNU assmbler (as). Otherwise
# If actually on an ARM8 machine, just use the GNU assembler (as). Otherwise
# use a cross-assembling version so that the code can still be assembled
# and the proofs checked against the object files (though you won't be able
# to run code without additional emulation infrastructure). The aarch64
Expand Down
2 changes: 1 addition & 1 deletion arm/p521/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 OR ISC
#############################################################################

# If actually on an ARM8 machine, just use the GNU assmbler (as). Otherwise
# If actually on an ARM8 machine, just use the GNU assembler (as). Otherwise
# use a cross-assembling version so that the code can still be assembled
# and the proofs checked against the object files (though you won't be able
# to run code without additional emulation infrastructure). The aarch64
Expand Down
2 changes: 1 addition & 1 deletion x86_att/curve25519/edwards25519_scalarmulbase.S
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ edwards25519_scalarmulbase_standard:
// (X,Y,Z,T), representing an affine point on the edwards25519 curve
// (x,y) via x = X/Z, y = Y/Z and x * y = T/Z (so X * Y = T * Z).
// In comments B means the standard basepoint (x,4/5) =
// (0x216....f25d51a,0x0x6666..666658).
// (0x216....f25d51a,0x6666..666658).
//
// Initialize accumulator "acc" to either 0 or 2^251 * B depending on
// bit 251 of the (reduced) scalar. That leaves bits 0..250 to handle.
Expand Down
2 changes: 1 addition & 1 deletion x86_att/curve25519/edwards25519_scalarmulbase_alt.S
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ edwards25519_scalarmulbase_alt_standard:
// (X,Y,Z,T), representing an affine point on the edwards25519 curve
// (x,y) via x = X/Z, y = Y/Z and x * y = T/Z (so X * Y = T * Z).
// In comments B means the standard basepoint (x,4/5) =
// (0x216....f25d51a,0x0x6666..666658).
// (0x216....f25d51a,0x6666..666658).
//
// Initialize accumulator "acc" to either 0 or 2^251 * B depending on
// bit 251 of the (reduced) scalar. That leaves bits 0..250 to handle.
Expand Down
2 changes: 1 addition & 1 deletion x86_att/curve25519/edwards25519_scalarmuldouble.S
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@ edwards25519_scalarmuldouble_loop:
// form amounts to swapping the first two fields and negating the third.
// The negation does not always fully reduce even mod 2^256-38 in the zero
// case, instead giving -0 = 2^256-38. But that is fine since the result is
// always fed to a multipliction inside the "pepadd" function below that
// always fed to a multiplication inside the "pepadd" function below that
// handles any 256-bit input.

movq cf, %rdi
Expand Down
2 changes: 1 addition & 1 deletion x86_att/curve25519/edwards25519_scalarmuldouble_alt.S
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ edwards25519_scalarmuldouble_alt_loop:
// form amounts to swapping the first two fields and negating the third.
// The negation does not always fully reduce even mod 2^256-38 in the zero
// case, instead giving -0 = 2^256-38. But that is fine since the result is
// always fed to a multipliction inside the "pepadd" function below that
// always fed to a multiplication inside the "pepadd" function below that
// handles any 256-bit input.

movq cf, %rdi
Expand Down

0 comments on commit 16779cd

Please sign in to comment.