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

Add ECDSA #125

wants to merge 1 commit into from

Conversation

mathiasrw
Copy link

@mathiasrw mathiasrw commented Mar 29, 2019

Elliptic Curve Digital Signature Algorithm or ECDSA is a cryptographic algorithm used by many most?) blockchains to sign data.

Would love to use multicodec for my work with the BSV blockchain so please have a look at toe one line PR.

@ghost ghost assigned Stebalien Apr 25, 2019
@ghost ghost added the in progress label Apr 25, 2019
Elliptic Curve Digital Signature Algorithm or ECDSA is a cryptographic algorithm used by Bitcoin to ensure that funds can only be spent by their rightful owners.
@@ -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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants