1831 Commits

Author SHA1 Message Date
Sun Yimin
5aacbc2011
Merge pull request #324 from hrimfaxi/main
sm9: Prevent PublicKey() returning nil after unmarshaling master priavate key
v0.30.1
2025-04-15 17:31:55 +08:00
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
1dc82305e4
Merge pull request #323 from emmansun/dependabot/go_modules/golang.org/x/crypto-0.37.0
build(deps): bump golang.org/x/crypto from 0.36.0 to 0.37.0
2025-04-08 09:28:54 +08:00
dependabot[bot]
ed256a9ea3
build(deps): bump golang.org/x/crypto from 0.36.0 to 0.37.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.36.0 to 0.37.0.
- [Commits](https://github.com/golang/crypto/compare/v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 00:52:59 +00:00
Sun Yimin
d8c6788e8f
sm2, sm2ec: remove useless codes since go 1.19 2025-04-07 13:10:09 +08:00
Sun Yimin
0ef30b3ab5
internal/zuc: supplement comments v0.30.0 2025-04-03 10:40:06 +08:00
Sun Yimin
d3eece5560
cfca: fix test cases #322 2025-04-01 17:06:47 +08:00
Sun Yimin
0af92d8e48
smx509: CFCA CSR supports RSA keys #322 2025-04-01 17:02:13 +08:00
Sun Yimin
bf644fbb4e
docs/zuc: add seekable stream part 2025-03-28 17:19:19 +08:00
Sun Yimin
359b46453b
internal/zuc,zuc: eea seakable stream support zuc states cache per bucket #321 2025-03-28 16:53:29 +08:00
Sun Yimin
b8d52dd11d
internal/sm9/bn256: make gfP.Unmarshal constant time 2025-03-26 16:37:04 +08:00
Sun Yimin
9ea8293d10
internal/sm2ec/fiat: fix error message 2025-03-26 15:20:30 +08:00
Sun Yimin
e8a847e005
internal/sm9/bn256: remove useless code 2025-03-26 09:49:30 +08:00
Sun Yimin
a7c4473a48
internal/sm9/bn256: reduce big.Int usage 2025-03-26 09:30:39 +08:00
Sun Yimin
11d0438cc4
internal/sm9: reduce usage of big.Int 2025-03-25 17:19:10 +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
dd69d32930
drbg: replace with for range 2025-03-25 08:49:56 +08:00
Sun Yimin
a84fec09af
internal/cpu: move to internal/deps/cpu #310 2025-03-21 10:04:35 +08:00
Sun Yimin
c43e0488a6
cbcmac: fix typo 2025-03-21 08:38:59 +08:00
Sun Yimin
a4affe6006
cbcmac,padding: supplement/update comments 2025-03-20 16:34:19 +08:00
Sun Yimin
3cc92436ee
padding: fix "Size computation for allocation may overflow" 2025-03-19 11:16:26 +08:00
Sun Yimin
93c965f3c1
cipher: move xts detail implementation to internal #320 2025-03-19 10:21:52 +08:00
Sun Yimin
d8eb166dfc
cbcmac: enable provided padding for EMAC/ANSI Retail MAC/MAC-DES/LMAC #319 2025-03-19 10:10:00 +08:00
Sun Yimin
2d3329a2ea
padding: missing PaddingFunc #319 2025-03-18 11:44:45 +08:00
Sun Yimin
f41a5c69e7
cbcmac: CBCMAC enable provided padding method #319 2025-03-18 11:41:04 +08:00
Sun Yimin
cf027254dc
update README #319 2025-03-18 11:27:28 +08:00
Sun Yimin
069babe703
padding: implement ISO IEC9797-1 padding method 3 #319 2025-03-18 11:21:48 +08:00
Sun Yimin
5734e67634
internal/cpu,internal/sm9: refactor and fix 2025-03-17 17:18:58 +08:00
Sun Yimin
82ccb95527
sm9,internal/sm9: update comments #314 2025-03-14 15:26:34 +08:00
Sun Yimin
e79aab4935
smx509: better handling of weird encodings #316 2025-03-14 08:44:52 +08:00
Sun Yimin
c32a9849f8
sm9: refactoring #314 2025-03-13 16:50:28 +08:00
Sun Yimin
7ec46d700d
internal/subtle: remove xor related codes #315 2025-03-13 15:20:05 +08:00
Sun Yimin
7a5253bfb5
change to use go's own XORBytes function #315 2025-03-13 15:15:46 +08:00
Sun Yimin
d6f18a2cbf
fix CI 2025-03-13 14:44:56 +08:00
Sun Yimin
bdb169b06b
sm9: refactoring, do not expose bn256 types to caller #314 2025-03-13 14:14:45 +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
e9692d23ab
zuc: remove useless constants 2025-03-11 16:26:41 +08:00
Sun Yimin
21f96e536b
internal/zuc: fix build error 2025-03-11 16:13:59 +08:00
Sun Yimin
a49eecd572
zuc: move implementation detail to internal 2025-03-11 16:11:18 +08:00
Sun Yimin
537c80a28b
sm3: move implementation detail to internal 2025-03-11 14:02:47 +08:00
Sun Yimin
5edcb0f966
sm4: move implementation detail to internal 2025-03-11 11:43:49 +08:00
Sun Yimin
65a69ad83c
internal/bigmod: explicitly clear expanded limbs on reset #313 2025-03-11 08:58:16 +08:00
Sun Yimin
71b196a5ac
Merge pull request #312 from emmansun/dependabot/go_modules/golang.org/x/crypto-0.36.0
build(deps): bump golang.org/x/crypto from 0.35.0 to 0.36.0
2025-03-11 08:20:58 +08:00
dependabot[bot]
500cb8a418
build(deps): bump golang.org/x/crypto from 0.35.0 to 0.36.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.35.0 to 0.36.0.
- [Commits](https://github.com/golang/crypto/compare/v0.35.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 23:41:37 +00:00
Sun Yimin
762cbbf0c6
ci: check macOs 2025-03-05 15:09:15 +08:00
Sun Yimin
9d6f8087f9
internal/cpu: correct import #310 2025-03-05 15:03:21 +08:00
Sun Yimin
a6d8014ac9
internal/cpu: missing one #310 2025-03-05 14:58:28 +08:00
Sun Yimin
d7a6169fbf
internal/cpu: import codes from golang.org/x/sys/cpu #310 2025-03-05 14:54:51 +08:00
Sun Yimin
67f187b1d3
sm4: define & use type KeySizeError 2025-03-05 10:56:13 +08:00