Commit Graph
511 Commits
Author SHA1 Message Date
Feng Jie 38201e1161 Fix unnecessary free in o2i_SM2CiphertextValue
The caller will crash when using the return value from
o2i_SM2CiphertextValue. Because the returned pointer to SM2CiphertextValue has been free,
regardless of success or failure in this method.

When assign cv to ret, cv should be set NULL just like the behaviour in
SM2_do_encrypt.
2018-11-24 20:09:02 +08:00
Simon 40b6623427 Update gmapi_skf_ec.c 2018-11-24 20:05:13 +08:00
Jiajun Xin 49987bfa9f remove the line ENGINE_free. In this function, the engine is not newed, so there should not be a free here. This line can cause nil pointer dereference when called. 2018-11-24 19:57:01 +08:00
Zhi Guan e7dc7b2656 Fix sm2 asm build errors on x86 2018-11-21 16:35:50 +08:00
Zhi Guan 322c660970 Update util/mkdef.pl 2018-11-17 19:49:03 +08:00
Zhi Guan 952321677f Merge branch 'master' of https://github.com/guanzhi/GmSSL 2018-11-16 15:26:33 +08:00
Zhi Guan 9a999ae907 Add sm9 and paillier pem support 2018-11-16 15:26:30 +08:00
Zhi Guan 5baad7e043 Fix pailliertest.c bug 2018-11-16 14:17:56 +08:00
Zhi Guan 7657f6f523 Install openssl cli
Symbol link to `gmssl` binary
2018-11-16 14:15:42 +08:00
Zhi Guan f859e4b7fa Merge pull request #571 from xianrenqiu/master
sm2: fix cv free error, in o2i_SM2CiphertextValue() function
2018-11-13 13:54:28 +08:00
Zhi Guan c9ec102cbd Merge pull request #574 from zzclzxc/master
fix sm3 padding bug
2018-11-13 13:54:09 +08:00
Zhi Guan babb4447a5 Fix skf_dummy and sdf_dummy config error 2018-11-13 11:42:02 +08:00
Zhi Guan 3fb9b94d51 Set hmac-sm3 as default prf of sms4 in PKCS#5 2018-11-02 11:21:41 +08:00
Zhi Guan d58931925b Update some demos 2018-11-01 11:21:14 +08:00
Zhi Guan 676076278d Update some demos 2018-10-31 11:03:21 +08:00
Zhi Guan 9eadfd4cb6 Update CPK sub-lib
Use simple NID as arguments, and fix some bugs
2018-10-21 19:43:40 +08:00
Zhi Guan ce1763c9ea Fix .gitignore 2018-10-20 14:40:21 +08:00
Zhi Guan 5ff8ef6136 Add some demo scripts 2018-10-20 11:41:48 +08:00
Zhi Guan 6fe883cd3a Add is_gmssl.h
Add code `#include <openssl/is_gmssl.h>` to check if GmSSL library is linked instead of the system pre-installed OpenSSL library.
2018-10-20 11:05:29 +08:00
Zhi Guan d81a43b6d5 Merge pull request #589 from bruce-sunshine/bruce_sdt
delete OPENSSL_assert in ECDSA_SIG_set_ECCSIGNATUREBLOB
2018-10-19 16:05:40 +08:00
Zhi Guan 89c826054b Update cpk
fix bug and add demo code
2018-10-19 00:09:54 +08:00
bruce 3d8fbc8bfd delete OPENSSL_assert in ECDSA_SIG_set_ECCSIGNATUREBLOB 2018-10-15 10:39:08 +08:00
Zhi Guan f411936f9f Update version to 2.4.0
Since this version SM9 is offically supported.
2018-10-13 21:47:14 +08:00
Zhi Guan 5293d0f38d Update SM9 key agreement 2018-10-12 12:07:58 +08:00
Zhi Guan 989bc7638d First SM9 release
SM9 setup/keygen/sign/verify has been tested. See example codes `demos/sm9/`.
2018-10-10 20:42:07 +08:00
Zhi Guan 9ca519edfa Update SM9 decrypt
to be tested
2018-10-06 17:33:34 +08:00
Zhi Guan f07ca5eeff Update SM9 encrypt 2018-10-06 17:04:25 +08:00
Zhi Guan a7b96e8024 Add SM9 encapsulate key functions 2018-10-05 11:53:13 +08:00
Zhi Guan eaf4002536 Update version number
2.3.3 is the first release to support SM9, setup/keygen/sign are supported, kem/encrypt/keyagree to be continue.
2018-09-29 11:56:35 +08:00
Zhi Guan 93064bf826 First SM9 release
SM9 digitial signature scheme is finished and tested.
2018-09-29 11:54:00 +08:00
Zhi Guan b54a3d35e6 Update SM9 schemes
Update SM9 schemes based on the default sm9bn256v1 r-ate pairing. To be continued.
2018-09-28 22:21:44 +08:00
Zhi Guan c7aa2cc1ff A workable SM9 R-ate pairing over BN curve
This textbook version R-ate pairing is very slow. About 0.5 seconds on my Macbook Pro 2018 with 2.7 GHz Core i7.
2018-09-21 22:42:11 +08:00
Zhi Guan 9f4e184ac5 Update SM9
to be continue ...
2018-09-19 11:56:07 +08:00
Zhi Guan dd71250c2c Update SM9
Implement extension fields with BIGNUM.
2018-09-18 12:34:52 +08:00
Zhi Guan e789127a9a Add SM9 BN curve sm9bn256v1 over GF(p)
The recommended BN curve over 256 -bit prime field. The OID of the curve might be modified in the future.
2018-09-13 15:58:53 +08:00
Zhi Guan f303eba06b Update SM9
a textbook version of SM9 R-ate pairing with recommanded parameters, just to make sure result is correct. See SM9 specification part-1 and part-5.
2018-09-13 11:51:44 +08:00
Zhi Guan 1e4c9db090 Update SM9
to be continue ...
2018-09-13 10:53:06 +08:00
Zhi Guan 1130aca883 Update SM9
Tower extension of F_p^12
2018-09-13 00:29:00 +08:00
Zhi Guan 9176532a2e Update version date with new pkcs8 features 2018-09-08 10:41:17 +08:00
Zhi Guan f960a8fa27 Add sm3/sm4 as pbe algorithms 2018-09-08 10:38:43 +08:00
Zhi Guan ccde5f4b17 Update symbols 2018-09-07 09:07:42 +08:00
Zhi Guan 4b17502fdd Optimize sm2p256v1 curve for Intel processors
This update is part of the GmSSL Turbo project.
This work is supported by the National Key Research and Development
Program of China NO.2018YFB0803601 and Intel.
2018-09-07 08:55:36 +08:00
zhaoxincheng 41049aa0cd fix sm3 padding bug 2018-08-30 16:37:25 +08:00
cuihongpeng eedbb6bb8e sm2: fix cv free error, in o2i_SM2CiphertextValue() function 2018-08-23 17:58:24 +08:00
Zhi Guan 940c98d5d7 Merge pull request #536 from suishixingkong/patch-1
Update skf_int.h
2018-08-09 22:20:06 +08:00
Zhi Guan 83538da804 Merge pull request #556 from J-Feng/fix-engine-build-error
Fix SKF and SDF engines build error
2018-08-09 22:11:38 +08:00
Zhi Guan abb5a7f801 Update GmSSL-Go version 2018-08-07 20:26:20 +08:00
Zhi Guan 838f4effbe Add SM2 ZID support 2018-08-07 20:25:04 +08:00
Zhi Guan 028d209985 Update GmSSL-Go test 2018-08-07 20:00:43 +08:00
Zhi Guan e938a71edf Add SSL support to GmSSL-Go 2018-08-07 14:37:49 +08:00