mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Add SM4 AArch64 assembly
This commit is contained in:
@@ -11,8 +11,15 @@ include_directories(include)
|
||||
|
||||
|
||||
option(ENABLE_SM4_TBOX "Enable SM4 merged S-Box implementation" ON)
|
||||
option(ENABLE_SM4_AARCH64 "Enable SM4 AARCH64 assembly implementation" OFF)
|
||||
option(ENABLE_GMUL_AARCH64 "Enable GF(2^128) Multiplication AArch64 assembly" OFF)
|
||||
|
||||
option(ENABLE_SM4_ECB "Enable SM4 ECB mode" OFF)
|
||||
option(ENABLE_SM4_OFB "Enable SM4 OFB mode" OFF)
|
||||
option(ENABLE_SM4_CFB "Enable SM4 CFB mode" OFF)
|
||||
option(ENABLE_SM4_CBC_MAC "Enable SM4-CBC-MAC" OFF)
|
||||
option(ENABLE_SM4_CCM "Enable SM4 CCM mode" OFF)
|
||||
|
||||
|
||||
|
||||
set(src
|
||||
@@ -307,7 +314,6 @@ if (ENABLE_SM3_SSE)
|
||||
endif()
|
||||
|
||||
|
||||
option(ENABLE_SM4_AARCH64 "Enable SM4 AARCH64 assembly implementation" OFF)
|
||||
if (ENABLE_SM4_AARCH64)
|
||||
message(STATUS "ENABLE_SM4_AARCH64 is ON")
|
||||
list(FIND src src/sm4.c sm4_index)
|
||||
@@ -325,7 +331,6 @@ if (ENABLE_SM4_AESNI_AVX)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
|
||||
endif()
|
||||
|
||||
option(ENABLE_SM4_ECB "Enable SM4 ECB mode" OFF)
|
||||
if (ENABLE_SM4_ECB)
|
||||
message(STATUS "ENABLE_SM4_ECB is ON")
|
||||
add_definitions(-DENABLE_SM4_ECB)
|
||||
@@ -333,7 +338,6 @@ if (ENABLE_SM4_ECB)
|
||||
list(APPEND tests sm4_ecb)
|
||||
endif()
|
||||
|
||||
option(ENABLE_SM4_OFB "Enable SM4 OFB mode" OFF)
|
||||
if (ENABLE_SM4_OFB)
|
||||
message(STATUS "ENABLE_SM4_OFB is ON")
|
||||
add_definitions(-DENABLE_SM4_OFB)
|
||||
@@ -341,7 +345,6 @@ if (ENABLE_SM4_OFB)
|
||||
list(APPEND tests sm4_ofb)
|
||||
endif()
|
||||
|
||||
option(ENABLE_SM4_CFB "Enable SM4 CFB mode" OFF)
|
||||
if (ENABLE_SM4_CFB)
|
||||
message(STATUS "ENABLE_SM4_CFB is ON")
|
||||
add_definitions(-DENABLE_SM4_CFB)
|
||||
@@ -349,9 +352,7 @@ if (ENABLE_SM4_CFB)
|
||||
list(APPEND tests sm4_cfb)
|
||||
endif()
|
||||
|
||||
option(ENABLE_SM4_CBC_MAC "Enable SM4-CBC-MAC" OFF)
|
||||
|
||||
option(ENABLE_SM4_CCM "Enable SM4 CCM mode" OFF)
|
||||
if (ENABLE_SM4_CCM)
|
||||
message(STATUS "ENABLE_SM4_CCM is ON")
|
||||
set(ENABLE_SM4_CBC_MAC ON)
|
||||
|
||||
Reference in New Issue
Block a user