On Wed, Jan 12, 2022 at 12:01 PM Jens Alfke <[email protected]> wrote:

> Yeah, there are no integrity checks in the data stream, and I agree that’s
> a weakness*. Adding MACs requires adding a block- or message-oriented layer
> on top, like SecretBox, the way that Scuttlebutt does. This feels like
> redundant effort since Cap’nP also is itself message-oriented; my guess is
> that there’s a higher level API inside Cap’nP that exposes the message
> framing, and the MAC could be added there, but I have not yet delved deeper
> into the way Cap’nP works. (Hints welcome.)
>

You might want to look at the `capnp::MessageStream` abstraction, instead
of `kj::AsyncIoStream`. It lets you see whole messages, which makes it
easier to customize the framing.

-Kenton

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/CAJouXQ%3DN_iafGGMxh5kktODf0Bs_gALgO5hFpdmh%3DR94-Ay_3g%40mail.gmail.com.

Reply via email to