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

public key derivation from private key stored in go-ipfs config file #4

Merged
merged 15 commits into from
Feb 14, 2016

Conversation

nginnever
Copy link
Contributor

The output currently does not pass the assertion that the base64 encoded protobuf of the public key derived from the go-clients config actually matches the go clients public key hard coded into the test.

The issue may be with the way forge is creating the DER buffer, note that it seems to buffer a buffer at one point.

This does seem capable of unmarshalling the base64 encoded protobuf private key stored in the go config file when it grabs the modulus and exponent values before creating the public key from them.

Edit: Output now matches

})
}

if(type == 'Private'){
Copy link
Member

Choose a reason for hiding this comment

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

===

@daviddias
Copy link
Member

@nginnever Gave some input, thank you for making this :)

Also, will you change the tests to WebPack and Mocha on this PR?

@@ -6,7 +6,10 @@ peer-id JavaScript implementation

# Description

A IPFS Peer Id is based on a sha256 has of the peer public key, using [multihash](https://github.com/jbenet/multihash)
A IPFS Peer Id is based on a sha256 hash of the peer public key, using [multihash](https://github.com/jbenet/multihash)
Copy link
Member

Choose a reason for hiding this comment

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

thank you for catching this :)

@daviddias
Copy link
Member

Looks pretty good! Just a few nitpicks and will merge and release :D Thank you @nginnever, you are awesome!

@nginnever
Copy link
Contributor Author

think i hit everything, let me know if i missed something or if you want me to squash the commit chain i just made lol

daviddias added a commit that referenced this pull request Feb 14, 2016
public key derivation from private key stored in go-ipfs config file
@daviddias daviddias merged commit 1f72aaf into libp2p:master Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants