Expand description
Profile overhead budgets. Charge each component separately (Recipe F).
Padding, relay copies, handshakes, cover traffic, retries, storage and
cryptographic work are never lumped into a single opaque total before
the checked add in OverheadBudget::total_bytes.
Structs§
- Overhead
Budget - Per-component overhead. Fields are independent charges.
Constants§
- P1_
PADDING_ BUCKET - P1 pads application size up to the next 256-byte bucket.
- P2_
RECORD_ BYTES - P2 default application record size (last-record padding uses this bucket).
- P3_
CELL_ BYTES - P3/P4 traffic-cell target. A 4 KiB record is not an MTU claim.
- P3_
COVER_ BYTES_ PER_ SEC - P3 initial optional cover budget: 4 KiB/s per direction.
- P3_
RELAY_ HOPS - P3 approved-relay hop count when relays are selected (not isolated bearer).
Functions§
- crypto_
work_ units - Crypto work units:
1 << profile_rank(P0=1, P1=2, P2=4, P3=8, P4=16). - estimate_
overhead OverheadBudget::estimate_overhead.- handshake_
bytes_ hybrid - Hybrid handshake byte count: initiator (ML-KEM-768 pk + X25519 pk) + responder (ML-KEM-768 ct + X25519 pk)
- pad_
to_ next_ bucket - Round
sizeup to the next multiple ofbucket. - record_
bucket - Records
bucket.