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

multicodec: add IPLD codec for libp2p public keys #131

Merged
merged 1 commit into from May 27, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented May 13, 2019

This is specifically for the protobuf-encoded libp2p key format:

enum KeyType {
	RSA = 0;
	Ed25519 = 1;
	Secp256k1 = 2;
	ECDSA = 3;
}

message PublicKey {
	required KeyType Type = 1;
	required bytes Data = 2;
}

Required for converting a peer ID into a CID (for base32-encoded IPNS).

fixes #130

This is specifically for the protobuf-encoded libp2p key format:

```proto
enum KeyType {
	RSA = 0;
	Ed25519 = 1;
	Secp256k1 = 2;
	ECDSA = 3;
}

message PublicKey {
	required KeyType Type = 1;
	required bytes Data = 2;
}
```
@Stebalien Stebalien requested a review from lidel May 13, 2019 21:44
@ghost ghost assigned Stebalien May 13, 2019
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

LGTM, but see my question in ipfs/kubo#5287 (comment) in case the answer impacts this in any way.

@Stebalien Stebalien merged commit 11de049 into master May 27, 2019
@Stebalien Stebalien deleted the feat/libp2p-pubkey branch May 27, 2019 17:08
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.

Add multicodec for libp2p key
3 participants