aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/client/circuit/padding
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade to itertools 0.15.0Nick Mathewson2026-07-011-10/+9
| | | | | | Additionally, fix itertools usage in maybenot_padding.rs The definition of `Position` changed in 0.15.0.
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-4/+4
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* proto: Take current time as an argument when constructing padder.Nick Mathewson2026-03-312-7/+12
| | | | | | | Previously we'd get the time by calling Instant::now, but that would lead to a mismatch with the runtime if we were mocking. Part of #2428.
* tor-proto: Port to web-time-compatNick Mathewson2026-03-262-2/+4
|
* proto; Factor HOPS constant out of maybenot_paddingGabriela Moldovan2026-01-291-3/+1
| | | | I am about to use this in other places too.
* proto: Implement channel padding with maybenot padders.Nick Mathewson2025-10-021-1/+0
| | | | With this commit we now actually generate padding when we're told to.
* proto: Trigger maybenot events for channel-level padding.Nick Mathewson2025-10-022-0/+9
|
* proto: Use a VecDeque for padding events; avoid reversing.Nick Mathewson2025-09-171-11/+7
|
* proto: Rename PaddingEventVec => PaddingEventQueueNick Mathewson2025-09-171-5/+5
|
* proto: Fix a pair of padding setup TODOs.Nick Mathewson2025-09-171-22/+37
| | | | | | | | | When we install a new padder, we should check whether we have become unblocked, and we should wake up the PaddingEventStream in case the new padder has something to say. This has required us to move a couple of fields around, but not in a very complicated way.
* proto: resolve/edit trivial "TODO circpad" instances.Nick Mathewson2025-09-172-5/+7
|
* Fix several rustdoc links.Nick Mathewson2025-09-161-3/+3
|
* proto: Remove/narrow circ-padding allow(dead_code) exception.Nick Mathewson2025-09-152-16/+9
| | | | | We still have dead code when circ-padding but not circ-padding-manual is provided.
* proto: Experimental API to install a circuit padder at a hop.Nick Mathewson2025-09-152-18/+176
| | | | | | | | | | | | For now, we're not going to implement hop negotiation: we're still waiting to find a set of padding machines that will be useful for Arti. This API will help facilitate experimentation to find such padding machines. These APIs are under a separate feature (`circ-padding-manual`) to avoid confusing them with the rest of the padding code: we only want them to be exported when the researcher wants to manually install circuit padding.
* proto: Fix a semantic merge conflict.Nick Mathewson2025-09-151-1/+2
|
* Merge branch 'maybenot-validate-padding' into 'main'Nick Mathewson2025-09-152-36/+156
|\ | | | | | | | | Validate incoming padding, and permit it when it is valid. See merge request tpo/core/arti!3241
| * proto: Use a new error type for excess padding.Nick Mathewson2025-09-152-24/+14
| |
| * proto, padding: A different formula to check padding totalNick Mathewson2025-09-151-1/+6
| | | | | | | | | | | | | | | | FMUL is usually faster than FDIV, so let's give that a try, in case the compiler doesn't figure it out on its own. Also, add a comment discussing an approach that might be better, if we run into a bottleneck here.
| * proto: Keep stats on padding, and kill circuits when too much is sent.Nick Mathewson2025-09-091-1/+113
| | | | | | | | The algorithm is simplistic, but may be useful
| * tor-proto: Move some functions from PaddingController to PaddingSharedNick Mathewson2025-09-091-30/+35
| | | | | | | | This will help avoid needing to acquire the lock more than once.
| * proto: Make decrypted_padding fallible.Nick Mathewson2025-09-092-6/+14
| | | | | | | | This will let us reject excessive padding.
* | Merge branch 'correct_replace_behavior' into 'main'Nick Mathewson2025-09-151-1/+15
|\ \ | | | | | | | | | | | | Circuit padding: fix a couple of issues with the "replace" flag. See merge request tpo/core/arti!3246
| * | proto: Only replace padding when the target will see it.Nick Mathewson2025-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we would replace padding with any cell that was already in the queue. But that doesn't make sense: If we have a cell queued for hop 1, then we shouldn't use it as padding for hop 2, since hop 2 will never see it! Instead, we look at the target hops for the already queued cells. Ref: - https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3225/diffs?commit_id=3998e0559fbcc06f8ea88968051cebca71489a52
| * | proto: Emit the correct events on replacing paddingNick Mathewson2025-09-101-0/+14
| |/ | | | | | | | | | | | | | | | | | | When we replace padding with an _already queued_ cell, we should only trigger PaddingSent on the final hop's machine. Refs: - https://github.com/maybenot-io/maybenot/commit/35ba39d629d1e64a1346586112837e5015c47242#r164166126 - https://github.com/maybenot-io/maybenot/pull/35/commits/715455b8dcd95a32eafe261ab500cfed9415b7f3 - https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3225/diffs?commit_id=79a3305dc226f9f1136cad034e1a36413d6595f5
* / proto: Simplify/correct padding-based blocking logic.Nick Mathewson2025-09-111-15/+32
|/ | | | | | | | The correction: We want to report a block as bypassable only if _every_ currently blocking hop has bypassable blocking. The simplification: We don't need to report the first hop that's blocking any more.
* proto: Make PaddingEvent uninhabited when padding is disabled.Nick Mathewson2025-09-092-1/+24
|
* proto: Implement run_padding_action.Nick Mathewson2025-09-091-0/+5
|
* proto: Make PaddingEventStream implement FusedStream.Nick Mathewson2025-09-082-0/+16
|
* Require maybenot 2.2.0 for paddingNick Mathewson2025-09-081-2/+1
| | | | | It cleans up and changes a few things. Changelog at https://github.com/maybenot-io/maybenot/blob/main/crates/maybenot/CHANGELOG.md
* padding: Fix compilation with padding disabled.Nick Mathewson2025-09-031-1/+16
|
* padding: Give CircEnt in a Channel a handle for the PaddingController.Nick Mathewson2025-09-021-1/+2
| | | | | This requires some annoying plumbing to make sure that the right types wind up in the right places.
* padding: Install a PaddingController in each circuit.Nick Mathewson2025-09-021-1/+1
| | | | Also, use it to report that we have queued normal data.
* padding: track which hop each queued cell is for.Nick Mathewson2025-09-022-9/+66
| | | | | | | | We'll need this so that we can tell the right padding machine(s) which of them just had a queue flush. This is not yet 100% done; the unfinished parts are marked with XXXXs.
* padding: document when we set next_scheduled_wakeupNick Mathewson2025-09-021-0/+3
|
* padding: Call hops "target" rather than "final" for clarityNick Mathewson2025-09-021-4/+6
|
* padding: s/can_bypass/is_bypassable/ for clarity.Nick Mathewson2025-09-022-10/+11
|
* padding: Clarify next_expiration vs next_scheduled_wakeupNick Mathewson2025-09-021-4/+9
|
* padding: Several comment/style fixes from @gabi-250Nick Mathewson2025-09-023-7/+10
|
* Define and implement a backend padding API, based on maybenot.Nick Mathewson2025-09-023-0/+1262
There are incomplete pieces, marked with "TODO circpad". There is no integration into the circuit reactor code yet. Part of #63