circuitpadding_machines.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. /* Copyright (c) 2019 The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file circuitpadding_machines.c
  5. * \brief Circuit padding state machines
  6. *
  7. * \detail
  8. *
  9. * Introduce circuit padding machines that will be used by Tor circuits, as
  10. * specified by proposal 302 "Hiding onion service clients using padding".
  11. *
  12. * Right now this file introduces two machines that aim to hide the client-side
  13. * of onion service circuits against naive classifiers like the ones from the
  14. * "Circuit Fingerprinting Attacks: Passive Deanonymization of Tor Hidden
  15. * Services" paper from USENIX. By naive classifiers we mean classifiers that
  16. * use basic features like "circuit construction circuits" and "incoming and
  17. * outgoing cell counts" and "duration of activity".
  18. *
  19. * In particular, these machines aim to be lightweight and protect against
  20. * these basic classifiers. They don't aim to protect against more advanced
  21. * attacks that use deep learning or even correlate various circuit
  22. * construction events together. Machines that fool such advanced classifiers
  23. * are also possible, but they can't be so lightweight and might require more
  24. * WTF-PAD features. So for now we opt for the following two machines:
  25. *
  26. * Client-side introduction circuit hiding machine:
  27. *
  28. * This machine hides client-side introduction circuits by making their
  29. * circuit consruction sequence look like normal general circuits that
  30. * download directory information. Furthermore, the circuits are kept open
  31. * until all the padding has been sent, since intro circuits are usually
  32. * very short lived and this act as a distinguisher. For more info see
  33. * circpad_machine_client_hide_intro_circuits() and the sec.
  34. *
  35. * Client-side rendezvous circuit hiding machine:
  36. *
  37. * This machine hides client-side rendezvous circuits by making their
  38. * circuit construction sequence look like normal general circuits. For more
  39. * details see circpad_machine_client_hide_rend_circuits() and the spec.
  40. *
  41. * TODO: These are simple machines that carefully manipulate the cells of the
  42. * initial circuit setup procedure to make them look like general
  43. * circuits. In the future, more states can be baked into their state machine
  44. * to do more advanced obfuscation.
  45. **/
  46. #define CIRCUITPADDING_MACHINES_PRIVATE
  47. #include "core/or/or.h"
  48. #include "feature/nodelist/networkstatus.h"
  49. #include "lib/crypt_ops/crypto_rand.h"
  50. #include "core/or/circuitlist.h"
  51. #include "core/or/circuitpadding_machines.h"
  52. #include "core/or/circuitpadding.h"
  53. /** Create a client-side padding machine that aims to hide IP circuits. In
  54. * particular, it keeps intro circuits alive until a bunch of fake traffic has
  55. * been pushed through.
  56. */
  57. void
  58. circpad_machine_client_hide_intro_circuits(smartlist_t *machines_sl)
  59. {
  60. circpad_machine_spec_t *client_machine
  61. = tor_malloc_zero(sizeof(circpad_machine_spec_t));
  62. client_machine->name = "client_ip_circ";
  63. client_machine->conditions.state_mask = CIRCPAD_CIRC_OPENED;
  64. client_machine->target_hopnum = 2;
  65. /* This is a client machine */
  66. client_machine->is_origin_side = 1;
  67. /* We only want to pad introduction circuits, and we want to start padding
  68. * only after the INTRODUCE1 cell has been sent, so set the purposes
  69. * appropriately.
  70. *
  71. * In particular we want introduction circuits to blend as much as possible
  72. * with general circuits. Most general circuits have the following initial
  73. * relay cell sequence (outgoing cells marked in [brackets]):
  74. *
  75. * [EXTEND2] -> EXTENDED2 -> [EXTEND2] -> EXTENDED2 -> [BEGIN] -> CONNECTED
  76. * -> [DATA] -> [DATA] -> DATA -> DATA...(inbound data cells continue)
  77. *
  78. * Whereas normal introduction circuits usually look like:
  79. *
  80. * [EXTEND2] -> EXTENDED2 -> [EXTEND2] -> EXTENDED2 -> [EXTEND2] -> EXTENDED2
  81. * -> [INTRO1] -> INTRODUCE_ACK
  82. *
  83. * This means that up to the sixth cell (first line of each sequence above),
  84. * both general and intro circuits have identical cell sequences. After that
  85. * we want to mimic the second line sequence of
  86. * -> [DATA] -> [DATA] -> DATA -> DATA...(inbound data cells continue)
  87. *
  88. * We achieve this by starting padding INTRODUCE1 has been sent. With padding
  89. * negotiation cells, in the common case of the second line looks like:
  90. * -> [INTRO1] -> [PADDING_NEGOTIATE] -> PADDING_NEGOTIATED -> INTRO_ACK
  91. *
  92. * Then, the middle node will send between INTRO_MACHINE_MINIMUM_PADDING and
  93. * INTRO_MACHINE_MAXIMUM_PADDING cells, to match the "...(inbound data cells
  94. * continue)" portion of the trace (aka the rest of an HTTPS response body).
  95. */
  96. client_machine->conditions.purpose_mask =
  97. circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT)|
  98. circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_INTRODUCE_ACKED)|
  99. circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_CIRCUIT_PADDING);
  100. /* Keep the circuit alive even after the introduction has been finished,
  101. * otherwise the short-term lifetime of the circuit will blow our cover */
  102. client_machine->manage_circ_lifetime = 1;
  103. /* Set padding machine limits to help guard against excessive padding */
  104. client_machine->allowed_padding_count = INTRO_MACHINE_MAXIMUM_PADDING;
  105. client_machine->max_padding_percent = 1;
  106. /* Two states: START, OBFUSCATE_CIRC_SETUP (and END) */
  107. circpad_machine_states_init(client_machine, 2);
  108. /* For the origin-side machine, we transition to OBFUSCATE_CIRC_SETUP after
  109. * sending PADDING_NEGOTIATE, and we stay there (without sending any padding)
  110. * until we receive a STOP from the other side. */
  111. client_machine->states[CIRCPAD_STATE_START].
  112. next_state[CIRCPAD_EVENT_NONPADDING_SENT] =
  113. CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP;
  114. /* origin-side machine has no event reactions while in
  115. * CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP, so no more state transitions here. */
  116. /* The client side should never send padding, so it does not need
  117. * to specify token removal, or a histogram definition or state lengths.
  118. * That is all controlled by the middle node. */
  119. /* Register the machine */
  120. client_machine->machine_num = smartlist_len(machines_sl);
  121. circpad_register_padding_machine(client_machine, machines_sl);
  122. log_info(LD_CIRC,
  123. "Registered client intro point hiding padding machine (%u)",
  124. client_machine->machine_num);
  125. }
  126. /** Create a relay-side padding machine that aims to hide IP circuits. See
  127. * comments on the function above for more details on the workings of the
  128. * machine. */
  129. void
  130. circpad_machine_relay_hide_intro_circuits(smartlist_t *machines_sl)
  131. {
  132. circpad_machine_spec_t *relay_machine
  133. = tor_malloc_zero(sizeof(circpad_machine_spec_t));
  134. relay_machine->name = "relay_ip_circ";
  135. relay_machine->conditions.state_mask = CIRCPAD_CIRC_OPENED;
  136. relay_machine->target_hopnum = 2;
  137. /* This is a relay-side machine */
  138. relay_machine->is_origin_side = 0;
  139. /* We want to negotiate END from this side after all our padding is done, so
  140. * that the origin-side machine goes into END state, and eventually closes
  141. * the circuit. */
  142. relay_machine->should_negotiate_end = 1;
  143. /* Set padding machine limits to help guard against excessive padding */
  144. relay_machine->allowed_padding_count = INTRO_MACHINE_MAXIMUM_PADDING;
  145. relay_machine->max_padding_percent = 1;
  146. /* Two states: START, OBFUSCATE_CIRC_SETUP (and END) */
  147. circpad_machine_states_init(relay_machine, 2);
  148. /* For the relay-side machine, we want to transition
  149. * START -> OBFUSCATE_CIRC_SETUP upon first non-padding
  150. * cell sent (PADDING_NEGOTIATED in this case). */
  151. relay_machine->states[CIRCPAD_STATE_START].
  152. next_state[CIRCPAD_EVENT_NONPADDING_SENT] =
  153. CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP;
  154. /* For the relay-side, we want to transition from OBFUSCATE_CIRC_SETUP to END
  155. * state when the length finishes. */
  156. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  157. next_state[CIRCPAD_EVENT_LENGTH_COUNT] = CIRCPAD_STATE_END;
  158. /* Now let's define the OBF -> OBF transitions that maintain our padding
  159. * flow:
  160. *
  161. * For the relay-side machine, we want to keep on sending padding bytes even
  162. * when nothing else happens on this circuit. */
  163. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  164. next_state[CIRCPAD_EVENT_PADDING_SENT] =
  165. CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP;
  166. /* For the relay-side machine, we need this transition so that we re-enter
  167. the state, after PADDING_NEGOTIATED is sent. Otherwise, the remove token
  168. function will disable the timer, and nothing will restart it since there
  169. is no other motion on an intro circuit. */
  170. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  171. next_state[CIRCPAD_EVENT_NONPADDING_SENT] =
  172. CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP;
  173. /* Token removal strategy for OBFUSCATE_CIRC_SETUP state: Don't
  174. * remove any tokens.
  175. *
  176. * We rely on the state length sampling and not token removal, to avoid
  177. * the mallocs required to copy the histograms for token removal,
  178. * and to avoid monotime calls needed to determine histogram
  179. * bins for token removal. */
  180. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  181. token_removal = CIRCPAD_TOKEN_REMOVAL_NONE;
  182. /* Figure out the length of the OBFUSCATE_CIRC_SETUP state so that it's
  183. * randomized. The relay side will send between INTRO_MACHINE_MINIMUM_PADDING
  184. * and INTRO_MACHINE_MAXIMUM_PADDING padding cells towards the client. */
  185. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  186. length_dist.type = CIRCPAD_DIST_UNIFORM;
  187. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  188. length_dist.param1 = INTRO_MACHINE_MINIMUM_PADDING;
  189. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  190. length_dist.param2 = INTRO_MACHINE_MAXIMUM_PADDING;
  191. /* Configure histogram */
  192. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  193. histogram_len = 2;
  194. /* For the relay-side machine we want to batch padding instantly to pretend
  195. * its an incoming directory download. So set the histogram edges tight:
  196. * (1, 10ms, infinity). */
  197. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  198. histogram_edges[0] = 1000;
  199. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  200. histogram_edges[1] = 10000;
  201. /* We put all our tokens in bin 0, which means we want 100% probability
  202. * for choosing a inter-packet delay of between 1000 and 10000 microseconds
  203. * (1 to 10ms). Since we only have 1 bin, it doesn't matter how many tokens
  204. * there are, 1000 out of 1000 is 100% */
  205. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  206. histogram[0] = 1000;
  207. /* just one bin, so setup the total tokens */
  208. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  209. histogram_total_tokens =
  210. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].histogram[0];
  211. /* Register the machine */
  212. relay_machine->machine_num = smartlist_len(machines_sl);
  213. circpad_register_padding_machine(relay_machine, machines_sl);
  214. log_info(LD_CIRC,
  215. "Registered relay intro circuit hiding padding machine (%u)",
  216. relay_machine->machine_num);
  217. }
  218. /************************** Rendezvous-circuit machine ***********************/
  219. /** Create a client-side padding machine that aims to hide rendezvous
  220. * circuits.*/
  221. void
  222. circpad_machine_client_hide_rend_circuits(smartlist_t *machines_sl)
  223. {
  224. circpad_machine_spec_t *client_machine
  225. = tor_malloc_zero(sizeof(circpad_machine_spec_t));
  226. client_machine->name = "client_rp_circ";
  227. /* Only pad after the circuit has been built and pad to the middle */
  228. client_machine->conditions.state_mask = CIRCPAD_CIRC_OPENED;
  229. client_machine->target_hopnum = 2;
  230. /* This is a client machine */
  231. client_machine->is_origin_side = 1;
  232. /* We only want to pad rendezvous circuits, and we want to start padding only
  233. * after the rendezvous circuit has been established.
  234. *
  235. * Following a similar argument as for intro circuits, we are aiming for
  236. * padded rendezvous circuits to blend in with the initial cell sequence of
  237. * general circuits which usually look like this:
  238. *
  239. * [EXTEND2] -> EXTENDED2 -> [EXTEND2] -> EXTENDED2 -> [BEGIN] -> CONNECTED
  240. * -> [DATA] -> [DATA] -> DATA -> DATA...(incoming cells continue)
  241. *
  242. * Whereas normal rendezvous circuits usually look like:
  243. *
  244. * [EXTEND2] -> EXTENDED2 -> [EXTEND2] -> EXTENDED2 -> [EST_REND] -> REND_EST
  245. * -> REND2 -> [BEGIN]
  246. *
  247. * This means that up to the sixth cell (in the first line), both general and
  248. * rend circuits have identical cell sequences.
  249. *
  250. * After that we want to mimic a [DATA] -> [DATA] -> DATA -> DATA sequence.
  251. *
  252. * With padding negotiation right after the REND_ESTABLISHED, the sequence
  253. * becomes:
  254. *
  255. * [EXTEND2] -> EXTENDED2 -> [EXTEND2] -> EXTENDED2 -> [EST_REND] -> REND_EST
  256. * -> [PADDING_NEGOTIATE] -> [DROP] -> PADDING_NEGOTIATED -> DROP...
  257. *
  258. * After which normal application DATA cells continue on the circuit.
  259. *
  260. * Hence this way we make rendezvous circuits look like general circuits up
  261. * till the end of the circuit setup. */
  262. client_machine->conditions.purpose_mask =
  263. circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_REND_JOINED)|
  264. circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_REND_READY)|
  265. circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED);
  266. /* Set padding machine limits to help guard against excessive padding */
  267. client_machine->allowed_padding_count = 1;
  268. client_machine->max_padding_percent = 1;
  269. /* Two states: START, OBFUSCATE_CIRC_SETUP (and END) */
  270. circpad_machine_states_init(client_machine, 2);
  271. /* START -> OBFUSCATE_CIRC_SETUP transition upon sending the first
  272. * non-padding cell (which is PADDING_NEGOTIATE) */
  273. client_machine->states[CIRCPAD_STATE_START].
  274. next_state[CIRCPAD_EVENT_NONPADDING_SENT] =
  275. CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP;
  276. /* OBFUSCATE_CIRC_SETUP -> END transition when we send our first
  277. * padding packet and/or hit the state length (the state length is 1). */
  278. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  279. next_state[CIRCPAD_EVENT_PADDING_RECV] = CIRCPAD_STATE_END;
  280. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  281. next_state[CIRCPAD_EVENT_LENGTH_COUNT] = CIRCPAD_STATE_END;
  282. /* Don't use a token removal strategy since we don't want to use monotime
  283. * functions and we want to avoid mallocing histogram copies. We want
  284. * this machine to be light. */
  285. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  286. token_removal = CIRCPAD_TOKEN_REMOVAL_NONE;
  287. /* Instead, to control the volume of padding (we just want to send a single
  288. * padding cell) we will use a static state length. We just want one token,
  289. * since we want to make the following pattern:
  290. * [PADDING_NEGOTIATE] -> [DROP] -> PADDING_NEGOTIATED -> DROP */
  291. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  292. length_dist.type = CIRCPAD_DIST_UNIFORM;
  293. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  294. length_dist.param1 = 1;
  295. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  296. length_dist.param2 = 2; // rand(1,2) is always 1
  297. /* Histogram is: (0 msecs, 1 msec, infinity). We want this to be fast so
  298. * that we send our outgoing [DROP] before the PADDING_NEGOTIATED comes
  299. * back from the relay side. */
  300. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  301. histogram_len = 2;
  302. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  303. histogram_edges[0] = 0;
  304. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  305. histogram_edges[1] = 1000;
  306. /* We want a 100% probability of choosing an inter-packet delay of
  307. * between 0 and 1ms. Since we don't use token removal,
  308. * the number of tokens does not matter. (And also, state_length
  309. * governs how many packets we send). */
  310. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  311. histogram[0] = 1;
  312. client_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  313. histogram_total_tokens = 1;
  314. /* Register the machine */
  315. client_machine->machine_num = smartlist_len(machines_sl);
  316. circpad_register_padding_machine(client_machine, machines_sl);
  317. log_info(LD_CIRC,
  318. "Registered client rendezvous circuit hiding padding machine (%u)",
  319. client_machine->machine_num);
  320. }
  321. /** Create a relay-side padding machine that aims to hide IP circuits.
  322. *
  323. * This is meant to follow the client-side machine.
  324. */
  325. void
  326. circpad_machine_relay_hide_rend_circuits(smartlist_t *machines_sl)
  327. {
  328. circpad_machine_spec_t *relay_machine
  329. = tor_malloc_zero(sizeof(circpad_machine_spec_t));
  330. relay_machine->name = "relay_rp_circ";
  331. /* Only pad after the circuit has been built and pad to the middle */
  332. relay_machine->conditions.min_hops = 2;
  333. relay_machine->conditions.state_mask = CIRCPAD_CIRC_OPENED;
  334. relay_machine->target_hopnum = 2;
  335. /* This is a relay-side machine */
  336. relay_machine->is_origin_side = 0;
  337. /* Set padding machine limits to help guard against excessive padding */
  338. relay_machine->allowed_padding_count = 1;
  339. relay_machine->max_padding_percent = 1;
  340. /* Two states: START, OBFUSCATE_CIRC_SETUP (and END) */
  341. circpad_machine_states_init(relay_machine, 2);
  342. /* START -> OBFUSCATE_CIRC_SETUP transition upon sending the first
  343. * non-padding cell (which is PADDING_NEGOTIATED) */
  344. relay_machine->states[CIRCPAD_STATE_START].
  345. next_state[CIRCPAD_EVENT_NONPADDING_SENT] =
  346. CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP;
  347. /* OBFUSCATE_CIRC_SETUP -> END transition when we send our first
  348. * padding packet and/or hit the state length (the state length is 1). */
  349. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  350. next_state[CIRCPAD_EVENT_PADDING_RECV] = CIRCPAD_STATE_END;
  351. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  352. next_state[CIRCPAD_EVENT_LENGTH_COUNT] = CIRCPAD_STATE_END;
  353. /* Don't use a token removal strategy since we don't want to use monotime
  354. * functions and we want to avoid mallocing histogram copies. We want
  355. * this machine to be light. */
  356. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  357. token_removal = CIRCPAD_TOKEN_REMOVAL_NONE;
  358. /* Instead, to control the volume of padding (we just want to send a single
  359. * padding cell) we will use a static state length. We just want one token,
  360. * since we want to make the following pattern:
  361. * [PADDING_NEGOTIATE] -> [DROP] -> PADDING_NEGOTIATED -> DROP */
  362. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  363. length_dist.type = CIRCPAD_DIST_UNIFORM;
  364. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  365. length_dist.param1 = 1;
  366. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  367. length_dist.param2 = 2; // rand(1,2) is always 1
  368. /* Histogram is: (0 msecs, 1 msec, infinity). We want this to be fast so
  369. * that the outgoing DROP cell is sent immediately after the
  370. * PADDING_NEGOTIATED. */
  371. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  372. histogram_len = 2;
  373. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  374. histogram_edges[0] = 0;
  375. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  376. histogram_edges[1] = 1000;
  377. /* We want a 100% probability of choosing an inter-packet delay of
  378. * between 0 and 1ms. Since we don't use token removal,
  379. * the number of tokens does not matter. (And also, state_length
  380. * governs how many packets we send). */
  381. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  382. histogram[0] = 1;
  383. relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
  384. histogram_total_tokens = 1;
  385. /* Register the machine */
  386. relay_machine->machine_num = smartlist_len(machines_sl);
  387. circpad_register_padding_machine(relay_machine, machines_sl);
  388. log_info(LD_CIRC,
  389. "Registered relay rendezvous circuit hiding padding machine (%u)",
  390. relay_machine->machine_num);
  391. }