2007-01-26 19:47:18 +01:00
|
|
|
Filename: 104-short-descriptors.txt
|
2007-02-10 22:38:31 +01:00
|
|
|
Title: Long and Short Router Descriptors
|
2007-01-26 19:47:18 +01:00
|
|
|
Author: Nick Mathewson
|
2009-02-15 12:12:42 +01:00
|
|
|
Created: Jan 2007
|
2007-10-25 05:41:28 +02:00
|
|
|
Status: Closed
|
2008-07-14 22:57:17 +02:00
|
|
|
Implemented-In: 0.2.0.x
|
2007-01-26 07:08:05 +01:00
|
|
|
|
2007-01-26 20:04:43 +01:00
|
|
|
Overview:
|
|
|
|
|
|
|
|
This document proposes moving unused-by-clients information from regular
|
2007-03-21 04:20:01 +01:00
|
|
|
router descriptors into a new "extra info" router descriptor.
|
2007-01-26 20:04:43 +01:00
|
|
|
|
|
|
|
Proposal:
|
|
|
|
|
2007-01-26 07:08:05 +01:00
|
|
|
Some of the costliest fields in the current directory protocol are ones
|
|
|
|
that no client actually uses. In particular, the "read-history" and
|
|
|
|
"write-history" fields are used only by the authorities for monitoring the
|
|
|
|
status of the network. If we took them out, the size of a compressed list
|
|
|
|
of all the routers would fall by about 60%. (No other disposable field
|
2007-03-21 04:20:01 +01:00
|
|
|
would save much more than 2%.)
|
|
|
|
|
|
|
|
We propose to remove these fields from descriptors, and and have them
|
|
|
|
uploaded as a part of a separate signed "extra info" to the authorities.
|
|
|
|
This document will be signed. A hash of this document will be included in
|
|
|
|
the regular descriptors.
|
|
|
|
|
|
|
|
(We considered another design, where routers would generate and upload a
|
|
|
|
short-form and a long-form descriptor. Only the short-form descriptor would
|
|
|
|
ever be used by anybody for routing. The long-form descriptor would be
|
|
|
|
used only for analytics and other tools. We decided against this because
|
|
|
|
well-behaved tools would need to download short-form descriptors too (as
|
|
|
|
these would be the only ones indexed), and hence get redundant info. Badly
|
|
|
|
behaved tools would download only long-form descriptors, and expose
|
2007-04-16 21:09:35 +02:00
|
|
|
themselves to partitioning attacks.)
|
2007-01-26 07:08:05 +01:00
|
|
|
|
2007-03-02 21:00:37 +01:00
|
|
|
Other disposable fields:
|
2007-01-26 07:08:05 +01:00
|
|
|
|
2007-03-02 21:00:37 +01:00
|
|
|
Clients don't need these fields, but removing them doesn't help bandwidth
|
|
|
|
enough to be worthwhile.
|
|
|
|
contact (save about 1%)
|
|
|
|
fingerprint (save about 3%)
|
|
|
|
|
|
|
|
We could represent these fields more succinctly, but removing them would
|
|
|
|
only save 1%. (!)
|
|
|
|
reject
|
|
|
|
accept
|
|
|
|
(Apparently, exit polices are highly compressible.)
|
|
|
|
|
2007-03-09 23:55:35 +01:00
|
|
|
[Does size-on-disk matter to anybody? Some clients and servers don't
|
|
|
|
have much disk, or have really slow disk (e.g. USB). And we don't
|
|
|
|
store caches compressed right now. -RD]
|
|
|
|
|
2007-03-21 04:20:01 +01:00
|
|
|
Specification:
|
|
|
|
|
|
|
|
1. Extra Info Format.
|
|
|
|
|
2007-03-21 06:45:44 +01:00
|
|
|
An "extra info" descriptor contains the following fields:
|
2007-03-21 04:20:01 +01:00
|
|
|
|
2007-04-16 06:17:58 +02:00
|
|
|
"extra-info" Nickname Fingerprint
|
2007-03-21 04:20:01 +01:00
|
|
|
Identifies what router this is an extra info descriptor for.
|
2007-03-21 06:45:44 +01:00
|
|
|
Fingerprint is encoded in hex (using upper-case letters), with
|
|
|
|
no spaces.
|
2007-03-21 04:20:01 +01:00
|
|
|
|
2007-04-14 23:30:25 +02:00
|
|
|
"published" As currently documented in dir-spec.txt. It MUST match the
|
|
|
|
"published" field of the descriptor published at the same time.
|
2007-03-21 04:20:01 +01:00
|
|
|
|
|
|
|
"read-history"
|
|
|
|
"write-history"
|
2007-04-16 06:17:58 +02:00
|
|
|
As currently documented in dir-spec.txt. Optional.
|
2007-03-21 04:20:01 +01:00
|
|
|
|
|
|
|
"router-signature" NL Signature NL
|
|
|
|
|
|
|
|
A signature of the PKCS1-padded hash of the entire extra info
|
|
|
|
document, taken from the beginning of the "extra-info" line, through
|
|
|
|
the newline after the "router-signature" line. An extra info
|
|
|
|
document is not valid unless the signature is performed with the
|
|
|
|
identity key whose digest matches FINGERPRINT.
|
|
|
|
|
|
|
|
The "extra-info" field is required and MUST appear first. The
|
|
|
|
router-signature field is required and MUST appear last. All others are
|
|
|
|
optional. As for other documents, unrecognized fields must be ignored.
|
|
|
|
|
|
|
|
2. Existing formats
|
|
|
|
|
|
|
|
Implementations that use "read-history" and "write-history" SHOULD
|
2007-03-21 06:45:44 +01:00
|
|
|
continue accepting router descriptors that contain them. (Prior to
|
|
|
|
0.2.0.x, this information was encoded in ordinary router descriptors;
|
|
|
|
in any case they have always been listed as opt, so they should be
|
|
|
|
accepted anyway.)
|
2007-03-21 04:20:01 +01:00
|
|
|
|
2007-03-21 06:45:44 +01:00
|
|
|
Add these fields to router descriptors:
|
|
|
|
|
|
|
|
"extra-info-digest" Digest
|
|
|
|
"Digest" is a hex-encoded digest (using upper-case characters)
|
|
|
|
of the router's extra-info document, as signed in the router's
|
|
|
|
extra-info. (If this field is absent, no extra-info-digest
|
|
|
|
exists.)
|
2007-03-21 04:20:01 +01:00
|
|
|
|
|
|
|
"caches-extra-info"
|
|
|
|
Present if this router is a directory cache that provides
|
2007-04-16 06:17:58 +02:00
|
|
|
extra-info documents, or an authority that handles extra-info
|
|
|
|
documents.
|
2007-03-21 04:20:01 +01:00
|
|
|
|
2007-04-16 21:09:35 +02:00
|
|
|
(Since implementations before 0.1.2.5-alpha required that the "opt"
|
|
|
|
keyword precede any unrecognized entry, these keys MUST be preceded
|
2007-04-14 23:30:25 +02:00
|
|
|
with "opt" until 0.1.2.5-alpha is obsolete.)
|
|
|
|
|
2007-03-21 04:20:01 +01:00
|
|
|
3. New communications rules
|
|
|
|
|
2007-04-16 21:09:35 +02:00
|
|
|
Servers SHOULD generate and upload one extra-info document after each
|
2007-04-14 23:30:25 +02:00
|
|
|
descriptor they generate and upload; no more, no less. Servers MUST
|
2007-03-21 04:20:01 +01:00
|
|
|
upload the new descriptor before they upload the new extra-info.
|
|
|
|
|
2007-03-21 06:45:44 +01:00
|
|
|
Authorities receiving an extra-info document SHOULD verify all of the
|
2007-03-21 04:20:01 +01:00
|
|
|
following:
|
|
|
|
* They have a router descriptor for some server with a matching
|
2007-04-16 21:09:35 +02:00
|
|
|
nickname and identity fingerprint.
|
2007-03-21 04:20:01 +01:00
|
|
|
* That server's identity key has been used to sign the extra-info
|
|
|
|
document.
|
|
|
|
* The extra-info-digest field in the router descriptor matches
|
|
|
|
the digest of the extra-info document.
|
2007-04-14 23:30:25 +02:00
|
|
|
* The published fields in the two documents match.
|
2007-03-21 04:20:01 +01:00
|
|
|
|
2007-04-21 19:48:50 +02:00
|
|
|
Authorities SHOULD drop extra-info documents that do not meet these
|
|
|
|
criteria.
|
|
|
|
|
|
|
|
Extra-info documents MAY be uploaded as part of the same HTTP post as
|
|
|
|
the router descriptor, or separately. Authorities MUST accept both
|
|
|
|
methods.
|
|
|
|
|
2007-03-21 04:20:01 +01:00
|
|
|
Authorities SHOULD try to fetch extra-info documents from one another if
|
|
|
|
they do not have one matching the digest declared in a router
|
|
|
|
descriptor.
|
|
|
|
|
|
|
|
Caches that are running locally with a tool that needs to use extra-info
|
|
|
|
documents MAY download and store extra-info documents. They should do
|
|
|
|
so when they notice that the recommended descriptor has an
|
|
|
|
extra-info-digest not matching any extra-info document they currently
|
|
|
|
have. (Caches not running on a host that needs to use extra-info
|
|
|
|
documents SHOULD NOT download or cache them.)
|
|
|
|
|
|
|
|
4. New URLs
|
|
|
|
|
|
|
|
http://<hostname>/tor/extra/d/...
|
|
|
|
http://<hostname>/tor/extra/fp/...
|
2007-03-21 06:45:44 +01:00
|
|
|
http://<hostname>/tor/extra/all[.z]
|
2007-03-21 04:20:01 +01:00
|
|
|
(As for /tor/server/ URLs: supports fetching extra-info documents
|
2007-03-21 06:45:44 +01:00
|
|
|
by their digest, by the fingerprint of their servers, or all
|
|
|
|
at once. When serving by fingerprint, we serve the extra-info
|
|
|
|
that corresponds to the descriptor we would serve by that
|
|
|
|
fingerprint. Only directory authorities are guaranteed to support
|
|
|
|
these URLs.)
|
2007-03-21 04:20:01 +01:00
|
|
|
|
2007-03-21 06:45:44 +01:00
|
|
|
http://<hostname>/tor/extra/authority[.z]
|
2007-03-21 04:20:01 +01:00
|
|
|
(The extra-info document for this router.)
|
|
|
|
|
|
|
|
Extra-info documents are uploaded to the same URLs as regular
|
|
|
|
router descriptors.
|
|
|
|
|
2007-03-02 21:00:37 +01:00
|
|
|
Migration:
|
|
|
|
|
2007-03-21 04:20:01 +01:00
|
|
|
For extra info approach:
|
2007-03-02 21:00:37 +01:00
|
|
|
* First:
|
2007-03-21 06:45:44 +01:00
|
|
|
* Authorities should accept extra info, and support serving it.
|
2007-04-14 23:30:25 +02:00
|
|
|
* Routers should upload extra info once authorities accept it.
|
2007-03-21 04:20:01 +01:00
|
|
|
* Caches should support an option to download and cache it, once
|
|
|
|
authorities serve it.
|
|
|
|
* Tools should be updated to use locally cached information.
|
|
|
|
These tools include:
|
|
|
|
lefkada's exit.py script.
|
|
|
|
tor26's noreply script and general directory cache.
|
|
|
|
https://nighteffect.us/tns/ for its graphs
|
|
|
|
and check with or-talk for the rest, once it's time.
|
|
|
|
|
2007-04-14 23:30:25 +02:00
|
|
|
* Set a cutoff time for including bandwidth in router descriptors, so
|
|
|
|
that tools that use bandwidth info know that they will need to fetch
|
|
|
|
extra info documents.
|
|
|
|
|
|
|
|
* Once tools that want bandwidth info support fetching extra info:
|
2007-03-02 21:00:37 +01:00
|
|
|
* Have routers stop including bandwidth info in their router
|
|
|
|
descriptors.
|