-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conversation
}) | ||
} | ||
|
||
if(type == 'Private'){ |
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.
===
@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) |
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.
thank you for catching this :)
Looks pretty good! Just a few nitpicks and will merge and release :D Thank you @nginnever, you are awesome! |
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 |
public key derivation from private key stored in go-ipfs config file
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