Comments (6)
你是指sm2withsm3的hash吧, sm2的签名的hash使用的就是sm2withsm3,
/src/sm/RtSm2.php 的 301行中 做的hash就是sm2withsm3
'''
protected function _doS3Hash( $document, $pubKeyX, $pubKeyY, $generator, $userId ) {
$hasher = new Sm2WithSm3();
$hash = $hasher->getSm3Hash( $document, $pubKeyX, $pubKeyY, $generator, $userId );
return gmp_init( Hex2ByteBuf::ByteArrayToHexString( $hash ), 16 );
}
'''
from phpsm2sm3sm4.
不是的 , 是签名就采用SM2withSM3签名算法,签名方式为PKCS#1裸签名 , 同时验签也是用的SM2withSM3
from phpsm2sm3sm4.
这个就不太知道了,你试下,我觉得就是 我说的那个,裸签名就是 $hash = $hasher->getSm3Hash( $document, $pubKeyX, $pubKeyY, $generator, $userId ); 这个值, bin2hex($hash)
from phpsm2sm3sm4.
或者你 给个例子,我试下是哪种签名
from phpsm2sm3sm4.
感谢感谢 , 已经实现了->doSign就可以直接签
from phpsm2sm3sm4.
哦,看来是在在命名上理解差异的问题 ^_^
from phpsm2sm3sm4.
Related Issues (20)
- 和java对接,SM2无法解密数据 HOT 3
- sm2对接java无法解密 HOT 4
- 怎么无法下载扩展呢composer HOT 1
- sm2怎么取消asn1签名 HOT 4
- 你好大佬 我用你的验证包 和https://const.net.cn/tool/sm2/verify/ 这个网站相互验签总是失败怎么回事 HOT 2
- 您好,对接的是浦发的sm2 HOT 4
- 关于招行的验签 HOT 3
- SM2解密求助 | PHP对接Java HOT 6
- 关于招行某些接口的数字信封加密 sm2解密失败问题 HOT 10
- 请问服务器openssl版本需要多少能正常使用sm2加密解密呢? HOT 6
- 还是招行问题,看完了issue没有理解,求大佬解答,感谢 HOT 11
- 对接招行CBS8,Invalid Sign HOT 19
- sm2加密公钥 HOT 3
- 可以再发布一个最新的版本么? HOT 4
- 1.0.7版本 不兼容 以前版本 HOT 4
- RtSm2 verifySignOutKey方法返回值标注应为 bool HOT 1
- 与 Go 语言的 demo 调试不通 HOT 2
- pkcs8 格式私钥 怎么转换 pkcs1格式呢? HOT 12
- 问个问题:JAVA中的SM3WITHSM2,在这个项目中要如何调用、配置? HOT 1
- 再问个问题我的私钥是pfx后缀的,跟代码里的公私钥不一样,要怎么处理? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpsm2sm3sm4.