-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crypro Error "not enough data" #212
Comments
Another place ...
|
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 ... |
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. |
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 |
I added logging in the PR #251 |
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. |
Replace key handling with a JS implementation that converts keys to standard JWK Key format. Streamlines the Crypto.ts API and removes the various formats and hacks we previously used to pass keys to Node's OpenSSL wrapper. fixes project-chip#212 could be considered phase 1 of project-chip#122
Here and there this error happens:
We should find out how to work areound that or at least catch-and-retry
The text was updated successfully, but these errors were encountered: