nymtech / sphinx

A Sphinx implementation in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does payload padding still make sense?

jstuczyn opened this issue · comments

Or even, has it ever made any sense? Recall that inside sphinx library itself we are padding the received message so that the payload has constant length: https://github.com/nymtech/sphinx/blob/develop/src/payload/mod.rs#L95-L96 . But should it even be responsibility of this library? I think it should rather be up to the user to what they put there. Plus right now (inside nym) we are padding the message twice and thus losing a tiny bit of possible data we could send.

You need body padding somewhere, but obviously not twice. ;) You want some quality-of-service layer with erasure coding that does the actual padding. All applications must share the same transport and quality-of-service layer, so like Alice trickles out new objects from her and Bob's shared git repo as she messages him. Also, the mixnet itself should use this quality-of-service layer, so Alice packs in some extra SURBs for Bob when she sends him a small message or whatever. I think one hard question is: what does the interface for a quality-of-service layer that supports really extreme slowdowns look like?