We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
so I eventually have a private key handed to me as PEM. For my tests, I generated a key as follows:
openssl ecparam -name secp256k1 -genkey -noout -out priv_k.pem
I am then converting it to JWK, and generating a public key (both openssl and publicKeyJWKToPEM yield the same result, so I am confident this works).
Then I am trying to convert to secp256k1 key pair to use as DID document, so I'm using this method from @transmute: https://github.com/transmute-industries/verifiable-data/blob/main/packages/secp256k1-key-pair/src/getPublicKeyFromPublicKeyJwk.ts#L3, which uses secp256k1-node under the hood
but this fails with the following error:
Public Key could not be parsed
as this check fails: https://github.com/cryptocoinjs/secp256k1-node/blob/master/lib/elliptic.js#L39. I am not a cryptographer so I don't off the bat understand what it's supposed to check.
Here is my private key as JWK:
{ "kty": "EC", "crv": "K-256", "d": "r-MRT1Jq7PgvtmMtiEr_lFgE6iPGkl9pW2kU10F88q4", "x": "O4bF2wCslKVW0adio9s4fhSrq4h4_tw9IGNmc93oBas", "y": "O9hHmm9rRFWHv3vI4TWsqPxMXKp570_MU71XCLtjkEs" }
Can you guide me towards the light here? Where is the data wrong?
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
so I eventually have a private key handed to me as PEM. For my tests, I generated a key as follows:
I am then converting it to JWK, and generating a public key (both openssl and publicKeyJWKToPEM yield the same result, so I am confident this works).
Then I am trying to convert to secp256k1 key pair to use as DID document, so I'm using this method from @transmute: https://github.com/transmute-industries/verifiable-data/blob/main/packages/secp256k1-key-pair/src/getPublicKeyFromPublicKeyJwk.ts#L3, which uses secp256k1-node under the hood
but this fails with the following error:
as this check fails: https://github.com/cryptocoinjs/secp256k1-node/blob/master/lib/elliptic.js#L39. I am not a cryptographer so I don't off the bat understand what it's supposed to check.
Here is my private key as JWK:
Can you guide me towards the light here? Where is the data wrong?
Thanks
The text was updated successfully, but these errors were encountered: