Hacker News new | ask | show | jobs
by arethuza 5052 days ago
Here is the bit I don't get - how do you do a lookup to get that hash?

i.e. Map from something user friendly (e.g. username) to a SHA1 hash?

1 comments

From the Wiki:

[...]End: a SHA-1 hash key (40 hex characters, 160-bits) stored in the global DHT and distributed between switches. Switches will distribute and look up ends in the global DHT that are important to them. TeleHash defines the SHA-1 hash of the external IP:PORT of a switch as part of the protocol. Applications built on top of TeleHash can add their own ends to the DHT like hashes of files, hashes of e-mail addresses or hashes of other application-specific values (e.g. user@chat).[...]

So if i understand this right, every packet has a protocol-defined +end and the application can add it's own end on top (i.e. an Email adress?).

https://github.com/quartzjer/TeleHash/wiki/My-Understanding-...

OK, I was being a bit thick there, to look up a email address you presumably simply hash it (presumably with some kind of canonicalization) and use that as the key for your lookup for a matching +end.
I'm not sure, but this is what i think i get out of this. You really don't need an email, this could be a hash or whatever. i think of more apps or services use some protocol like this, there should be a unified why to "lookup" for an account or something.

For example, if you have a decentralized social network that is based on the same software, say "facespace", every of those software nodes would lookup for the same identifier. i guess...

I guess it might make sense to do a lookup based on a hash of a json query like:

{ "facespace":"arethuza" }