diff options
| author | eunhhu <[email protected]> | 2026-09-27 19:17:02 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-27 19:17:02 +0100 |
| commit | 6d276be51ba89b04a60bb16b5179c015ad202c7c (patch) | |
| tree | 1d30ae7bbb2d1db9e9a1b627d0fb76dc26eaf074 /core/module-store.h | |
| parent | 313c4fa1720a0019c87083d3523b6643606c5aa6 (diff) | |
| download | pure-6d276be51ba89b04a60bb16b5179c015ad202c7c.tar.gz pure-6d276be51ba89b04a60bb16b5179c015ad202c7c.zip | |
Seal in one session a wire, authenticated by the sender's key (088)
A sealed request cost three X25519 operations (about 0.5 ms), so sealed
sends drained at half the plain rate. A wire now keeps one HPKE context,
encapsulated at its first seal, and seals each request as the context's
next number (a failed seal or a restart starts a new session); the
header carries the session's encapsulated key and the number, so a
receiver opens a session once per connection thread (16 remembered, the
least used replaced) and each seal by its number, also after it restarts,
unasked. A sender with a key of its own seals in HPKE auth mode and names
that key in the header; a receiver started with --sender NAME=KEY takes
deliveries only from the senders it names, each sealed with its key
(403 sender otherwise). The body is now the ciphertext and its tag.
Sealed sends, sender authenticated, drain at 461-464k a second against
462-470k plain and 207-234k sealed a request at a time (Raspberry Pi 5).
The check adds: a wire's requests share one session numbered from 0; a
changed number or sender key does not open; a receiver restarted naming
its sender opens the same session again; another node claiming that
sender's name with its own key is refused and applies nothing.
Diffstat (limited to 'core/module-store.h')
0 files changed, 0 insertions, 0 deletions
