Zhi Guan
e9bbcf5490
Use z256 and jacobian coordinates as inner presentation of SM2 point
2024-04-18 21:27:00 +08:00
Zhi Guan
2a5dc640bd
Remove some modn functions
2024-04-17 20:55:20 +08:00
Zhi Guan
b01ad79475
Update sm9test.c
2024-04-17 15:44:56 +08:00
Zhi Guan
5d40024f14
Update SM9 to/from_hex API
2024-04-17 15:42:47 +08:00
Zhi Guan
f0e70bbb4d
Rename SM2_Z256 to sm2_z256_t
2024-04-16 22:58:07 +08:00
Zhi Guan
b519f973b9
Delete sm2_uint128test.c
2024-04-16 19:04:17 +08:00
Zhi Guan
ef03ddc680
Restore the original sm9 header file name.
2024-04-14 11:15:05 +08:00
Zhi Guan
771fe867ef
Adjust SM9 API
...
不再将Fp, Fn上的元素视为一种类型,而是看做在sm9_z256_t类型上的特殊计算类型,同理Montgomery计算也是sm9_z256_t上的计算。通过函数名可以完全体现在sm9_z256_t上的计算类型。
于此不同的是,GF(p^2), GF(p^4), GF(p^12) 几个类型在内部完全采用Montgomery形式表示,因此sm9_z256_fp2_t等表示特殊的类型,不再区分mul和mont_mul,因为所有计算都是Montgomery上的计算。
2024-04-14 10:20:11 +08:00
Zhi Guan
3a46c4a499
Add suffix _t to array type names
2024-04-13 18:57:29 +08:00
Zhi Guan
9937b8dc6d
Remove point_copy
...
use `*R = *P` instead
2024-04-13 18:51:33 +08:00
Zhi Guan
e9d61cb1f4
Remove unused macros
...
Remove fp_ fn_ macros can reduce the API size. Another reason is that some macros such as fp_equ, fn_equ, can not return correct result on `a` and `a + modulus`
2024-04-13 18:41:19 +08:00
Zhi Guan
8e2c4ebd2f
Update SM4 OpenCL implementation
2024-04-12 16:07:30 +08:00
Zhi Guan
8dd2e71a54
Remove old SM9 code
2024-04-11 23:30:01 +08:00
Zhi Guan
b777fbafdb
Re-organize SM4/GCM related source files
2024-04-11 22:19:50 +08:00
Zhi Guan
f9e9b20fa7
Change GF(2^128) API
...
from `r = op(a, b)` to `op(r, a, b)`
2024-04-11 17:57:41 +08:00
Zhi Guan
6b36c51cdf
Add GMUL ASM
2024-03-31 16:54:24 +08:00
Gorachya
ce7f9a281a
Merge branch 'guanzhi:master' into master
2024-03-19 23:32:08 +08:00
Zhi Guan
31440f9948
Update SM2
2024-03-19 21:37:36 +08:00
Gorachya
d5b6db9af0
Add files via upload
2024-03-14 20:06:49 +08:00
Gorachya
7706e3b360
Add files via upload
2024-03-13 15:44:53 +08:00
Zhi Guan
33baa3df92
Update SM2
2024-03-10 22:34:43 +08:00
Zhi Guan
cfdcd0c0e3
Merge branch 'master' of https://github.com/guanzhi/GmSSL
2024-02-26 09:52:43 +08:00
Zhi Guan
4fa09e1f54
Update sm2 sign/enc with z256 implementation
2024-02-26 09:52:40 +08:00
Simon
d852e639f8
Update sm3test.c
2024-02-25 12:17:23 +08:00
Zhi Guan
c460766320
Update SM2 arithmetic implementations
...
Decouple API and implementations. SM2 arithmetic exposes 3 types: GF(p), GF(n), and Point.
2024-02-22 11:14:59 +08:00
Zhi Guan
79a6437c8c
Update sm4 tool to support more modes
...
Not finish yet
2024-02-21 09:24:22 +08:00
Zhi Guan
326e7de416
Add SM2 Z256 implementation
2024-02-20 11:24:00 +08:00
Zhi Guan
c9c26aca44
Add more SM4 modes
2024-02-19 14:16:49 +08:00
Zhi Guan
2c893d797b
Update soft_sdf
2024-01-31 21:10:30 +08:00
Zhi Guan
f53f69d1e2
Create soft_sdftest.c
2023-12-30 22:15:25 +08:00
Zhi Guan
81c3538020
Add SM3-XMSS post-quantum signature
...
The current configure is for testing only, the XMSS is configured to use SHA-256, not SM3.
2023-12-18 09:56:43 +08:00
Zhi Guan
dc4c21f4ec
Make AES optional and remove "Public API" from headers
2023-12-17 16:52:42 +08:00
Zhi Guan
04cbd81651
Update CMakeLists.txt
...
both CMakeLists.txt and source use ENABLE_XXX
2023-12-17 16:33:51 +08:00
Zhi Guan
94fc0aacab
Update sm4test.c
...
Fix the memcpy() bug on Windows VMs.
2023-12-14 15:29:06 +08:00
Zhi Guan
93a371113f
Delete rc4test.c
2023-12-13 20:19:21 +08:00
Zhi Guan
8106b9b2b7
Delete md5test.c
2023-12-13 20:19:18 +08:00
Zhi Guan
ecb7e1c248
Remove DES
2023-12-13 20:19:16 +08:00
Zhi Guan
5ca0d60781
Add sm2z256 c implementation
2023-04-22 10:23:57 +08:00
Zhi Guan
8e8159ade6
Add optimized SM2 point operations for 64-bit CPU and GCC
2023-04-12 12:04:30 +08:00
Zhi Guan
5c20425b40
Update zuctest.c
...
Fix `zuc_eea_test` buffer size bug.
2023-02-20 09:04:40 +08:00
Zhi Guan
a9f76d8f62
Update AEAD
2023-02-14 18:56:03 +08:00
Zhi Guan
acd50a83d0
Update SM4 AEAD
2023-02-14 09:06:59 +08:00
Zhi Guan
29af4f7f76
Add AEAD and GHASH functions
2023-02-13 23:29:27 +08:00
Zhi Guan
591db2cc01
Remove WIN32 warnings
2023-02-06 22:36:39 +08:00
Zhi Guan
d4d2f64aaa
Add demos to CMake
2023-02-06 22:14:34 +08:00
Zhi Guan
60c8b0b397
Update x509_reqtest.c
2023-02-06 17:13:45 +08:00
Zhi Guan
97d08c956a
Update X509
2023-02-06 11:48:33 +08:00
Zhi Guan
36f9a76d3a
Update http_crltest.c
2023-02-05 23:45:45 +08:00
Zhi Guan
5271f84df1
Fix CRL parse error
2023-02-05 23:42:42 +08:00
Zhi Guan
58c0bca3a2
Update X509
2023-02-05 23:10:31 +08:00