Update SM2 methods

The default `./config` will enable the X86_64 ASM implementation of SM2. Use `./config -DGMSSL_NO_TURBO enable-ec_nistp_64_gcc_128` will enable the fast C implementation of SM2. The  `./config -DGMSSL_NO_TURBO` will use the original implementation.
This commit is contained in:
Zhi Guan
2019-01-26 17:26:03 +08:00
parent 674cada9bc
commit 7d5c18379f
8 changed files with 5433 additions and 5420 deletions

View File

@@ -3129,7 +3129,7 @@ static const ec_list_element curve_list[] = {
"RFC 5639 curve over a 512 bit prime field"},
#ifndef OPENSSL_NO_SM2
{NID_sm2p256v1, &_EC_SM2_PRIME_256V1.h,
# if defined(ECP_NISTZ256_ASM) && BN_BITS2 == 64
# if defined(ECP_NISTZ256_ASM) && BN_BITS2 == 64 && !defined(GMSSL_NO_TURBO)
EC_GFp_sm2z256_method,
# elif !defined(OPENSSL_NO_EC_NISTP_64_GCC_128)
EC_GFp_sm2p256_method,