Re: DHT specification questions

"pwang708" <[email protected]>
Newsgroups gmane.network.gnutella.devel
Message-ID <[email protected]>
Hello Raphael,

About the security token:

I think this link is where securityToken was introduced.
http://wiki.limewire.org/index.php?title=OutOfBandV3

This link tells us only two types of messages: findNodeResponse and
the following (in term of message sequence) storeRequest use
securityToken.
http://wiki.limewire.org/index.php?title=Mojito_Message_Format

Say node A finds a findNodeResponse (including the securityToken) to
node B who then sends a storeRequest (echoing the same securityToken)
trying to store at A. A checks the security token before process the
storeRequest further.

How does A compute and verify the securityToken? In general, anything
is fine as long as it is hard for other nodes to guess the
securityToken. In mojito's case, securityToken = MAC(B's IP). Mojito
uses TEA (Tiny Encryption Algorithm) to compute MAC. Since only A has
the key, nobody can guess the securityToken. In addition, A doesn't
need to store securityTokens.

Mojito does not assign a lifetime to a securityToken explicitly.
Instead, mojito node changes its keys periodically. So a securityToken
is valid as long as the key used to computer the MAC is not expired
yet. The period is 6 hours (+ 20 minutes grace period) in the current
setting.


About making republish efficient:

Note that anyway you will need to send findNode to find the current
replica roots (nodes responsible to store data for a given key),
because during the republish period there is a big chance that the
replica set changes. So nodes republishing get new securityTokens when
they receive findNodResponses. Of course, you can cache the old
replica roots to speed up findNode requests, hence speed up republish.


Best,
Peng


--- In [email protected], Raphael_Manfredi@... wrote:
>
> Hello,
> 
> After reading the message format Wiki page, I need to change the
followin
> question:
> 
> :* What is the SecurityToken? How does one compute it?
> 
> Indeed, on first reading I had missed the fact that a FIND_NODE would
> return the SecurityToken.
> 
> So I now understand what I need to do to generate a SecurityToken.  What
> I do not know however is this:
> 
> * Are all STORE required to provide a valid SecurityToken?
> * What is the lifetime of a SecurityToken?  A minute, a node session?
> * Shouldn't there by an explicit error code on STORE (say 0x3) to signal
>   to the remote node that the SecurityToken is rejected?  This gives a
>   chance to the node to get the new SecurityToken (e.g. if the lifetime
>   of the token is the session and the remote node went down and
restarted).
> 
> My belief is that to make republishing efficient, the lifetime of the
> token should be the remote node's session (i.e. once acquired, the
> token will enable many store requests).
> 
> Comments on that from LimeWire?
> 
> Raphael
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.