Commit Graph

448 Commits

Author SHA1 Message Date
Zhi Guan
9784bbc380 Add sdfencrypt command 2024-06-09 11:17:54 +08:00
Zhi Guan
368f2e5bdc Add sdfdigest command 2024-06-08 12:03:25 +08:00
Zhi Guan
3614daf6a6 Fix sdftest command bugs 2024-06-08 10:35:38 +08:00
Zhi Guan
c4e5cf0deb Add sdfsign command 2024-06-07 19:45:10 +08:00
Zhi Guan
4363740477 Add sdfinfo and sdfexport command 2024-06-06 22:07:44 +08:00
Zhi Guan
79a4760e1e Remove GMT/0105 RNG 2024-06-02 22:42:51 +08:00
Zhi Guan
fa3341171c Remove HASH_DRBG 2024-06-02 22:40:04 +08:00
Zhi Guan
478d75349b Update sm4 ctr tests 2024-06-02 22:33:00 +08:00
Zhi Guan
cffee1dd9f Fix tls12, tls13 bug
目前TLS 1.2, 1.3的握手过程中使用了SM2_Z256_POINT,应该改为使用SM2_POINT,可以兼容其他曲线类型,只在做ECDH的时候才判断点的正确性。
2024-06-02 10:19:24 +08:00
Zhi Guan
3d6c8d15a8 Add command test to CMakeLists.txt 2024-06-01 11:46:13 +08:00
Zhi Guan
76312df4d6 Clean code 2024-05-31 21:02:04 +08:00
Zhi Guan
26750fbb1d Add gf128_mul arm64 intrinsics 2024-05-31 21:01:49 +08:00
Zhi Guan
e9e2d27021 Merge pull request #1684 from maximluo/dev-sm2
move ENABLE_SM2_ENC_PRE_COMPUTE to CMakeLists as an option
2024-05-29 09:48:59 +08:00
Zhi Guan
84d5d5c7c0 Delete sm4_tbox.c 2024-05-25 23:09:53 +08:00
Zhi Guan
d719ee4862 Conv from UTF-8 to ASCII
`file *.c` to see file types (ASCII or UTF-8), convert UTF-8 (with BOM) to ASCII

```sh
sed '1s/^\xEF\xBB\xBF//'  sm4.c | iconv -f UTF-8 -t ASCII//TRANSLIT > temp.c
mv temp.c sm4.c
```
2024-05-25 18:06:16 +08:00
Zhi Guan
0d1ef16de0 Fix SM2_AMD64 2024-05-25 09:44:08 +08:00
Zhi Guan
cde0065241 Update SM4 AES-NI implementation 2024-05-24 21:38:14 +08:00
Zhi Guan
4076a30fa2 Update SM4 AVX2 8x implementation 2024-05-24 21:13:09 +08:00
Zhi Guan
ff4a478cce Update sm3_sse.c 2024-05-24 20:05:02 +08:00
Zhi Guan
1fd989303f Add SM2 X86_64 asm
Not working yet
2024-05-24 20:04:53 +08:00
Zhi Guan
32819490c7 Create sm2_z256_amd64.S 2024-05-24 16:16:07 +08:00
Zhi Guan
e2d4128ebe Update SM4 CE 2024-05-24 15:21:06 +08:00
luokai
475cb77829 move ENABLE_SM2_ENC_PRE_COMPUTE to CMakeLists as an option 2024-05-24 08:24:58 +08:00
Zhi Guan
ec16879fd8 Remove warnings 2024-05-23 17:29:45 +08:00
Zhi Guan
4f21be027e Remove warnings 2024-05-23 17:12:53 +08:00
Zhi Guan
9d8da9c380 Update sm9_z256.c 2024-05-23 16:50:33 +08:00
Zhi Guan
b3707dbabf Update sm9_z256.c 2024-05-23 16:43:08 +08:00
Zhi Guan
f3ceaa4e4e Update sm2_z256.c 2024-05-23 16:43:05 +08:00
Zhi Guan
adc181fa91 Remove warnings 2024-05-23 16:28:54 +08:00
Zhi Guan
926e063353 Fix sm4-cbc iv related bug 2024-05-20 18:02:16 +08:00
Zhi Guan
e76b3fc3b1 Update pem.c 2024-05-19 19:02:04 +08:00
Zhi Guan
d56eeaac5a Remove warnings 2024-05-17 13:12:51 +08:00
Zhi Guan
7cc5b77cf8 Add sm4_xts and ghash command 2024-05-15 10:00:22 +08:00
Zhi Guan
ec4396cdb5 Fix SM4 CFB bug when in==out, add option -sbytes to command 2024-05-14 10:07:59 +08:00
Zhi Guan
a98be7f477 Change iv behavior in sm4_cbc_encrypt_blocks 2024-05-13 21:51:59 +08:00
Zhi Guan
7f3072e917 Let sm4_cbc_encrypt_blocks update iv
If in == out, then after encryptions the input (i.e. iv) is changed
2024-05-13 21:44:06 +08:00
Zhi Guan
e17df320be Remove cl building warnings 2024-05-13 15:52:59 +08:00
Zhi Guan
f5fb0a5ae9 Update sm4_arm64.c 2024-05-12 23:25:39 +08:00
Zhi Guan
dc80b0c137 Change cpu suffix and other file names 2024-05-12 23:17:35 +08:00
Zhi Guan
58340393b1 Add SM4 commands in gmssl CLI 2024-05-11 18:10:24 +08:00
Zhi Guan
2c125fbaa5 Return max *outlen in SM4 CTX update/finish 2024-05-11 15:05:27 +08:00
Zhi Guan
cd5cb85592 Use endian.h in SM3 2024-05-11 15:00:58 +08:00
Zhi Guan
cc154048e7 Add sm3 arm neon implementation 2024-05-10 22:06:41 +08:00
Zhi Guan
018efec089 Update sm3.c 2024-05-10 22:04:43 +08:00
Zhi Guan
d99f11b507 Update sm3.c 2024-05-10 00:54:04 +08:00
Zhi Guan
f64b8c5620 Delete sdf_dummy.c 2024-05-09 16:40:36 +08:00
Zhi Guan
d37d0b18b8 Change SDF files 2024-05-09 10:22:03 +08:00
Zhi Guan
3d491c9e14 Use SDF as the crypto provider in SM2/3/4 CTX API
cmake .. -DENABLE_CRYPTO_SDF=ON
2024-05-08 17:04:45 +08:00
Zhi Guan
40f2bb23d0 Update soft_sdf.c 2024-05-07 10:48:15 +08:00
Zhi Guan
fad7830f1c Update sdf_lib.c
The `ECCCipher` in GmSSL has enough ciphertext buffer, so length checking is not required. And without setting ECCCipher.L makes the API easier to use.
2024-05-07 10:47:16 +08:00