role bob (, : agent, | : symmetric_key, | % is hash function | : hash_func, | Snd, Rcv: channel(dy)) | % is the user; is the server | played_by | def = | local State: nat, | , , , , , , , : text, | % is a secret number to | % is a secret number to | , , , , , : text, | , : text, | ADD: hash_func, | , , , , , , , | , , , , , , : text | const alice_bob_tc, bob_alice_ts, | alice_bob_rc, bob_alice_rs, | subs1, subs2: protocol_id | init State:= 0 | transition | % Registration phase | % Receive the registration request message from the user | (1) State = 0 ∧ Rcv(()}_) =∣> | % Keep secret to and , to | State′:= 1 ∧ secret(, subs1, ) | ∧ secret(, , subs2, ) | % Send the smart card to the user | ∧ := (()) | ∧ := xor((), ) | ∧ := xor(, ()) | ∧ := xor(, ()) | ∧ Snd(_) | % Login phase | % Receive the login request message | (2) State = 1 ∧ Rcv(xor(((())), | xor(, (()))). | xor(xor(xor((), | (())), | (())), ). | () =∣> | % Authentication phase | State′:= 2 ∧ | % generate a random nonce | := new() | % is the current system timestamp | ∧ := new() | ∧ := () | ∧ := xor(xor(xor(xor(xor((), | (())), | (())), ), | ()), ) | ∧ := () | ∧ := xor(xor(, ), ) | ∧ := new() | ∧ := xor((), ) | ∧ := (((. | ) | % Send the authentication request message | ∧ Snd() | % has freshly generated the random nonce for | ∧ witness(, , bob_alice_rs, ) | % has freshly generated the timestamp for | ∧ witness(, , bob_alice_ts, ) | % Receive the authentication acknowledgement message | (3) State = 2 ∧ Rcv((ADD()()(). | ADD()) =∣> | % ’s acceptance of the value generated for by | State′:= 3 ∧ request(, , alice_bob_rc, ) | % ’s acceptance of the value generated for by | ∧ request(, , alice_bob_tc, ) | end role |
|