aboutsummaryrefslogtreecommitdiff
path: root/doc/TODO
blob: b55bde5dc9ce991cbfcc639dda7d818360ed324c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
Legend:
SPEC!!  - Not specified
SPEC    - Spec not finalized
NICK    - nick claims
ARMA    - arma claims
        - Not done
        * Top priority
        . Partially done
        o Done
        D Deferred
        X Abandoned

For 0.0.9.6:
   - Server instructions for OSX and Windows operators.
   - Audit all changes to bandwidth buckets for integer over/underflow.

For 0.1.0.1-rc:
R  - write a changelog
R  - pick the whole path when you start the circuit.
     - and then the controller can call that for extendcircuit
R  - finish messing with reachability stuff
R  - if we jump in time a lot, then mark our circs and note that we
     haven't made a circ yet.



For 0.1.0.x:

 Refactoring and infrastructure:

N . Switch to libevent
       - Hold-open-until-flushed now works by accident; it should work by
         design.
       - The logic for reading from TLS sockets is likely to overrun the
         bandwidth buckets under heavy load.  (Really, the logic was
         never right in the first place.)  Also, we should audit all users
         of get_pending_bytes().
       . Find a way to make sure we have libevent 1.0 or later.
         o Implement patch to libevent
         o Submit patch to niels making this possible.
         - Implement Tor side once patch is accepted.
       . Log which poll method we're using.
         o Implement patch to libevent
         o Submit patch to niels making this possible.
         - Implement Tor side once patch is accepted.
       . Intercept libevent's "log" messages.
         o Ask Niels whether a patch would be accepted.
         o Implement patch, if so.
         - Implement Tor side once patch is accepted.
       o Check return from event_set, event_add, event_del.
       o Keep pushing to get a windows patch accepted.
       - After about 26 March, check back with Niels; he should be back
         by then.

 Security:
   - Make sure logged info is "safe"ish.

 Stability
R  o Reset uptime when IP changes.

 Functionality
N  . Implement pending controller features.
    o Stubs for new functions.
    o GETINFO
      o Version
      o Descriptor list
      o Individual descriptors
        o Need to remember descriptors for all routers.
        o Replace everything else that remembers serverdescs with
          routerinfo.
      o List of address mappings
    o POSTDESCRIPTOR
    o MAPADDRESS
      o Map A->B.
      o Map DontCare->B.
        o Reuse mappings when asked to map DontCare->B for the same B.
          o But only when the DontCare is of the same type. :/
    o Way to handle overlong messages
      o Specify fragmented format
      o Implement fragmented format
    o Event for "new descriptors"
    o Better stream IDs
    o Stream status changed: "new" state.
    - EXTENDCIRCUIT
R     - revised circ selection stuff.
      - Implement controller interface.
    o ATTACHSTREAM
      o Make streams have an 'unattached and not-automatically-attachable'
        state. ("Controller managed.")
      o Add support to put new streams into this state rather than try to
        attach them automatically.  ("Hidden" config option.)
      o Implement 'attach stream X to circuit Y' logic.
      o Time out never-attached streams.
      o If we never get a CONNECTED back, we should put the stream back in
        CONTROLLER_WAIT, not in CIRCUIT_WAIT.
    - Tests for new controller features
