Skip to content

Commit

Permalink
Bifurcate microarchitectural variants of Weierstrass point additions
Browse files Browse the repository at this point in the history
As with the earlier update for doublings, the Jacobian point adidtion
and mixed addition operations for the curves P-256, P-384, P-521,
secp256k1 and SM2 now all have the usual two versions targeting
different microarchitectures, one of them called "_alt", following the
general s2n-bignum convention.

The "_alt" forms for ARM now present are just renamed versions of the
originals (which were based on "_alt" field operations), with the new
code taking over the old non-alt name. For x86 the non-alt ones are
the same as before and the "_alt" forms are new.
  • Loading branch information
jargh committed May 5, 2024
1 parent 061ea51 commit acd4fd3
Show file tree
Hide file tree
Showing 91 changed files with 146,763 additions and 31,093 deletions.
12 changes: 11 additions & 1 deletion arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,35 @@ POINT_OBJ = curve25519/curve25519_ladderstep.o \
curve25519/edwards25519_scalarmuldouble.o \
curve25519/edwards25519_scalarmuldouble_alt.o \
p256/p256_montjadd.o \
p256/p256_montjadd_alt.o \
p256/p256_montjdouble.o \
p256/p256_montjdouble_alt.o \
p256/p256_montjmixadd.o \
p256/p256_montjmixadd_alt.o \
p384/p384_montjadd.o \
p384/p384_montjadd_alt.o \
p384/p384_montjdouble.o \
p384/p384_montjdouble_alt.o \
p384/p384_montjmixadd.o \
p384/p384_montjmixadd_alt.o \
p521/p521_jadd.o \
p521/p521_jadd_alt.o \
p521/p521_jdouble.o \
p521/p521_jdouble_alt.o \
p521/p521_jmixadd.o \
p521/p521_jmixadd_alt.o \
secp256k1/secp256k1_jadd.o \
secp256k1/secp256k1_jadd_alt.o \
secp256k1/secp256k1_jdouble.o \
secp256k1/secp256k1_jdouble_alt.o \
secp256k1/secp256k1_jmixadd.o \
secp256k1/secp256k1_jmixadd_alt.o \
sm2/sm2_montjadd.o \
sm2/sm2_montjadd_alt.o \
sm2/sm2_montjdouble.o \
sm2/sm2_montjdouble_alt.o \
sm2/sm2_montjmixadd.o
sm2/sm2_montjmixadd.o \
sm2/sm2_montjmixadd_alt.o

BIGNUM_OBJ = curve25519/bignum_add_p25519.o \
curve25519/bignum_cmul_p25519.o \
Expand Down
4 changes: 3 additions & 1 deletion arm/p256/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ OBJ = bignum_add_p256.o \
bignum_tomont_p256.o \
bignum_triple_p256.o \
p256_montjadd.o \
p256_montjadd_alt.o \
p256_montjdouble.o \
p256_montjdouble_alt.o \
p256_montjmixadd.o
p256_montjmixadd.o \
p256_montjmixadd_alt.o

%.o : %.S ; $(CC) -E -I../../include $< | $(GAS) -o $@ -

Expand Down
604 changes: 298 additions & 306 deletions arm/p256/p256_montjadd.S

Large diffs are not rendered by default.

Loading

0 comments on commit acd4fd3

Please sign in to comment.