YuanHongYe
fe532e12b4
sm9: Prevent PublicKey() returning nil after unmarshaling master private key
...
During unmarshaling of SignMasterPrivateKey and EncryptMasterPrivateKey,
now generate the corresponding public key.
This ensures that PublicKey() does not return nil.
Test cases included to validate the changes.
Signed-off-by: YuanHongYe <yuanhongye@chinatelecom.cn>
2025-04-15 17:01:27 +08:00
Sun Yimin
88df15c64c
sm9: implement crypto.Singer crypto.Decrypter interface
2025-03-25 14:58:16 +08:00
Sun Yimin
3eea15b3b8
internal/sm9,sm9: refactor all keys
2025-03-25 11:10:53 +08:00
Sun Yimin
82ccb95527
sm9,internal/sm9: update comments #314
2025-03-14 15:26:34 +08:00
Sun Yimin
c32a9849f8
sm9: refactoring #314
2025-03-13 16:50:28 +08:00
Sun Yimin
43ffd49e2f
sm9: refactoring, do not expose bn256 types to caller #314
2025-03-13 13:46:14 +08:00
Sun Yimin
a71e806a2d
sm9: code review
2024-12-17 18:06:15 +08:00
Sun Yimin
c4e0e39475
sm9: fix npe issue
2023-06-15 11:23:06 +08:00
Sun Yimin
a1b44f1a64
sm9: get around assignment copies lock value to issue
2023-06-15 11:17:51 +08:00
Sun Yimin
c477816aa7
sm9: use bigmod instead of math/big, part 2
2022-11-25 17:45:11 +08:00
Sun Yimin
a592631459
sm9: do not expose internal constants
2022-11-25 14:40:27 +08:00
Sun Yimin
d7e853277a
sm9: use bigmod instead of math/big
2022-11-25 10:11:46 +08:00
Sun Yimin
9ba3e69efc
update error messages
2022-10-24 17:32:56 +08:00
Sun Yimin
5db7e63360
provide convient methods to parse pkcs8 sm9 keys
2022-10-24 16:09:12 +08:00
Sun Yimin
d35482a358
pkcs8 sm9 master sign/encrypt private key support
2022-10-24 11:00:13 +08:00
emmansun
404cd10210
support sm9 key format with gmssl
2022-10-22 15:49:01 +08:00
Sun Yimin
05aeed5c34
sm9: marshal compressed
2022-08-09 10:01:34 +08:00
Sun Yimin
818cbc3757
misc: clean code
2022-07-28 10:01:30 +08:00
Emman
eb94980db3
run "gofmt -s -w"
2022-07-15 16:42:39 +08:00
Sun Yimin
81c0dbb0fa
SM9: refactoring, move separate SM9 & bn256
2022-06-16 10:14:45 +08:00
Sun Yimin
3320de17b8
SM9: supplement comment and sample test case
2022-06-16 08:46:28 +08:00
Sun Yimin
14af2513d8
SM9: G1 G2 support point compress
2022-06-15 15:17:16 +08:00
Sun Yimin
ccdb7b0568
supplement user key generation performance
2022-06-13 17:35:46 +08:00
Sun Yimin
d6a464f470
precompute part 2
2022-06-13 16:29:58 +08:00
Sun Yimin
f78fd3c105
precompute part 1
2022-06-13 13:50:27 +08:00
Sun Yimin
dff29c24c6
chang to use NAF method in miller loop
2022-06-10 14:44:51 +08:00
Sun Yimin
e8d3b67446
sm9 sign wrappkey encryption
2022-06-10 11:24:25 +08:00