Skip to content
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 ECDSA #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ decred-tx, ipld, 0xe1, Decred Tx
ipld-ns, namespace, 0xe2, IPLD path
ipfs-ns, namespace, 0xe3, IPFS path
swarm-ns, namespace, 0xe4, Swarm path
ECDSA, multihash, 0xec, ECDSA signature
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wouldn't be a multihash, it would be a signature. So we're on the same page, how are you planning on using this codec to identify ECDSA signatures?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have plans on doing a “multisign” at some point?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do but it's unclear how this should look. The signature algorithm is usually a property of the key, not the signature, and libp2p actually has an ECDSA key type.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on clojure implementation of multisig and multikey.
Multikey is for expressing public keys and would look like this: algo+length+x509encodedKey
Where algo is ecdsa, rsa, or other, length is length of x509encodedKey.

Multisig is for expressing signatures and would look like this: algo+length+signatureBytes
Where algo could be sha256-with-ecdsa.

Unlike with multihashes, it would not be possible to compare payloads for equality (as signature may be different for the same data each time the signature is calculated), but having a public key it would still be possible to verify the signature.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, ECDSA is a bit too generic. For example, how do you distinguish between secp256k1 and r1?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you still need curve params if you have x509encodedKey as part of multikey?

ed25519-pub, key, 0xed, Ed25519 public key
dash-block, ipld, 0xf0, Dash Block
dash-tx, ipld, 0xf1, Dash Tx
Expand Down