Coder Social home page Coder Social logo

Comments (6)

Apollon77 avatar Apollon77 commented on May 13, 2024

Another place ...

2023-07-24 13:29:07.581 ERROR Controller error:0680008E:asn1 encoding routines::not enough data
    at Sign.sign (node:internal/crypto/sig:131:29)
    at CryptoNode.signPkcs8 (/home/ingof/matter.js/packages/matter-node.js/dist/crypto/CryptoNode.js:115:44)
    at Crypto.signPkcs8 (/home/ingof/matter.js/packages/matter.js/dist/cjs/crypto/Crypto.js:46:68)
    at Fabric.sign (/home/ingof/matter.js/packages/matter.js/dist/cjs/fabric/Fabric.js:78:35)
    at CaseClient.<anonymous> (/home/ingof/matter.js/packages/matter.js/dist/cjs/session/case/CaseClient.js:80:42)
    at Generator.next (<anonymous>)
    at fulfilled (/home/ingof/matter.js/packages/matter.js/dist/cjs/session/case/CaseClient.js:10:58)

from matter.js.

Apollon77 avatar Apollon77 commented on May 13, 2024

Question: Is the the incoming data (eg keys or such) that have insufficient data/quality or is it the sign process that has an issue ...

from matter.js.

lauckhart avatar lauckhart commented on May 13, 2024

IIRC we're creating a pkcs8 envelope by concatenating a static asn.1 prefix and a raw key. The actual matter payload doesn't actually use pkcs8... So asn.1 errors may be an issue with the input not matching the (very rigid) format described by the header.

I'd need to look at the code to refresh my memory but I think I may have discarded the pkcs8 stuff and just used JSON web key to convey keys to node. LMK if you want me to check that.

from matter.js.

Apollon77 avatar Apollon77 commented on May 13, 2024

For now it happens here and there and no idea why and when (maybe we create a key by changce with a leading "0x00" or such ... but in order to check that we need to add more logging ... or change it completely (but this is later Crypto reafactoring). for now I would add a catch and log all params in order to maybe get an idea

from matter.js.

Apollon77 avatar Apollon77 commented on May 13, 2024

I added logging in the PR #251

from matter.js.

Apollon77 avatar Apollon77 commented on May 13, 2024

Ok logging will be removed before merge. Reason is that the private key as Buffer sometimes has 31 instead of 32 bytes ... whyever. We wil add a hack workaround for now in extra PR and proper solve it later in Cryptro refactor.

from matter.js.

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.