kubo icon indicating copy to clipboard operation
kubo copied to clipboard

secp256k1 key support is missing pem-pkcs8-cleartext import/export

Open lidel opened this issue 1 year ago • 6 comments

Seems https://github.com/ipfs/kubo/pull/9830 was missing a test for --format :)

cc @Jorropo @imthe1

Installation method

built from source

Version

0.20.0-dev

Description

$ ipfs key gen --type=secp256k1 key_secp256k1
$ ipfs key export key_secp256k1 -f pem-pkcs8-cleartext --output key.pem
Error: marshalling key to PKCS8 format: x509: unknown key type while marshaling PKCS#8: *crypto.Secp256k1PrivateKey

lidel avatar May 31 '23 23:05 lidel

See I was right, I heard about it !

@imthe-1 could you please take a look else I would have to revert for 0.21 ? Sounds easy to fix and add the missing test :'(

I've grepped for Ed25519 and it seems you also missed this too :slightly_smiling_face: https://github.com/ipfs/kubo/blob/67e1a173fcde1b7c4b09464184aea8ef86bedab2/config/init.go#L202

Jorropo avatar May 31 '23 23:05 Jorropo

sure @Jorropo

imthe-1 avatar Jun 01 '23 07:06 imthe-1

I think it is fine to release rcs with this bug, but if a PR fixing this is not merged when we do the final 0.21 we will revert 67e1a173fcde1b7c4b09464184aea8ef86bedab2. Then PR could be reopenned if anyone want to pick this up.

Jorropo avatar Jun 02 '23 17:06 Jorropo

@Jorropo i am on it now...any rough idea on when we plan to release v0.21?

imthe-1 avatar Jun 05 '23 09:06 imthe-1

@imthe-1 today but I have blocking issues still open so as long as I'm not finished on that it won't happen. I also have a big 0.21 review queue.

Probably Thursday

Jorropo avatar Jun 05 '23 09:06 Jorropo

@imthe-1 Are you still working on this / do you need help with it?

I was using this functionality, updated my install and poof! Need it back and am willing to write code / tests as required.

TJKoury avatar Jan 31 '24 19:01 TJKoury