Commit Graph

304 Commits

Author SHA1 Message Date
Zhi Guan
33baa3df92 Update SM2 2024-03-10 22:34:43 +08:00
Zhi Guan
4fa09e1f54 Update sm2 sign/enc with z256 implementation 2024-02-26 09:52:40 +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
8ae03e8105 Add more sm4 modes
Not tested yet
2024-02-10 15:46:59 +08:00
Zhi Guan
b58ea74f96 Fix tls_recv buffer overflow bug 2024-02-06 22:01:33 +08:00
Zhi Guan
983fa90978 Update X.509 2024-02-06 20:57:54 +08:00
Zhi Guan
69ffa88037 Fix TLS Alert
Alert, ChangeCipherSpec record should be encrypted after handshake
2024-02-06 20:57:27 +08:00
Zhi Guan
24783e56ed Minor update TLS client tools 2024-02-05 18:14:34 +08:00
Zhi Guan
9f2bfb5ad0 Add more options to TLS
add `-get` and `-quiet` option to `tlcp_client`
2024-02-05 17:01:09 +08:00
Zhi Guan
9cfc64d34b Change tls_named_curve_name to tls_curve_name 2024-02-04 11:40:58 +08:00
Zhi Guan
3f05cf98c8 Update tls.c
`tls_set_socket` checks whether socket is in blocking mode
2024-02-04 11:40:28 +08:00
Zhi Guan
a5c54cca38 Update tls.c 2024-02-02 11:10:50 +08:00
Zhi Guan
68447f036f Update alert in tls.c 2024-01-31 21:37:53 +08:00
Zhi Guan
f32a9d9b53 Update tls.c 2024-01-31 21:10:43 +08:00
Zhi Guan
2c893d797b Update soft_sdf 2024-01-31 21:10:30 +08:00
Zhi Guan
31efcb5d87 Add encrypt/decrypt to sm2_ctx.c 2024-01-07 17:26:29 +08:00
Zhi Guan
2dab02f76a Move sm2 ctx functions to a standalone source file
To support UADK implementations
2024-01-06 20:27:52 +08:00
Zhi Guan
b0c5208a68 Support SM3 third-party implementation 2024-01-04 09:37:12 +08:00
Zhi Guan
43396395d6 Add sm3_xmss command 2023-12-28 10:19:53 +08:00
Zhi Guan
39e2f9f657 Add software SDF implementation
The soft_sdf will replace sdf_dummy library for buiding testing apps.
2023-12-28 10:18:09 +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
4d7057b62b Update digest.c 2023-12-18 09:54:13 +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
6923ffc84c Add sm4_tbox.c as default SM4 C implementation
SM4 TBOX use a larger lookup table.
2023-12-13 20:58:40 +08:00
Zhi Guan
85e81d2864 Update sm3_kdf.c
Do not use endian.h
2023-12-13 20:49:44 +08:00
Zhi Guan
07b077d66b Update sm3_hmac.c
Do not clean `ctx` in `sm3_hmac_finish` by default
2023-12-13 20:48:54 +08:00
Zhi Guan
257ba6bcdb Update SM4
Simple SM4 cipher implementation in `sm4.c`
2023-12-13 20:26:57 +08:00
Zhi Guan
ecb7e1c248 Remove DES 2023-12-13 20:19:16 +08:00
Zhi Guan
687ecb9f49 Remove RC4 2023-12-13 20:16:05 +08:00
Zhi Guan
908ece9d0a Remove MD5 2023-12-13 20:14:19 +08:00
Zhi Guan
7db4991b4d Update sm3.c
Simple C implementation
2023-12-13 20:09:47 +08:00
Zhi Guan
10e02215e3 Fix cms.c mem leak 2023-12-12 14:23:33 +08:00
Zhi Guan
5a30e8d878 Update pem.c 2023-10-23 20:34:04 +08:00
Zhi Guan
6291599307 Update pem.c 2023-10-18 09:39:31 +08:00
Zhi Guan
9b5a2e6812 Do not clean ctx in <digest>_finish 2023-10-17 23:12:43 +08:00
Zhi Guan
b2a90982d9 Fix sha1_digest bug 2023-10-13 17:43:54 +08:00
Zhi Guan
87a4477ee9 Remove extra code 2023-10-12 15:06:35 +08:00
Zhi Guan
05b9d8cdc3 Merge pull request #1512 from nntp4/devel
Fix bug not including sm2_z256.h
2023-10-12 13:54:37 +08:00
Zhi Guan
65c9124522 Merge pull request #1480 from yetsing/fix-error-check-sm2_point_is_on_curve
Fix error check sm2_point_is_on_curve
2023-10-12 13:46:50 +08:00
Zhi Guan
ee1b09ce8f Merge pull request #1468 from Gowa2017/fix_sdf_print_device_info
OpenSession need a pointer of pointer
2023-10-12 13:44:32 +08:00
Zhi Guan
c8e1607999 Add error checking in pem.c 2023-09-26 11:07:20 +08:00
Zhi Guan
551d4936b4 Remove sm3 asm 2023-09-26 11:06:56 +08:00
Zhi Guan
ac61cfae02 Update CMake options of RDRND
Separate CMake option of rdrand and rdseed. In some CPUs only rdrand is supported.
2023-09-09 16:56:52 +08:00
nntp4
b649589795 Fix bug not including sm2_z256.h
Signed-off-by: nntp4 <nntp4@proton.me>
2023-06-22 17:35:38 +08:00
yesting
40331e3bfe 修复错误判断 2023-04-26 00:06:08 +08:00
yesting
91a20916fa 修复错误判断 2023-04-26 00:02:15 +08:00