summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-proto: remove some now-unneeded accessors.Nick Mathewson2025-05-061-35/+15
|
* Emit SendmeTag directly from cell crypto.Nick Mathewson2025-05-067-100/+90
| | | | | | | | | | | | | | | | | | | | This changes the code to copy a SendmeTag rather than returning a slice. This isn't actually a big change: sending a slice already required 16 bytes (on 64-bit platforms), so sending a SendmeTag around isn't a big deal. We rely extensively on the compiler's ability to optimize away all the checking in code like this: ``` let slice: &[u8]; let a: [u8;N] = slice[0..N].try_into().expect("Nope"); ``` I've spot-checked it somewhat with "cargo-show-asm", but it could use more thorough checking. Closes #1956.
* Remove the last traces of CircTag.Nick Mathewson2025-05-065-21/+19
|
* proto: Use SendmeTag in place of CircTagNick Mathewson2025-05-062-54/+9
| | | | | This doesn't make much change yet, but does save us an allocation when handling SENDMEs.
* proto: Split out CGO BlkCipher trait for Encryption/DecryptionNick Mathewson2025-05-062-57/+172
| | | | | | This lets us use `Aes128Dec` and `Aes128Enc` in place of plain old `Aes128`, which can be less space-efficient depending on the back-end.
* Merge branch 'clientcirc_extend' into 'main'Nick Mathewson2025-05-061-6/+59
|\ | | | | | | | | | | | | tor-proto: New extend() and create_firsthop() to pick between ntor and ntor3 Closes #1970 See merge request tpo/core/arti!2967
| * proto: Fix documentation to avoid recommending ntor methodsNick Mathewson2025-04-281-6/+8
| | | | | | | | | | | | Since we have create_firsthop() and extend(), we should recommend them in our documentation, instead of recommending the no-longer-best methods.
| * proto: Provide and use a create_firsthop() wrapper too.Nick Mathewson2025-04-281-0/+23
| |
| * tor-proto: New extend() to pick between ntor and ntor3Nick Mathewson2025-04-281-0/+28
| | | | | | | | | | | | | | | | | | In the future, when we add more circuit handshakes (PQ anyone?) we'll want to have the logic for choosing which to use be unified. Almost nobody calling tor-proto should need to care which circuit handshake is going to be used. Closes #1970.
* | tor-proto: Use AcqRel instead of SeqCst to clarify intent.Gabriela Moldovan2025-05-062-3/+3
| | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2946#note_3192334
* | tor-proto: Document the lifecycle of a ConfluxSet.Gabriela Moldovan2025-05-061-1/+28
| |
* | tor-proto: Document why RemoveLegReason exists.Gabriela Moldovan2025-05-061-0/+14
| |
* | tor-proto: Move error binding under is_conflux_pending condition.Gabriela Moldovan2025-05-061-7/+6
| | | | | | | | We don't use it outside this branch, so might as well move it there.
* | tor-proto: Remove already-addressed TODO.Gabriela Moldovan2025-05-061-2/+0
| | | | | | | | We already do this, using `note_conflux_handshake_result`.
* | tor-proto: Explain why the handshake result is noted before the LINKED_ACK.Gabriela Moldovan2025-05-061-1/+10
| |
* | tor-proto: Remove confusing parts of join_point docs.Gabriela Moldovan2025-05-061-4/+1
| |
* | tor-proto: Future-proof the unsupported_client_cell macro.Gabriela Moldovan2025-05-061-1/+2
| | | | | | | | | | Prompted by opara's suggestion in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2946#note_3192319
* | tor-proto: Clarify why ConfluxHandshakeComplete exists.Gabriela Moldovan2025-05-061-0/+8
| |
* | tor-proto: s/ConfluxTunnelResult/ConfluxHandshakeResults.Gabriela Moldovan2025-05-061-4/+4
| |
* | tor-proto: Linkify reference to HopDetail.Gabriela Moldovan2025-05-061-1/+1
| |
* | tor-proto: Fix incorrect RemoveLeg docs.Gabriela Moldovan2025-05-061-1/+1
| |
* | tor-proto: Clarify ConfluxHandshakeComplete docs.Gabriela Moldovan2025-05-061-2/+3
| |
* | tor-proto: Remove unnecessary TODO.Gabriela Moldovan2025-05-061-2/+0
| |
* | tor-proto: Add TODO about only switching legs before sending a cell.Gabriela Moldovan2025-05-061-0/+4
| |
* | tor-proto: Increment last delivered seqno for items popped from the heap.Gabriela Moldovan2025-05-062-4/+14
| |
* | tor-proto: Remove unnecessary &mut self.Gabriela Moldovan2025-05-061-1/+1
| |
* | tor-proto: Fix typo in warning.Gabriela Moldovan2025-05-061-1/+1
| |
* | tor-proto: Remove unnecessary mut in seqno check.Gabriela Moldovan2025-05-061-1/+1
| |
* | tor-proto: Rename helper closure for clarity.Gabriela Moldovan2025-05-061-2/+2
| |
* | tor-proto: s/leg/hop in variable name for clarity.Gabriela Moldovan2025-05-061-2/+2
| |
* | tor-proto: Get rid of unnecessary clone().Gabriela Moldovan2025-05-061-4/+1
| |
* | tor-proto: Note that we need to update impl based on torspec!369Gabriela Moldovan2025-05-061-0/+2
| |
* | tor-proto: Note the LINK cell was sent after sending it.Gabriela Moldovan2025-05-061-5/+9
| |
* | tor-proto: Shut down if conflux initiator is gone before handshake completes.Gabriela Moldovan2025-05-061-13/+28
| |
* | tor-proto: Move SWITCH seqno validation to validate_switch_seqno.Gabriela Moldovan2025-05-061-8/+8
| |
* | tor-proto: Validate conflux state before decoding SWITCH.Gabriela Moldovan2025-05-061-5/+5
| |
* | tor-proto: s/link/linked_ack in variable name.Gabriela Moldovan2025-05-061-2/+2
| |
* | tor-proto: Validate conflux state before decoding LINKED cell.Gabriela Moldovan2025-05-061-17/+17
| |
* | tor-proto: Check that we sent a LINK cell before decoding LINKED response.Gabriela Moldovan2025-05-061-5/+5
| |
* | tor-proto: Use u64 for the conflux seqnos.Gabriela Moldovan2025-05-064-22/+32
| |
* | tor-proto: Mention that the error came from a conflux circuit.Gabriela Moldovan2025-05-061-1/+1
| |
* | tor-proto: Remove references to non-client handlers from ↵Gabriela Moldovan2025-05-061-6/+1
| | | | | | | | ClientConfluxMsgHandler.
* | tor-proto: Allow cognitive complexity on handle_meta_cell.Gabriela Moldovan2025-05-061-0/+1
| |
* | tor-proto: Deferred fmt.Gabriela Moldovan2025-05-061-4/+1
| |
* | tor-proto: Handle conflux handshake timeout, notify on completion.Gabriela Moldovan2025-05-065-44/+133
| |
* | tor-proto: Use wallclock time in ClientConfluxMsgHandler.Gabriela Moldovan2025-05-065-19/+42
| |
* | tor-proto: Implement conflux set leg removal.Gabriela Moldovan2025-05-064-7/+145
| |
* | tor-proto: Reject cells received before conflux handshake is complete.Gabriela Moldovan2025-05-061-0/+10
| |
* | tor-proto: Add a TODO about recovering from reactor errors.Gabriela Moldovan2025-05-061-0/+2
| |
* | tor-proto: Ensure the leg is linked before sending the cell.Gabriela Moldovan2025-05-061-0/+5
| |