summaryrefslogtreecommitdiff
path: root/src/irmd/reg/flow.h
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-06-21 13:35:45 +0200
committerSander Vrijders <sander@ouroboros.rocks>2026-06-29 08:32:59 +0200
commit110d3ed8526197bd866e02199bfeae7569d73d8d (patch)
tree2f1cd02c69dd6b7e1bf4924b488505f570e5c2b1 /src/irmd/reg/flow.h
parent84e1a6c0e9f6a7aed3c367e5b6fce029db0fc453 (diff)
downloadouroboros-110d3ed8526197bd866e02199bfeae7569d73d8d.tar.gz
ouroboros-110d3ed8526197bd866e02199bfeae7569d73d8d.zip
irmd: Complete bidirectional flow re-keying
Extend re-key delivery beyond the locally-initiated watermark path: Handle peer-initiated re-key requests, allowing one request and one response per flow at a time. The client side wins if both ends try to re-key at the same time. Caches the peer certificate to support cert-less authenticated/signed re-keys. After a rekey, the initiator promotes first (timer) and starts sending under the new key. The responder observes the new key (peer_synced) and then the responder promotes. The responder will self-decide to use the new keys if it exhausted the older set in the case where it never sees the peer (unidirectional flow). Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/reg/flow.h')
-rw-r--r--src/irmd/reg/flow.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/irmd/reg/flow.h b/src/irmd/reg/flow.h
index 15fc7b8f..166bed61 100644
--- a/src/irmd/reg/flow.h
+++ b/src/irmd/reg/flow.h
@@ -55,9 +55,14 @@ struct reg_flow {
uint8_t epoch; /* last epoch installed by app */
bool initiator; /* OAP initiator (role 0) */
bool in_flight; /* a re-key is in progress */
- uint8_t pending_seed[SYMMKEYSZ];
+ bool req_queued; /* a peer REQ is in the inbox */
+ bool resp_queued; /* a peer RESP is in the inbox */
+ uint8_t * pending_seed; /* secure heap; NULL until set */
uint8_t pending_epoch;
+ bool pending_initiator; /* pending seed: oap_cli side */
bool has_pending; /* new seed awaits app pull */
+ uint8_t pulled; /* direct: per-app pull mask */
+ buffer_t peer_crt; /* peer cert DER, cached at HS */
} rk;
struct ssm_rbuff * n_rb;