Update gf128

This commit is contained in:
Zhi Guan
2026-06-14 16:09:57 +08:00
parent fc1869ba88
commit 25ce3134f8
4 changed files with 3 additions and 10 deletions

View File

@@ -236,7 +236,6 @@ if (ENABLE_GMUL_ARM64)
message(STATUS "ENABLE_GMUL_ARM64 is ON")
add_definitions(-DENABLE_GMUL_ARM64)
enable_language(ASM)
#list(APPEND src src/gf128_arm64.S)
list(APPEND src src/gf128_arm64.c)
endif()
@@ -764,7 +763,7 @@ endif()
#
set(CPACK_PACKAGE_NAME "GmSSL")
set(CPACK_PACKAGE_VENDOR "GmSSL develop team")
set(CPACK_PACKAGE_VERSION "3.2.0-dev.1044")
set(CPACK_PACKAGE_VERSION "3.2.0-dev.1045")
set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/README.md)
set(CPACK_NSIS_MODIFY_PATH ON)
include(CPack)

View File

@@ -19,7 +19,7 @@ extern "C" {
// Also update CPACK_PACKAGE_VERSION in CMakeLists.txt
#define GMSSL_VERSION_NUM 30200
#define GMSSL_VERSION_STR "GmSSL 3.2.0-dev.1044"
#define GMSSL_VERSION_STR "GmSSL 3.2.0-dev.1045"
int gmssl_version_num(void);
const char *gmssl_version_str(void);

View File

@@ -68,12 +68,8 @@ int gf128_print(FILE *fp, int fmt, int ind, const char *label, const gf128_t a)
uint8_t be[16];
int i;
printf("%s: ", label);
gf128_to_bytes(a, be);
for (i = 0; i < 16; i++) {
printf("%02x", be[i]);
}
printf("\n");
format_bytes(fp, fmt, ind, label, be, sizeof(be));
return 1;
}
@@ -189,4 +185,3 @@ int gf128_equ_hex(const gf128_t a, const char *s)
}
return 1;
}

View File

@@ -11,7 +11,6 @@
#include <arm_neon.h>
#include <gmssl/gf128.h>
= a0 * b0 + ((a0 + a1)*(b0 + b1) - a0*b0 - a1*b1) * x^64 + a1 * b1 * x^128
// this version is converted from the gf128_arm64.S by ChatGPT 4
// a little slower than the asm version