Git Product home page Git Product logo

Comments (7)

da1nerd avatar da1nerd commented on September 4, 2024

https://github.com/unfoldingWord-dev/sigadd/blob/master/index.py#L40 will provide the link to grab the appropriate public key for verification.

from sigadd.

da1nerd avatar da1nerd commented on September 4, 2024

can you take a look at this if you get a chance.
Note: we don't need to strip out the org or sig from the si file. I tested it on some some older keys and signatures. However, I can't get this working for sha384.

I'm getting

Error Verifying Data
9664:error:0606C06E:digital envelope routines:EVP_VerifyFinal:wrong public key type:p_verify.c:85:

from sigadd.

da1nerd avatar da1nerd commented on September 4, 2024

The key does appear to be correct.

λ openssl asn1parse -in 1426811019.22.pem
    0:d=0  hl=2 l= 118 cons: SEQUENCE
    2:d=1  hl=2 l=  16 cons: SEQUENCE
    4:d=2  hl=2 l=   7 prim: OBJECT            :id-ecPublicKey
   13:d=2  hl=2 l=   5 prim: OBJECT            :secp384r1
   20:d=1  hl=2 l=  98 prim: BIT STRING

from sigadd.

da1nerd avatar da1nerd commented on September 4, 2024

part of the issue was my openssl version. I updated it to 1.0.1e and am now left with

Error Verifying Data
12920:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1319:
12920:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:381:Type=ECDSA_SIG

from sigadd.

da1nerd avatar da1nerd commented on September 4, 2024

If I base64 decode the signature first then I just get a Verification Failure.
I pushed those changes.

from sigadd.

jag3773 avatar jag3773 commented on September 4, 2024

Signature needs to be base64 decoded before running it through openssl.

from sigadd.

da1nerd avatar da1nerd commented on September 4, 2024

facepalm. I was using the SI signature instead of the content signature. Oops!

from sigadd.

Related Issues (6)

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.