Comments (4)
from gmssl.
其实不存在你说的问题,参考ITU-T X.690/ITU-T X.680:
对于非NamedBitList,DER编码不会remove尾部的0 bits的。
你也可以参考:https://www.oss.com/asn1/resources/asn1-faq.html#named-bit-list-per
from gmssl.
是否是对问题的定位的问题,按你说的会少了00的问题,一般是非对称加密 如果使用asn1(c1x,c1y, c3,c2)的时候,解开后,会有小概率c1x或是c1y 的长度不够(asn1编码的时候会去掉原有前面的00),拼接为 c1c3c2的时候,就会出错,这时在解开后,长度不够就得把 \0x补上
from gmssl.
@emmansun 你说的没错,非NamedBitList,DER编码不会remove尾部的0 bits的,只是很多编码器默认是会remve尾部0(比如openssl的编码器)。
对于openssl,可以参考https://github.com/openssl/openssl/blob/1967539e212c17139dc810096da987c8100b1ba2/crypto/asn1/asn1_lib.c#L251 设置,不去除尾部的 0x00。
from gmssl.
Related Issues (20)
- 使用国密提供的cUrl工具(gmcurl_linux_x64)测试openresty+gmssl2.5.4国密双证书时,时通时不通,详细信息如下: HOT 2
- 您好,我想要一份开发者文档
- 可否调整WIndows版release可执行文件的依赖库 HOT 1
- 能否增加去除sm2私钥密码保护的功能
- V3.1.1使用windows 10 Visual studio 2022 编译时报错 HOT 1
- 按 README 所说无法得到 Linux 下的静态库 HOT 1
- 3.0比2.0的并发加解密性能低?
- 3.0比2.0的并发加解密性能低?
- 官网 403 HOT 1
- 加密证书签发问题
- 请问3.1.1版本是否支持AIX HOT 2
- Python的ssl加载证书出错
- 国密 tomcat已经验证没问题, 使用iOS 的GmSSL最新sdk访问 localhost 报错,访问其他国密地址没有问题
- sm2.h文件报不存在 HOT 2
- 请求新加全局控制打印函数的功能,可以使得gmssl库不打屏 HOT 1
- 请求添加类似openssl 的 sslPending 的函数接口
- 请求添加 获取 TLS_CTX 、TLS_CONNECT 的size的接口
- sm2_encrypt_demo.c运行解密失败 HOT 2
- win 下面 golang cgo编译 报/x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmssl HOT 1
- 可否在sm2_signtest.c添加secp256r1曲线的相关代码? HOT 4
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 gmssl.