Skip to content

Stop Believing LiarsΒ #821

@dnwiebe

Description

@dnwiebe

Background: Here's how connecting a Node into the network works:

Debuting Node D sends Debut Gossip (containing data for Node D) to existing Node E.

Node E checks to see if D has any neighbors. It doesn't, so Node E adds D to its neighborhood database, selects its neighbor N to introduce, and sends Introduction Gossip (containing data for Nodes E and N, revealing the IP address of N) to Node D.

Node D examines the Introduction Gossip and identifies E as the introducer and N as the introducee. It adds E to its neighborhood database and sends Debut Gossip (containing data for Node D) to N.

Node N checks to see if D has any neighbors. It does (E), so instead of sending Introduction Gossip, N just adds D to its neighborhood database and sends Standard Gossip, revealing no new IP addresses to D.

Problem: See the phrase "checks to see if D has any neighbors" above? That's the problem. The way E and N check to see if D has any neighbors is to look at the Debut Gossip sent by D. If D claims in that Gossip to have neighbors, then it gets Standard Gossip; if it claims to have no neighbors, it gets Introduction Gossip containing a new Node's IP address. An evil Node could simply send a series of Debuts, always claiming to have no neighbors, and use Introductions (or Passes) to traverse a big chunk of the network and harvest IP addresses.

Solutions and Pitfalls:
One apparent solution is for E and N to check their neighborhood databases to see how many neighbors D has, rather than trusting its Gossip. The pitfall here is that all Gossip is signed by the originator: therefore, the NodeRecords they have in their databases are exactly the same as the Gossip they were sent; there's no benefit.

This could be circumvented by counting not the number of arrows D claims are coming out of it, but the number of arrows other Nodes in the database claim are going into it. That is, half-neighborships from X to D, where X is any other Node in the database. The problem with this is that if incoming half-neighborships disqualify a Node from having other Nodes introduced to it, then A) you're opening another attack surface where evil Nodes can prevent other Nodes from becoming well-connected by claiming half-neighborships with them as soon as they appear in the evil Nodes' databases, and B) a Node that has just broken a full neighborship with an evil Node will be disqualified from connecting to a replacement.

I can't think of any other solutions. Can you?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    πŸ“‹ Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions