This is what IPSec OE was created to solve, but nobody uses it – instead using things like TLS, which also provides protocol aware non-repudiation.