2.1.2 数字签名算法
发Fabric中默认采用ECDSA的签名算法,对应的国密算法是SM2,所以我们对应建立github.com/studyzy/crypto/ecdsa来替换系统库:crypto/...(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error)
func Verify(pub *PublicKey..., hash []byte, r, s *big.Int) bool
这里的参数PrivateKey和PublicKey是新包的,所以还需要做个和系统包的对象类似的实现。...= asn1.ObjectIdentifier{1, 2, 156, 10197, 1, 501} //oidSignatureSM2WithSM3
//oidNamedCurveP256 = asn1....ObjectIdentifier{1, 2, 840, 10045, 3, 1, 7}
oidNamedCurveP256 = asn1.ObjectIdentifier{1, 2, 156, 10197