Had some time, implemented the rest of the proposal as well to check
feasibility and updated the proposal with some new insights. Looking
forward to all comments on this!
Could we have a spec revision (based on tor-dev comments) before I review this? I'd like clarity on what the opaque blobs are supposed to contain so that I know whether they really do.
I still think "INTRODUCE" is a pretty vague name. How about INTRODUCE_HANDOFF?
I really don't like sending private keys around like this. Is there any way to avoid it?
Comments on the code's documentation:
I still believe you should specify the actual contents and format of the blob. rend_service_handoff_introduce has this information, but only sort of.
Actually, rend_service_handoff_introduce's generation and parsing code is the kind of thing I made Trunnel for. Here is a trunnel specification that would let you get rid of 90% of the code for generating and parsing these:
(Actually, the non-trunnel binary parsing/generating code is broken. It can overflow its buffer on bad inputs, and it checks for overflow only after copying data in some bases, and it has endianness issues. I'd suggest scrapping it for the trunnel-generated version.)
I really don't like sending private keys around like this. Is there any way to avoid it?
I discussed an alternative design with TvdW, where the introduction side decrypts the blob using the introduction key, then hands off the decrypted fields to the rendezvous side. This avoids sending the key, so if the decrypted fields are exposed, only that rendezvous is affected. The tradeoff is increased decryption load on the introduction side.
I think this change is worth it for the security improvement.
I really don't like sending private keys around like this. Is there any way to avoid it?
I discussed an alternative design with TvdW, where the introduction side decrypts the blob using the introduction key, then hands off the decrypted fields to the rendezvous side. This avoids sending the key, so if the decrypted fields are exposed, only that rendezvous is affected. The tradeoff is increased decryption load on the introduction side.
I think this change is worth it for the security improvement.
It seems to me that if this new design goes forward, the feature will be almost equivalent to what #16059 (moved) needs for the "rendezvous approver" API.
The latest branch for this proposal leaves rend_service_relaunch_rendezvous untouched. It is called if the first rendezvous attempt fails in the middle of building the circuit to the rendezvous point.
Can you please either:
explain why rend_service_relaunch_rendezvous works as-is with this feature, or
modify rend_service_relaunch_rendezvous to work correctly with this feature.
Has a decision been taken here on what the final proposal should be doing? Whether the decryption happens on the introducer side or on the rendezvouer side?
I just pushed a new branch, now with the decryption done before the handoff, and the event renamed to INTRODUCE_HANDOFF. The blob logic is now moved to Trunnel.
Spec branch will follow soon. Code branch still lacks tests (Sorry!)
@teor: I had a look at rend_service_relaunch_rendezvous. Looks like no change is needed, as rend_service_perform_rendezvous sets up the internal structures correctly.