]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
CREATE_FAST is for when you don't know the onion key
authorRoger Dingledine <arma@torproject.org>
Mon, 3 Jul 2017 21:16:26 +0000 (17:16 -0400)
committerRoger Dingledine <arma@torproject.org>
Mon, 3 Jul 2017 21:20:52 +0000 (17:20 -0400)
it isn't (anymore) for when you think you can get away with saving some
crypto operations.

src/or/circuitbuild.c

index 5fd199ca1f8e35ed5e8a98f1dcfc365b204b0423..8bb7c94d74e2e41f170705263cc4bb4a8c016f76 100644 (file)
@@ -981,15 +981,11 @@ circuit_send_first_onion_skin(origin_circuit_t *circ)
   node = node_get_by_id(circ->base_.n_chan->identity_digest);
   fast = should_use_create_fast_for_circuit(circ);
   if (!fast) {
-    /* We are an OR and we know the right onion key: we should
-     * send a create cell.
-     */
+    /* We know the right onion key: we should send a create cell. */
     circuit_pick_create_handshake(&cc.cell_type, &cc.handshake_type,
                                   circ->cpath->extend_info);
   } else {
-    /* We are not an OR, and we're building the first hop of a circuit to a
-     * new OR: we can be speedy and use CREATE_FAST to save an RSA operation
-     * and a DH operation. */
+    /* We don't know an onion key, so we need to fall back to CREATE_FAST. */
     cc.cell_type = CELL_CREATE_FAST;
     cc.handshake_type = ONION_HANDSHAKE_TYPE_FAST;
   }