mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
CREATE_FAST is for when you don't know the onion key
it isn't (anymore) for when you think you can get away with saving some crypto operations.
This commit is contained in:
parent
69fba1f2cd
commit
943d284752
@ -981,15 +981,11 @@ circuit_send_first_onion_skin(origin_circuit_t *circ)
|
|||||||
node = node_get_by_id(circ->base_.n_chan->identity_digest);
|
node = node_get_by_id(circ->base_.n_chan->identity_digest);
|
||||||
fast = should_use_create_fast_for_circuit(circ);
|
fast = should_use_create_fast_for_circuit(circ);
|
||||||
if (!fast) {
|
if (!fast) {
|
||||||
/* We are an OR and we know the right onion key: we should
|
/* We know the right onion key: we should send a create cell. */
|
||||||
* send a create cell.
|
|
||||||
*/
|
|
||||||
circuit_pick_create_handshake(&cc.cell_type, &cc.handshake_type,
|
circuit_pick_create_handshake(&cc.cell_type, &cc.handshake_type,
|
||||||
circ->cpath->extend_info);
|
circ->cpath->extend_info);
|
||||||
} else {
|
} else {
|
||||||
/* We are not an OR, and we're building the first hop of a circuit to a
|
/* We don't know an onion key, so we need to fall back to CREATE_FAST. */
|
||||||
* new OR: we can be speedy and use CREATE_FAST to save an RSA operation
|
|
||||||
* and a DH operation. */
|
|
||||||
cc.cell_type = CELL_CREATE_FAST;
|
cc.cell_type = CELL_CREATE_FAST;
|
||||||
cc.handshake_type = ONION_HANDSHAKE_TYPE_FAST;
|
cc.handshake_type = ONION_HANDSHAKE_TYPE_FAST;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user