bn: Add fixed length (n=6), unrolled PPC Montgomery Multiplication
authorMartin Schwenke <martin@meltin.net>
Wed, 14 Apr 2021 04:31:58 +0000 (14:31 +1000)
committerPauli <pauli@openssl.org>
Sat, 8 May 2021 10:39:29 +0000 (20:39 +1000)
commit0d40ca47bd86e74a95c3a2f5fb6c67cdbee93c79
treed5939a2a1b410da4a696461e7724da37bfa9697e
parent531df8185ff4a083aca550b2c8a56d7993b2c60d
bn: Add fixed length (n=6), unrolled PPC Montgomery Multiplication

Overall improvement for p384 of ~18% on Power 9, compared to existing
Power assembling code.  See comment in code for more details.

Multiple unrolled versions could be generated for values other than
6.  However, for TLS 1.3 the only other ECC algorithms that might use
Montgomery Multiplication are p256 and p521, but these have custom
algorithms that don't use Montgomery Multiplication.  Non-ECC
algorithms are likely to use larger key lengths that won't fit into
the n <= 10 length limitation of this code.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15175)
crypto/bn/asm/ppc64-mont-fixed.pl [new file with mode: 0755]
crypto/bn/build.info
crypto/ppccap.c
providers/fips-sources.checksums
providers/fips.checksum
providers/fips.module.sources