You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens, as I understand it, because the point starts with 04 3f, which is asn1 for "a 63-byte bitstring", and the point is 64 bytes of (close to) random noise?
the sub-object arives at this Buffer.from call as an array:
I created this private key using node-jose, and then when I load it back into node jose using the
asKey
function, I get an error;This doesn't always happen, more often than not a private key is generated that works completely correctly.
The private key looks valid when I use the command
openssl ec -in broken-pem.pem -noout -text
to validate it.I'm on node
v16.14.2
but i've tried it on a lot of different node versions using runkit, and using version2.2.0
of node-jose.I'm generating the keys using;
which creates keys that work 99% of the time.
With the broken key
With a valid key generated in the same way;
This can happen for both public and private keys.
The text was updated successfully, but these errors were encountered: