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

Verifiably unpredictable ids (revised) #8

Closed
wants to merge 9 commits into from

Conversation

rendaw
Copy link

@rendaw rendaw commented Aug 15, 2015

To continue our conversation from the previous ticket,

I'd be interested in seeing what some other projects are doing. In my project, I sign the values and include a hash of the signing key's fingerprint in the key.

However, without changes at the protocol level it's still possible for malicious entities to intercept traffic. If an application signs and validates values then a hostile node can't forge data, but it can deny the existence of data which is enough to censor the network.

This patch changes node ID generation and adding to the routing table.

Each node creates a secret value (the seed). From that, it creates a private signing key and a public verification key. The node's ID is (hash of the verification key, the verification key).

When the local node encounters a new remote node, it sends a challenge message (random) to the new node. The new node signs the challenge and sends the signature. The local node validates the signature before adding the node to its routing table.

This serves two functions. As with the previous patch, because the ID value used for routing is a hash, a malicious entity cannot choose it freely, say, to match the key of a known value. Secondly, completing the challenge to new nodes requires knowledge of the secret key, so a malicious entity couldn't craft a node to impersonate another known node.

This is a significant departure from the original paper so I'd understand if it's not the sort of thing you want to include here. I think censorship is a concern for many use cases though, so it may be of practical interest.

And, as with the previous patch, I'm not a security expert so please take this with a grain of salt.

@bmuller
Copy link
Owner

bmuller commented Aug 17, 2015

Thanks @rendaw! I'll take a look when I get a chance.

@bmuller
Copy link
Owner

bmuller commented Jan 12, 2019

Been a long while, but I finally had a chance to look at these suggestions. I think at this point the library is flexible enough that many of these could be implemented at the storage level (via a custom storage class, which the lib supports). In the aggregate, I think that functionality could exist as a separate library that uses this one to add unpredictable ids. Please feel free to reopen if you still see a need and want to discuss. Thanks!

@bmuller bmuller closed this Jan 12, 2019
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.

2 participants