Description
While testing the example app, I ran into the following problem: In Alice's webapp (the initiator), she confirmed the authcode too close to the timeout. Alice gets a handshake completed message in that webpage, but in Bob's webapp, the final handshake message did not arrive on time, so a "Pairing Timeout" error was shown.
The timeout I implemented is not exactly what is described in https://rfc.vac.dev/spec/37/#session-states but it is something temporary while we implement stale session support. In any case, once stale sessions are implemented, the scenario described above could still happen, with Bob (the receiver), assuming that a session is stale because it did not receive the last message on time.
So, besides implementing the functionality to mark a session as stale, should we also implement a way to notify that the handshake was successful? i.e: in this pattern, Alice should wait until Bob confirms that it received the message generated in the d
step, to assume that the handshake pairing was completed? this confirmation message could be sent/received with the cipherstate objects obtained from finalizing the handshake.
WakuPairing:
a. <- eB {H(sB||r), contentTopicParams, messageNametag}
...
b. -> eA, eAeB {H(sA||s)} [authcode]
c. <- sB, eAsB {r}
d. -> sA, sAeB, sAsB {s}
{}: payload, []: user interaction
I'm thinking this is more of an application concern, because as far as 35/WAKU2-NOISE concerns, the handshake was done according to specs, it's just that the timeout mechanism stops the process from being completed successfully.
Or perhaps we should remove this timeout and not implement stale session functionality at all? In the meantime I increased the timeout to 2m.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status