-
-
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
Enable generating secp256k1 keys in the cli #7965
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
Feel free to make a PR, there's no good reason not to support it. The main downsides are that it's not frequently used and not as well tested as RSA and ed25519. Secp256k support exists just in case someone needs it for existing keys. It enables better interop with, e.g., Ethereum. I'm actually a bit curious, what's your use-case? |
Basically, trying to get IPNS working between js-ipfs, go-ipfs, using all key types available to each. Right now it seems like IPNS only works for go-ipfs using RSA keys, I can't even get it to work between go nodes using ED25519, and can't get it to work at all in js-ipfs (though the pub-sub route looks promising, between nodes in the same app). I figure a good first step is to make sure both js-ipfs and go-ipfs are able to at least generate |
That's very strange. What IPNS ID did you use? Did it look like Qm... or 1...? |
Ok, it does seem to be working with both keys in go-lang. Wth go-ipfs, using an RSA or ED25519 key: Content at /ipfs/QmNxNnK6Z3RJjnpfwsLtDdgRPRLZ5o9RkGhBkLbPDnXAsE IPNS record RSA |
With js-ipfs, with RSA (same file): No dice. Same with ED25519 and secp256k1. |
How did you publish this in js-ipfs? Last I checked, the js-ipfs DHT
wasn't completely finished/compatible. Are you doing this from Node or a
browser? Are you able to resolve these records from other js-ipfs nodes?
|
Node & browser. I can resolve the files, but no, not the IPNS record. |
It's unlikely to work from the browser (the DHT generally doesn't work well there). However, It should work from Node. If you publish an IPNS record in one Node node, can you resolve it in another? If you publish an IPNS record in go? Can you resolve it from js-ipfs (Node)? |
Publish doesn't work, full stop, using Ubuntu 18.04 LTS, Node 15, js-ipfs 0.54.2. Running two physical servers, both can see each other ( Both can resolve their own IPNS hash. Branch started here:
|
Go-IPFS can also see the the peers but fails after about 30 seconds with the go-equivalent error So it does not appear that the latest version of js-ipfs works. I have not tried previous versions to see if it is a regression. |
This is likely due to DHT issues and/or incompatibilities in js-ipfs. Last time I checked, the DHT wasn't enabled by default anyways. |
I did force dht to be enabled by setting in the config |
The method GenerateSecp256k1Key already exists in the go-libp2p-crypto library, integrating it here should be trivial.
I can work on a pull if there is not a good reason it has not be integrated yet, or if it has and I am misunderstanding the current implementation.
The text was updated successfully, but these errors were encountered: