[crypto/ec] Remove unreachable AVX2 code in NISTZ256 implementation
authorNicola Tuveri <nic.tuv@gmail.com>
Tue, 2 Jun 2020 18:06:48 +0000 (21:06 +0300)
committerNicola Tuveri <nic.tuv@gmail.com>
Sun, 7 Jun 2020 11:48:33 +0000 (14:48 +0300)
commit49eebbc408535e8670cb62ea661b696ec5819f15
tree9d68f82853ce57666cc828cc84f153e55c5ca49a
parentad178c15a112d10380a6446127b069270af666de
[crypto/ec] Remove unreachable AVX2 code in NISTZ256 implementation

`crypto/ec/ecp_nistz256.c` contained code sections guarded by a
`ECP_NISTZ256_AVX2` define.

The relevant comment read:

> /*
>  * Note that by default ECP_NISTZ256_AVX2 is undefined. While it's great
>  * code processing 4 points in parallel, corresponding serial operation
>  * is several times slower, because it uses 29x29=58-bit multiplication
>  * as opposite to 64x64=128-bit in integer-only scalar case. As result
>  * it doesn't provide *significant* performance improvement. Note that
>  * just defining ECP_NISTZ256_AVX2 is not sufficient to make it work,
>  * you'd need to compile even asm/ecp_nistz256-avx.pl module.
>  */

Without diminishing the quality of the original submission, it's evident
that this code has been basically unreachable without modifications to
the library source code and is under-tested.

This commit removes these sections from the codebase.

(cherry picked from commit 00da0f69890874feaa555fafb99b967b861e9118 ,
 backported from https://github.com/openssl/openssl/pull/12019 )

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/12046)
crypto/ec/asm/ecp_nistz256-avx2.pl [deleted file]
crypto/ec/ecp_nistz256.c