R o HTTPS proxy for OR CONNECT stuff. (For outgoing SSL connections to
    other ORs.)
  o Changes for forward compatibility
    o If a version is later than the last in its series, but a version
      in the next series is recommended, that doesn't mean it's bad.
  o Do end reasons better
    o Start using RESOURCELIMIT more.
    o Try to use MISC a lot less.
      o bug: if the exit node fails to create a socket (e.g. because it
        has too many open), we will get a generic stream end response.
        o Fix on platforms with set_max_file_descriptors.
      o niels's "did it fail because conn refused or timeout or what"
        relay end feature.
    o Realize that unrecognized end reasons are probably features rather than
      bugs. (backport to 009x)
    o Push the work of sending the end cell deeper into package_raw_inbuf.
      (Turns out, if package_raw_inbuf fails, it *can't* send an end cell.)
    o Check for any place where we can close an edge connection without
      sending an end; see if we should send an end.
  o Feed end reason back into SOCK5 as reasonable.
R o cache .foo.exit names better, or differently, or not.
  o make !advertised_server_mode() ORs fetch dirs less often.
N . NT Service code
    o Clean up NT service code even more.
    o Enable it by default.
    o Make sure it works.
    . Document it.

 Documentation
  o Document new version system.
r - Correct and clarify the wiki entry on port forwarding.
  o Document where OSX logs and torrc go.
  o Document where windows logs and torrc go.
    - (Make sure they actually go there.)

 Installers
N - Vet all pending installer patches
    - Win32 installer plus privoxy, sockscap/freecap, etc.
    - Vet win32 systray helper code
  o Make OSX man pages go into man directory.
N . Make logs go into platform default locations.
    o OSX
    - Windows. (?)

 Correctness
   - Mark bugs for 010 or post 010 in bugtracker.
   - Bugfixes
R    - when we haven't explicitly sent a socks reject, sending one in
       connection_about_to_close_connection() fails because we never give it
       a chance to flush. right answer is to do the socks reply manually in
       each appropriate case, and then about-to-close-connection can simply
       warn us if we forgot one. [Tag this 010 in flyspray.]
R    - should retry exitpolicy end streams even if the end cell didn't
       resolve the address for you
   o Figure out when to reset addressmaps (on hup, on reconfig, etc)

 Improvements to self-measurement.
R  X round detected bandwidth up to nearest 10KB?
R  o client software not upload descriptor until:
     . it decides it is reachable
       o dirport
       . orport
         - rule for now: "If you process a CREATE cell that did not come from
           your own IP, you are reachable."
     o start counting again if your IP ever changes.
     o never regenerate identity keys, for now.
     o you can set a bit for not-being-an-OR.
       * no need to do this yet. few people define their ORPort.

 Arguable
N - Script to try pulling bytes through slow-seeming servers so they can
    notice that they might be fast.
N . Reverse DNS
    o specify
    - implement
r - make min uptime a function of the available choices (say, choose 60th
    percentile, not 1 day.)
r - kill dns workers more slowly
r - build testing circuits? going through non-verified nodes?
  - config option to publish what ports you listen on, beyond ORPort/DirPort
N - It would be nice to have a FirewalledIPs thing that works like
    FirewallPorts.
  - If we have a trusted directory on port 80, stop falling back to
    forbidden ports when fascistfirewall blocks all good dirservers.
N - Code cleanup
    - Make configure.in handle cross-compilation
      - Have NULL_REP_IS_ZERO_BYTES default to 1.
      - Make with-ssl-dir disable search for ssl.
  - Efficiency/speed improvements.
    - Write limiting; configurable token buckets.
    - Make it harder to circumvent bandwidth caps: look at number of bytes
      sent across sockets, not number sent inside TLS stream.
  - Hidden service improvements
    - Investigate hidden service performance/reliability

  No
  - choose entry node to be one you're already connected to?
  - Convert man pages to pod, or whatever's right.
  - support hostnames as well as IPs for authdirservers.
  - GPSLocation optional config string.
  - Windows
    - Make millisecond accuracy work on win32
  - IPv6 support
     - teach connection_ap_handshake_socks_reply() about ipv6 and friends
       so connection_ap_handshake_socks_resolved() doesn't also need
       to know about them.
  - Let more config options (e.g. ORPort) change dynamically.
  - hidserv offerers shouldn't need to define a SocksPort
    * figure out what breaks for this, and do it.
  - Destroy and truncated cells should have reasons.
   - Packaging
     - Figure out how to make the rpm not strip the binaries it makes.
   - Integrate an http proxy into Tor (maybe as a third class of worker
     process), so we can stop shipping with the beast that is Privoxy.
   - Implement If-Modified-Since for directories.
   - Big, incompatible re-architecting and decentralization of directory
     system.
     - Only the top of a directory needs to be signed.
   - Windows
     - Get a controller to launch tor and keep it on the system tray.


For 0.1.1.x:

Decentralizing:
  - self-measurement
  - remote measurement
     - you've been running for an hour
     - it's sufficiently satisfied with its bandwidth
  - remove approval crap, add blacklisting by IP
  - gather more permanent dirservers and put their keys into the code
  - ship with a master key, and implement a way to query dirservers for
    a blob which is a timestamped signed newest pile of dirservers. put
    that on disk and use it on startup rather than the built-in default.
  - threshold belief from clients about up-ness
  - a way for clients to get fresh enough server descriptors
  - a way for clients to partition the set of servers in a safe way:
    so they don't have to learn all of them but so they're not easily
    partitionable.

Tier two:

N  - Handle rendezvousing with unverified nodes.
     - Specify: Stick rendezvous point's key in INTRODUCE cell.
       Bob should _always_ use key from INTRODUCE cell.
     - Implement.

N  - IPv6 support (For exit addresses)
     - Spec issue: if a resolve returns an IP4 and an IP6 address,
       which to use?
     - Add to exit policy code
     - Make tor_gethostbyname into tor_getaddrinfo
     - Make everything that uses uint32_t as an IP address change to use
       a generalize address struct.
     - Change relay cell types to accept new addresses.
     - Add flag to serverdescs to tell whether IPv6 is supported.

   - Security fixes
     - christian grothoff's attack of infinite-length circuit.
       the solution is to have a separate 'extend-data' cell type
       which is used for the first N data cells, and only
       extend-data cells can be extend requests.

   - Code cleanup
     o fix router_get_by_* functions so they can get ourselves too ...
     - and audit everything to make sure rend and intro points are
       just as likely to be us as not.

   - tor should be able to have a pool of outgoing IP addresses
     that it is able to rotate through. (maybe)

   Packaging, docs, etc:
   - Exit node caching: tie into squid or other caching web proxy.

   Deferred until needed:
   - Do something to prevent spurious EXTEND cells from making middleman
     nodes connect all over.  Rate-limit failed connections, perhaps?
   - Limit to 2 dir, 2 OR, N SOCKS connections per IP.
   - Handle full buffers without totally borking
     * do this eventually, no rush.
   - Rate-limit OR and directory connections overall and per-IP and
     maybe per subnet.
   - DoS protection: TLS puzzles, public key ops, bandwidth exhaustion.
   - Have clients and dirservers preserve reputation info over
     reboots.
   - authdirserver lists you as running iff:
     - he can connect to you
     - he has successfully extended to you
     - you have sufficient mean-time-between-failures
     * keep doing nothing for now.
   - Include HTTP status messages in logging (see parse_http_response).

   Blue sky or deferred indefinitely:
   - Support egd or other non-OS-integrated strong entropy sources
   - password protection for on-disk identity key
   - Possible to get autoconf to easily install things into ~/.tor?
   - server descriptor declares min log level, clients avoid servers
     that are too loggy.
   - put expiry date on onion-key, so people don't keep trying
     old ones that they could know are expired?
   - Add a notion of nickname->Pubkey binding that's not 'verification'
   - Conn key rotation.
   - Need a relay teardown cell, separate from one-way ends.

Big tasks that would demonstrate progress:

   - Facility to automatically choose long-term helper nodes; perhaps
     on by default for hidden services.
   - patch privoxy and socks protocol to pass strings to the browser.
   - patch tsocks with our current patches + gethostbyname, getpeername, etc.
   - make freecap (or whichever) do what we want.
   - scrubbing proxies for protocols other than http.
     - Find an smtp proxy?
     . Get socks4a support into Mozilla
   - figure out enclaves, e.g. so we know what to recommend that people
     do, and so running a tor server on your website is helpful.
     - Do enclaves for same IP only.
     - Resolve first, then if IP is an OR, extend to him first.
   - implement a trivial fun gui to demonstrate our control interface.

************************ Roadmap for 2004-2005 **********************

Hard problems that need to be solved:

  - Separating node discovery from routing.
  - Arranging membership management for independence.
    Sybil defenses without having a human bottleneck.
    How to gather random sample of nodes.
    How to handle nodelist recommendations.
    Consider incremental switches: a p2p tor with only 50 users has
      different anonymity properties than one with 10k users, and should
      be treated differently.
  - Measuring performance of other nodes. Measuring whether they're up.
  - Choosing exit node by meta-data, e.g. country.
  - Incentives to relay; incentives to exit.
  - Allowing dissidents to relay through Tor clients.
  - How to intercept, or not need to intercept, dns queries locally.
  - Improved anonymity:
    - Experiment with mid-latency systems. How do they impact usability,
      how do they impact safety?
    - Understand how powerful fingerprinting attacks are, and experiment
      with ways to foil them (long-range padding?).
    - Come up with practical approximations to picking entry and exit in
      different routing zones.
    - Find ideal churn rate for helper nodes; how safe is it?
    - What info squeaks by Privoxy? Are other scrubbers better?
    - Attacking freenet-gnunet/timing-delay-randomness-arguments.
    - Is abandoning the circuit the only option when an extend fails, or
      can we do something without impacting anonymity too much?
    - Is exiting from the middle of the circuit always a bad idea?

Sample Publicity Landmarks:

  - we have N servers / N users
  - we have servers at epic and aclu and foo
  - hidden services are robust and fast
  - a more decentralized design
  - tor win32 installer works
  - win32 tray icon for end-users
  - tor server works on win32
  - win32 service for servers
  - mac installer works

***************************Future tasks:****************************

Rendezvous and hidden services:
  make it fast:
    o preemptively build and start rendezvous circs.
    o preemptively build n-1 hops of intro circs?
    o cannibalize general circs?
  make it reliable:
    - standby/hotswap/redundant services.
    - store stuff to disk? dirservers forget service descriptors when
      they restart; nodes offering hidden services forget their chosen
      intro points when they restart.
  make it robust:
    - auth mechanisms to let midpoint and bob selectively choose
      connection requests.
  make it scalable:
    - robust decentralized storage for hidden service descriptors.
  make it accessible:
    - web proxy gateways to let normal people browse hidden services.

Tor scalability:
  Relax clique assumptions.
  Redesign how directories are handled.
    - Resolve directory agreement somehow.
  Find and remove bottlenecks
    - Address linear searches on e.g. circuit and connection lists.
  Reputation/memory system, so dirservers can measure people,
    and so other people can verify their measurements.
    - Need to measure via relay, so it's not distinguishable.
  Let dissidents get to Tor servers via Tor users. ("Backbone model")

Make it more correct:
  Handle half-open connections: right now we don't support all TCP
    streams, at least according to the protocol. But we handle all that
    we've seen in the wild.
  Support IPv6.

Efficiency/speed/robustness:
  Congestion control. Is our current design sufficient once we have heavy
    use? Need to measure and tweak, or maybe overhaul.
  Allow small cells and large cells on the same network?
  Cell buffering and resending. This will allow us to handle broken
    circuits as long as the endpoints don't break, plus will allow
    connection (tls session key) rotation.
  Implement Morphmix, so we can compare its behavior, complexity, etc.
  Use cpuworker for more heavy lifting.
    - Signing (and verifying) hidserv descriptors
    - Signing (and verifying) intro/rend requests
    - Signing (and verifying) router descriptors
    - Signing (and verifying) directories
    - Doing TLS handshake (this is very hard to separate out, though)
  Buffer size pool: allocate a maximum size for all buffers, not
    a maximum size for each buffer. So we don't have to give up as
    quickly (and kill the thickpipe!) when there's congestion.
  Other transport. HTTP, udp, rdp, airhook, etc. May have to do our own
    link crypto, unless we can bully openssl into it.