Commit Graph

21 Commits

Author SHA1 Message Date
a1346054
65237a8ecf trim trailing whitespace 2021-08-25 19:19:52 +00:00
Brian Warner
c9d36888bb docs: add dilation state machines diagram 2019-07-05 15:56:13 -07:00
Brian Warner
34686a346a add dilation code
(this compresses several months of false starts and rearchitecting)
2018-12-23 15:21:08 -05:00
Brian Warner
64f973b0e9 docs/state-machines: build all images 2017-10-29 21:42:05 +08:00
Brian Warner
82b4327f23 machines.dot: remove missing message (stopped) 2017-04-23 15:29:31 -04:00
Brian Warner
83e55f1f3e add w.when_key(), fix w.when_verified() to fire later
Previously, w.when_verified() was documented to fire only after a valid
encrypted message was received, but in fact it fired as soon as the shared
key was derived (before any encrypted messages are seen, so no actual
"verification" could occur yet).

This fixes that, and also adds a new w.when_key() API call which fires at the
earlier point. Having something which fires early is useful for the CLI
commands that want to print a pacifier message when the peer is responding
slowly. In particular it helps detect the case where 'wormhole send' has quit
early (after depositing the PAKE message on the server, but before the
receiver has started). In this case, the receiver will compute the shared
key, but then wait forever hoping for a VERSION that will never come. By
starting a timer when w.when_key() fires, and cancelling it when
w.when_verified() fires, we have a good place to tell the user that something
is taking longer than it should have.

This shifts responsibility for notifying Boss.got_verifier, out of Key and
into Receive, since Receive is what notices the first valid encrypted
message. It also shifts the Boss's ordering expectations: it now receives
B.happy() before B.got_verifier(), and consequently got_verifier ought to
arrive in the S2_happy state rather than S1_lonely.
2017-04-06 18:27:41 -07:00
Brian Warner
76f5960517 rewrite welcome handler 2017-04-06 12:22:45 -07:00
Brian Warner
0ed363c894 Key: sort messages to ensure got_code lands before got_pake
Since input_code() sets the nameplate before setting the rest of the code,
and since the sender's PAKE will arrive as soon as the nameplate is set, we
could got_pake before got_code, and Key wasn't prepared to handle that.
2017-04-06 12:22:44 -07:00
Brian Warner
bd974f3801 test Nameplate, Mailbox. refactor a little bit 2017-04-06 12:22:44 -07:00
Brian Warner
3873f55d64 make Input tests pass, clarify error cases, cleanups 2017-04-06 12:22:44 -07:00
Brian Warner
175fef2ab4 clean up wordlist handling 2017-04-06 12:22:44 -07:00
Brian Warner
ae95948c17 more tweaks 2017-04-06 12:22:44 -07:00
Brian Warner
4f1b352b2a more work: allocator, input, shift responsibilities 2017-04-06 12:22:44 -07:00
Brian Warner
79d38da497 split Code into Code/Input/Allocator, ostensibly simpler 2017-04-06 12:22:44 -07:00
Brian Warner
0ddc93110b work on new Code state machine design 2017-04-06 12:22:44 -07:00
Brian Warner
6ada8252b7 Code: handle being connected before being told what to do 2017-04-06 12:21:00 -07:00
Brian Warner
e9f3107127 deliver app-versions up to Wormhole 2017-04-06 12:21:00 -07:00
Brian Warner
60a61c995b implement w.derive_key() 2017-04-06 12:21:00 -07:00
Brian Warner
b7b8df17be rename NameplateLister to Lister (unique prefix L) 2017-04-06 12:21:00 -07:00
Brian Warner
9a2d992815 reminder how ConnectionService should fail if first attempt fails 2017-04-06 12:21:00 -07:00
Brian Warner
fcdcf30ba8 docs: move state machine diagrams into separate directory 2017-04-06 12:21:00 -07:00