-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add secp256k1 private key #210
Conversation
Discussion on the ed25519 private key is worth a read btw #194, note also @msporny's comments at the bottom which I think is worth highlighting and one reason for hesitancy with increasing ease of representation of private keys. That's not to say we shouldn't do this, just that this is stepping into risky territory. I think we should keep private keys in their own section, as mentioned in that thread and that lead to the placement of ed25519-priv, so I think this should be |
table.csv
Outdated
@@ -79,6 +79,7 @@ swarm-ns, namespace, 0xe4, draft, Swarm | |||
ipns-ns, namespace, 0xe5, draft, IPNS path | |||
zeronet, namespace, 0xe6, draft, ZeroNet site address | |||
secp256k1-pub, key, 0xe7, draft, Secp256k1 public key | |||
secp256k1-priv, key, 0xe8, draft, Secp256k1 private key |
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.
switch to 0x1301
and I'm +1 on this
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.
implemented in 016319e
@rvagg thanks for the review! @msporny and I have been having this argument for years :) Its not as much of an issue with JSON-LD when you can just pretend that not defining the term is somehow making it safer to to do this:
The "problem" with multibase... is that you can't not define the entry... and still use it to represent a private key... like you can with JSON-LD. Folks using JSON-LD with the alternative to defining |
Co-authored-by: Rod Vagg <[email protected]>
Reasoning:
There already exists and ed25519 priv key: https://github.com/multiformats/multicodec/blob/master/table.csv#L128
Without the ability to represent both public and private components of asymmetric key pairs users will be forced for do things like this:
This prevents efficient compression using multibase codecs.
We will likely need to add entries for NIST curves and BLS12381 as well.