-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: adds secp256k1 keypair type to ipfs key gen command #9830
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, I think this deserves a test in https://github.com/ipfs/kubo/blob/master/test/sharness/t0027-rotate.sh and https://github.com/ipfs/kubo/blob/master/test/sharness/t0165-keystore.sh.
@imthe-1 are you still planning to work on this and add tests? If so, please rebase on the latest If you are not fan of bash, its ok to migrate/add relevant tests to https://github.com/ipfs/kubo/tree/master/test/cli (GO instead Bash). |
yes @lidel. will rebase and update the PR for sure. planning to close this by tomorrow. got it. thanks! |
c8a331b
to
7312920
Compare
@Jorropo @lidel guys I have added the test cases, rebased and updated the PR. 168 test cases got added in https://github.com/ipfs/kubo/blob/master/test/sharness/t0027-rotate.sh by only making some minor additions. Key import and export test cases are still missing since I ran into the following error when running the export command:
seems like the crypto/x509 library couldn't export secp256k1 private key in PKCS8 format. Please have a look and let me know if any further changes are required from my side🙏 Also, I am curious why do we have a openssl_secp384r1.pem file here(https://github.com/ipfs/kubo/blob/master/test/sharness/t0165-keystore-data/openssl_secp384r1.pem) and is the info mentioned in the readme(https://github.com/ipfs/kubo/blob/master/test/sharness/t0165-keystore-data/README.md) still valid? The t0165-keystore.sh file treats openssl_secp384r1.pem as an INVALID KEY. can you please help me understand its purpose please. |
7312920
to
ba64b99
Compare
ba64b99
to
c68bb88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, I havn't checked this is actually working myself but I belive I'll hear about it if it doesn't.
Thx for your patch ❤️ 🎉
@Jorropo : do we need a changelog update here? |
@BigLep it's a minor QOL, Ed25519 is still our recommended key type I don't want to push anyone to start using secp256k1 just because it's on a changelog. So yes, saying you now have the option. |
As per discussions with @2color we found out that we can not create secp256k1 IPNS keypairs as of now and since we can create k1 keypairs using js-ipfs/ipfs-core, we have add the ability here as well.
This might be helpful for projects, like ours, that want to derive their IPNS keypairs from a seed phrase.