Commit Graph

1163 Commits

Author SHA1 Message Date
libo
75bac76b90 fix(sm2): fix compressed point output writing y instead of x
In sm2_z256_point_to_compressed_octets(), the compressed point format
should be: [1-byte flag] + [32-byte x-coordinate]

The flag indicates y's parity (0x02=even, 0x03=odd), but the actual
coordinate stored should be x (since y can be recovered from x using
the curve equation).

The original code incorrectly wrote y-coordinate instead of x-coordinate.
2026-02-02 16:29:47 +08:00
libo
0299af5667 fix(sm2): fix ENABLE_SM2_NEON macro mismatch and add missing functions
Problems:
1. CMakeLists.txt defines -DENABLE_SM2_NEON but sm2_z256.c checks
   for ENABLE_SM2_Z256_NEON, causing NEON code path never taken
2. When NEON is enabled, sm2_z256_modp_mont_sqr, sm2_z256_modp_from_mont,
   and sm2_z256_modp_to_mont are missing due to #elif structure

Fixes:
1. Change add_definitions(-DENABLE_SM2_NEON) to
   add_definitions(-DENABLE_SM2_Z256_NEON) in CMakeLists.txt
2. Add the three missing wrapper functions in NEON code block
2026-02-02 15:02:55 +08:00
Zhi Guan
e0f5ed85e3 Delete tmp.i 2026-02-01 20:41:45 +08:00
Zhi Guan
9c58806408 Rewrite TLS 1.2 as a state machine 2026-02-01 20:38:13 +08:00
Hemlix
33e1dcac2e fix: off-by-one in asn1_object_identifier_from_octets() 2026-01-31 14:28:26 +00:00
Zhi Guan
a15e0f34c7 Add ECDSA with curve P-256
for TLS testing
2026-01-24 12:27:12 +08:00
Zhi Guan
05ba2f8e54 Support HSS/XMSS/XMSSMT certificate, CSR, and CRL
LMS and SPHINCS+ do not have official OID, so officially supported by X.509
2026-01-18 21:13:58 +08:00
Zhi Guan
e8eb873c47 Add x509_private_key_from_file 2026-01-18 17:31:00 +08:00
Zhi Guan
9db11c6d06 Update XMSS
Add key_update callback and private_key_from_file
2026-01-18 17:09:27 +08:00
Zhi Guan
2e8d3abbc9 Update LMS 2026-01-18 17:08:16 +08:00
Zhi Guan
9488128154 Add LMS key_update callback 2026-01-18 12:12:45 +08:00
Zhi Guan
47639a9e23 Add X509_KEY to support different public key algos 2026-01-16 17:25:17 +08:00
Zhi Guan
d7f93bf379 Update SPHINCS+ 2026-01-15 18:37:22 +08:00
Zhi Guan
a212b17099 Update LMS/HSS
Set SHA-256/SM3 independently.
2026-01-15 18:27:20 +08:00
Zhi Guan
02d3d0224e Update XMSS
Functions and types with prefix `xmss`
Set SM3 or SHA256 independently.
2026-01-15 18:22:11 +08:00
Zhi Guan
f22d654109 Update CMakeLists.txt 2026-01-12 22:01:06 +08:00
Zhi Guan
56e5c3e124 Update README.md 2026-01-12 22:00:48 +08:00
Zhi Guan
de57d7fce1 Fix kyber commands bugs 2026-01-12 21:53:39 +08:00
Zhi Guan
3afd4a047b Update Kyber 2026-01-12 20:41:44 +08:00
Zhi Guan
1f64cb7389 Add SPHINCS+ commands to gmssl
Add `sphincskeygen`, `sphincssign`, `sphincsverify`
2026-01-11 21:30:05 +08:00
Zhi Guan
58a51a8474 Add SHA256 HMAC
SPHINCS+ need HMAC
2026-01-11 15:19:42 +08:00
Zhi Guan
4df06e7196 Update SPHINCS+ 2026-01-10 23:30:00 +08:00
Zhi Guan
af3bbca126 Update xmss.c 2026-01-08 22:23:35 +08:00
Zhi Guan
242365bef1 Update SPHINCS+ 2026-01-08 22:23:32 +08:00
Zhi Guan
aa28fc5252 Update SPHINCS+ 2026-01-07 22:18:26 +08:00
Zhi Guan
22a9340576 Add SPHINCS+ 2026-01-06 21:59:21 +08:00
Zhi Guan
bd80a3d628 Update xmss.c 2026-01-06 21:58:24 +08:00
Zhi Guan
38451da6a8 Update XMSS 2026-01-05 21:19:23 +08:00
richerfu
f41366ef90 fix: ohos ci failed 2026-01-05 15:19:56 +08:00
Zhi Guan
e919690d6a Update XMSS 2026-01-05 12:02:24 +08:00
Zhi Guan
83ef4e88bf Update XMSS 2026-01-04 22:37:38 +08:00
Zhi Guan
65be2ce54b Update XMSS 2026-01-04 18:37:01 +08:00
Zhi Guan
456945781d Update xmss.c 2026-01-04 15:51:18 +08:00
Zhi Guan
14e4edede7 Update XMSS 2026-01-04 10:04:53 +08:00
Zhi Guan
f5f3b6a5b2 Update lms.h 2026-01-04 09:59:45 +08:00
Zhi Guan
b58eb671d5 Update Kyber 2026-01-04 09:59:29 +08:00
Zhi Guan
8239b4099f Add ENABLE_KYBER to CMake 2025-12-27 10:52:07 +08:00
Zhi Guan
8447edb067 Update README.md 2025-12-18 18:39:04 +08:00
Zhi Guan
f813838ad4 Fix LMS/HSS key cleanup 2025-12-18 18:36:25 +08:00
Zhi Guan
a03f5132cd Add XMSS-SM3 signature 2025-12-18 18:35:15 +08:00
Zhi Guan
4791a30466 Add XMSS/XMSS^MT OID 2025-12-10 08:56:27 +08:00
Zhi Guan
4db8dfa263 Add new SM4 benchmark result 2025-12-09 16:53:12 +08:00
Zhi Guan
a146cd2ff7 fix ioctlsocket argument 2025-12-09 09:23:46 +08:00
Zhi Guan
e6d9bda6e4 Update aes.c
The `memset` at the end of the function can be optimized by the compiler. This update remove warnings from CodeQL.
2025-12-09 09:20:23 +08:00
Zhi Guan
fce32d149e Update socket.h 2025-12-09 08:46:21 +08:00
Zhi Guan
691cc6da74 Merge pull request #1752 from dihambo/master
修正asn1的tag掩码。完善asn1的tag测试,使其覆盖所有可能值。
2025-12-09 08:44:58 +08:00
Zhi Guan
a2974a9a8b Update tls.c 2025-12-08 20:45:35 +08:00
Zhi Guan
4ef98b0833 Merge pull request #1839 from mikecovlee/master
[bugfix] fix win32 incompatible pointer type error and cmake warnings
2025-12-08 20:42:24 +08:00
Zhi Guan
74c6626c99 Merge pull request #1738 from MelacauZhou/master
Fixed sm4_ccm decrypt.

Need a test for this bug.
2025-12-08 18:25:39 +08:00
Zhi Guan
bfdac0079f Merge pull request #1765 from zeyuwzy/my/master
fix SKF_METHOD_free close handle issue
2025-12-08 18:21:19 +08:00