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

Are peerinfo objects authenticated? #73

Open
wanderer opened this issue Feb 9, 2016 · 4 comments
Open

Are peerinfo objects authenticated? #73

wanderer opened this issue Feb 9, 2016 · 4 comments
Labels
kind/question A question or request for support

Comments

@wanderer
Copy link
Member

wanderer commented Feb 9, 2016

Are peerinfo objects authenticated? I am assuming each peerinfo object contains a map of services to multiaddresss. Does it also contain a signature on the corresponding map from the peer?

@daviddias daviddias added the kind/question A question or request for support label Mar 14, 2016
@daviddias
Copy link
Member

Peers are authenticated when they perform the TLS like handshake between each other. That isn't audited yet but it will be.

PS: This question would fit the ipfs/faq repo best

@wanderer
Copy link
Member Author

@diasdavid so in discovery you get a mappings of publicKey to peerinfo objects, correct? The attack I'm worried about is a malicious actor trying to poison the peer table. So it would start broadcasting know/trusted publicKeys but with bad endpoints.. possible with to endpoints it controlled. If the bad actor was an authoritarian regime it could use this to locate the ip all the nodes that trusted a given set of publicKeys.

The way to prevent this is not to broadcast publicKeys but to broadcast signature(peerObject): peerObject. And each node would derive the publicKey from the signature with the guarantee that only that id could have produced it

@daviddias
Copy link
Member

@wanderer the solution you describe is what happens in the TLS/secio handshake, a challenge is created, a nounce has to be signed and only the node able to sign(nounce, privKey) that verify(signedNounce, pubKey) validates, is the owner of the key pair that leads to peer-Id QmABCDEFHASH. Note that the Id of a peer is always a multihash of its public key

@wanderer
Copy link
Member Author

TLS/secio handshake

Right @diasdavid I'm not concerned about the actual connection here. I'm concerned about poisoning the peer table. An attacker may only want to locate peers. Not connect to them, so a failed handshake would be fine from the attacker's point of view.

But you can have verfication in the peer table. All you have to do though is add a signature to the peer routing/ peer table. so for example findPeers would give you a list of ids:endpoints that also contained a signature by the id (publickey). If you were a security focused node you might only have a whitelist of ids that you would connect to, therefore thwarting any attempt to reveal your IP by poising the peer table Does this make sense? Does this concern make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question A question or request for support
Projects
None yet
Development

No branches or pull requests

2 participants