5

According to the Directory Specification:

Descriptors were indexed by their digests, in order to prevent malicious caches from giving different versions of a router descriptor to different clients.

But the hashes for the descriptors can be so easily computed since the descriptor labels are public information. So how could evil caches be thwarted sending wrong descriptors here? Indexing by hashes shouldn't be any more secured than indexing by plain-text.

1

I think you more or less sum up why hashes are chosen as the index in this sentence:

But the hashes for the descriptors can be so easily computed since the descriptor labels are public information.

The point is that they can easily be computed, and this means that they can be easily verified for correctness without downloading the entire router descriptor from every directory authority (half of the directory authorities must agree for us to think a router descriptor is valid).

Put another way: A hash is chosen instead of the full router descriptor because it's smaller. If we've already got the latest router descriptor from one directory, we shouldn't have to download it from all the others to verify that they are all providing the same description. Instead, each directory authority provides a hash of each router descriptor. If at least half of them are providing the same hash, we can verify our current router descriptor against that hash, or download the new router descriptor if our old one doesn't match (and of course, we can also verify the new one to make sure that we haven't been provided with a bad file).

  • "(half of the directory authorities must agree for us to think a router descriptor is valid)". This is not quiet correct. Majority of the directory authorities must agree for us to think a router descriptor is valid. – Roya Dec 29 '14 at 3:06
0

I'm pretty sure it is for faster look-ups, reference, and uniqueness. Just like using hashes in a regular database.

  • That doesn't answer the following part of the OP's question: So how could evil caches be thwarted sending wrong descriptors here? Indexing by hashes shouldn't be any more secured than indexing by plain-text. – Richard Horrocks Oct 23 '15 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.