xuyang2

Results 30 comments of xuyang2

context 在 Go 1.7 版就被纳入官方标准库了,而 https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/go.mod 声明的已经是 `go 1.13` 如果想保持 API 兼容性的话,可以仿照标准库的做法,比如: ```go package net func (d *Dialer) Dial(network, address string) (Conn, error) { return d.DialContext(context.Background(), network, address) } ```

@smallmenu maybe you can setup a dedicated logger for the recovery middleware to use - https://github.com/uber-go/zap/issues/586 - https://stackoverflow.com/questions/50933936/zap-logger-print-both-to-console-and-to-log-file

> ...,因为sm2的曲线解析逻辑尚在开发规划中,而这部分的go的实现难以简单的通过babassl调用实现功能。 FYI: 发现几个 Go assembly 汇编优化过的商密算法实现库 - https://github.com/emmansun/gmsm - https://github.com/Hyperledger-TWGC/tjfoc-gm ([#54](https://github.com/Hyperledger-TWGC/tjfoc-gm/issues/54)) 也许后面你们可以借鉴参考一下 @william-zk

请问 MOSN 的国密TLS 有没可能支持使用纯go 的开源库呢,感觉 CGO 的坑比较多。 比如用 build tag 来切换 `babassl`/`gmsm` 。。。 现在有个 Go Assembly 的高性能商用密码算法实现库了: https://github.com/emmansun/gmsm

一般似乎都是将 Y 坐标的最后一位加上 0x02 作为前缀值,这样前缀将是 0x02 或 0x03 tjfoc/gmsm 之前也是这么实现的, 后来才修改成现在这样,把 +2 去掉了,前缀变成 0x00 或 0x01 了 见 1310b78e5f1f9016f729cce70e766de0a84cdc07 相关资料和代码实现: - https://tools.ietf.org/html/rfc5480 - https://tools.ietf.org/id/draft-jivsov-ecc-compact-05.html - https://stackoverflow.com/a/30431547/399274 - https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm - https://stackoverflow.com/questions/46283760/how-to-uncompress-a-single-x9-62-compressed-point-on-an-ecdh-p256-curve-in-go...

相关 issues - https://github.com/tjfoc/gmsm/pull/129 - https://github.com/tjfoc/gmsm/issues/102

建议内部换成直接用 完成度高的 [github.com/emmansun/gmsm/sm4](https://pkg.go.dev/github.com/emmansun/[email protected]/sm4) 然后把 [github.com/tjfoc/gmsm/sm4](https://github.com/tjfoc/gmsm/tree/master/sm4) 标为 deprecated 不维护 提了个 PR #157 @czdsdo

给 `gmtls/gm_handshake_client_double.go` 加上 `// +build !single_cert` 之后, 编译仍然报错: ``` ~/code/github.com/tjfoc/gmsm (master) $ go build -tags single_cert ./... # github.com/tjfoc/gmsm/gmtls gmtls/auto_handshake_server.go:172:10: cannot use []Certificate literal (type []Certificate) as type *Certificate in...

@luojia65 搜了一圈,好像只有工标网有 [GM_T 0005-2021 随机性检测规范 -工标网](http://www.csres.com/detail/372245.html)

> GMT 0017的规范少了两页,即页码84和85这两页,对应的章节为9.6.28.4~9.6.30.2 可以去 http://www.gmbz.org.cn/main/bzlb.html 找找看