Giter Site home page Giter Site logo

sm2签名的参数ID是什么? about gmssl HOT 5 CLOSED

guanzhi avatar guanzhi commented on May 18, 2024
sm2签名的参数ID是什么?

from gmssl.

Comments (5)

mrpre avatar mrpre commented on May 18, 2024 1

找到了:"SM2数字签名方案中被签名的杂凑值不仅仅是消息的杂凑值,而是签名者身份信息串联上消息的杂凑值,其中签名者身份信息是签名者的可辨别标识字串、椭圆曲线方程系数、生成元和签名者公钥串联后字串的杂凑值。SM2标准中并未说明签名者的可辨别标识字串格式及获得方式,应用可以采用X.509证书中的Subject字段、CN (CommonName)或自行规定。"

from gmssl.

guanzhi avatar guanzhi commented on May 18, 2024

GmSSL中默认ID字符串为16个字节的ASCII字符串[email protected],不包含末尾的0。国密标准文本中对默认值应该做了规定,可能是1234567812345678,准确值还需购买并参考标准文本。

from gmssl.

conezxy avatar conezxy commented on May 18, 2024

按照GM/T 0009-2012《SM2算法使用规范》最后一章节的定义。无特殊约定时采用1234567812345678的值。

国密SM2根CA和国密SSLVPN协议均采用此默认值。

建议在需要不同厂商互通的场合中采用该值。

掌晓愚

在 2016年8月29日,20:11,Zhi Guan <[email protected]mailto:[email protected]> 写道:

GmSSL中默认ID字符串为16个字节的ASCII字符串[email protected]:[email protected],不包含末尾的0。国密标准文本中对默认值应该做了规定,可能是1234567812345678,准确值还需购买并参考标准文本。


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/42#issuecomment-243106653, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AL-bhhYrFHrSlh8ih0CciMlXt4Eu8NyLks5qksx6gaJpZM4JvRjD.

from gmssl.

mrpre avatar mrpre commented on May 18, 2024

@conezxy @guanzhi 各位老师好,我看规范,在计算签名时,需要id+公钥+..等首先计算哈希值Za。然后再使用私钥进行签名。
那么在ECC流程中,即发送server key exchange 时我们需要签名,此时服务器端可以计算一个临时密钥对(即K 和 KG),使用KG进行哈希,使用K进行签名。但是server key exchange 本身并不会把自己计算的公钥发送给客户端,这意味着,客户端verify时,无法得到Za,即不能验证。

我是不是可以这么理解,ECC_SMxxx加密套件时,不生成临时密钥对,直接使用签名证书中的Point当做公钥KG、签名证书对应的私钥为K。这样客户端就能从证书中获取到KG?若非如此,那么客户端如何获取公钥?

from gmssl.

Jkinglyf avatar Jkinglyf commented on May 18, 2024

@mrpre 对于ECC序列加密套件,发送”server key exchange “时,利用签名证书对“双方随机数 + 加密证书”进行签名即可。不需要临时密钥对。

       对于 ECDHE序列加密套件,发送”server key exchange “时,需要临时密钥对,用于交换双方的曲线参数。

from gmssl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.