------------------------------------------------------------------------------ Mohamed G. Gouda Network Protocol Security CS 395T MT1 Solution ------------------------------------------------------------------------------ 1. process p const T : integer, /round-trip delay between p and q r : integer, /max. value for the shared key sk : 0..r-1, /shared key between p and q var t : integer, /text of current data msg nc : integer, /nonce of current data msg nc' : integer, /nonce of next data msg c : integer, /received ack ready : boolean begin ready --> ready := false; t := any; nc' := NNC; send data(NCR(sk, t|nc|nc')) to q [] rcv ack(c) from q --> if nc' = c --> ready := true; nc := nc' [] nc' <> c --> nc := c; send data(NCR(sk, t|nc|nc')) to q fi [] timeout ~ready ^ T time units have passed without executing any action --> send data(NCR(sk, t|nc|nc')) to q end ------------------------------------------------------------------------------- 2. for every certificate (u, v) do the following to disperse (u, v): if there is a node x such that x is the source or destination of every chain that has (u,v), then add (u,v) to D.x else if there are two nodes y and z such that y or z is the source or destination of every chain that has (u,v), then add (u,v) to D.y and D.z else add (u,v) to every D.x where x is the source of a chain that has (u,v). -------------------------------------------------------------------------------