ec: Add run time code selection for p521 field operations
authorMartin Schwenke <martin@meltin.net>
Wed, 12 May 2021 04:21:58 +0000 (14:21 +1000)
committerPauli <pauli@openssl.org>
Sat, 29 May 2021 06:07:15 +0000 (16:07 +1000)
commit1036749883ccf38ed11afe424d69708cfdca99f3
treec26578ae42e9e586983caed7219ee7fc79b0bf76
parent3363a2c3d60a157817dce1d6d5af20de0e415875
ec: Add run time code selection for p521 field operations

This is only used if ECP_NISTP521_ASM is defined and this currently
only occurs on PPC64.

This simply chooses the C reference implementation, which will be the
default when custom code is available for certain CPUs.

Only the multiplication and squaring operations are handled, since the
upcoming assembly code only contains those.  This scheme can be easily
extended to handle reduction too.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15401)
crypto/ec/build.info
crypto/ec/ecp_nistp521.c