Git Product home page Git Product logo

Comments (5)

wenyuan138 avatar wenyuan138 commented on June 9, 2024

同样的疑问,java端bouncycastle库的sm2签名之后,在gmsm无法验证

from gmsm.

wangzheyuan avatar wangzheyuan commented on June 9, 2024

我用gmsm 1.2.4能成功验证bouncycastle的sm2签名,用gmsm 1.3.1则验证失败。

from gmsm.

czdsdo avatar czdsdo commented on June 9, 2024

我用gmsm 1.2.4能成功验证bouncycastle的sm2签名,用gmsm 1.3.1则验证失败。

你核对一下java那边sm2签名使用的uid项。1.2.4能验过uid为空或为默认值的签名,1.3.1只能验证uid为默认值时的签名。按照标准uid应使用默认值。

from gmsm.

czdsdo avatar czdsdo commented on June 9, 2024

每次签名返回的签名值应该是不相同的,你可以尝试使用更高版本的。签名验证不通过多半是uid不一致导致的,你可以确认一下两边是否使用相同的uid

from gmsm.

wangzheyuan avatar wangzheyuan commented on June 9, 2024

我用gmsm 1.2.4能成功验证bouncycastle的sm2签名,用gmsm 1.3.1则验证失败。

你核对一下java那边sm2签名使用的uid项。1.2.4能验过uid为空或为默认值的签名,1.3.1只能验证uid为默认值时的签名。按照标准uid应使用默认值。

将uid修改为默认值,1.3.1的sm2.Sm2Verify可以成功验证的bouncycastle的sm2签名。但使用CheckSignature仍然验证失败,在CheckSignature中Sm2Verify使用的uid项是空,不是默认值。

from gmsm.

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.