Skip to main content

Module backend

Module backend 

Source
Expand description

Padding backend based on maybenot.

Β§Operation

For each each circuit hop, we have an optional maybenot::Framework. This framework wraps multiple β€œpadding machines”, each of which is a randomized state machine. (Arti is built with a list of pre-configured of padding machines. The set of padding machines to use with any given circuit hop are negotiated via PADDING_NEGOTIATE messages.) We interact with the framework via Framework::trigger_events, which consumes TriggerEvents and gives us TriggerActions. Those TriggerActions tell us to schedule or reschedule different timers, to block traffic, or to send padding.

We wrap the Framework in MaybenotPadder, which keeps track of the expiration time for each timer. From MaybenotPadder, we expose a single timer describing when the next action from the padding machine may be necessary. This timer is likely to update frequently.

Re-exportsΒ§

use std::sync::Arc; πŸ”’
use std::task::Waker; πŸ”’
use maybenot::MachineId; πŸ”’
use maybenot::TriggerEvent; πŸ”’
use smallvec::SmallVec; πŸ”’
use super::Bypass; πŸ”’
use super::Duration; πŸ”’
use super::Instant; πŸ”’
use super::PerHopPaddingEvent; πŸ”’
use super::PerHopPaddingEventVec; πŸ”’
use super::Replace; πŸ”’

StructsΒ§

BlockingState πŸ”’
State of a MaybenotPadder that is blocking.
MachineState πŸ”’
The state for a single padding Machine within a Framework.
MaybenotPadder πŸ”’
An implementation of circuit padding using maybenot.
PadderState πŸ”’
Represents the state for all padding machines within a framework.
ThisThreadRng πŸ”’
Helper: An Rng object that calls rand::rng() to get the thread Rng.
Timer πŸ”’
Possible state of a Framework’s aggregate timer.

EnumsΒ§

ScheduledAction πŸ”’
An action that we should take on a machine’s behalf, after a certain interval has elapsed.

TraitsΒ§

PaddingBackend πŸ”’
Helper trait: Used to wrap a single MaybenotPadder.

Type AliasesΒ§

Framework πŸ”’
The particular instantiated padding framework type that we use.
Rng πŸ”’
The Rng that we construct for our padding machines.
TriggerAction πŸ”’
A maybenot::TriggerAction as we construct it for use with our Frameworks.
TriggerEventsOutVec πŸ”’
A type we use to report events that we must trigger on the basis of triggering other events.