Add P-384

This commit is contained in:
Zhi Guan
2026-06-23 00:07:13 +08:00
parent 967c66ff7d
commit 24f4224fcb
5 changed files with 1156 additions and 2 deletions

View File

@@ -129,6 +129,7 @@ option(ENABLE_SM9 "Enable SM9" ON)
option(ENABLE_CMS "Enable CMS" ON)
option(ENABLE_SECP256R1 "Enable ECDH/ECDSA on curve secp256r1" ON)
option(ENABLE_SECP384R1 "Enable curve secp384r1" ON)
option(ENABLE_LMS "Enable LMS/HSS signature" ON)
option(ENABLE_XMSS "Enable XMSS/XMSS^MT signature" ON)
@@ -516,6 +517,16 @@ if (ENABLE_SECP256R1)
list(APPEND tests bn secp256r1 secp256r1_key ecdsa)
endif()
if (ENABLE_SECP384R1)
message(STATUS "ENABLE_SECP384R1 is ON")
add_definitions(-DENABLE_SECP384R1)
if (NOT ENABLE_SECP256R1)
list(APPEND src src/bn.c)
endif()
list(APPEND src src/secp384r1.c)
list(APPEND tests secp384r1)
endif()
if (ENABLE_LMS)
message(STATUS "ENABLE_LMS is ON")
@@ -931,7 +942,7 @@ endif()
#
set(CPACK_PACKAGE_NAME "GmSSL")
set(CPACK_PACKAGE_VENDOR "GmSSL develop team")
set(CPACK_PACKAGE_VERSION "3.3.0-dev.1161")
set(CPACK_PACKAGE_VERSION "3.3.0-dev.1162")
set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/README.md)
set(CPACK_NSIS_MODIFY_PATH ON)
include(CPack)