role alice (, : 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 | (1) State = 0 ∧ Rcv(start) =∣> | State′:= 1 ∧ := (··) | % Send the registration request message | ∧ Snd(·_) | % Keep secret to and , to | ∧ secret(, subs1, ) | ∧ secret(, , subs2, ) | % Receive the smart card from the registration server | (2) State = 1 ∧ Rcv()). | xor((), ))). | xor(, (()))). | xor(, ((()))). | _) =∣> | % Login phase | State′:= 2 ∧ | := xor(((())), | xor(, (()))) | ∧ := xor(xor((), | (())), | (())) | % generate a random nonce | ∧ := new() | % is the current system timestamp | ∧ := new() | ∧ := xor(, ) | ∧ := () | % Send the login request message | ∧ Snd(·) | % has freshly generated the random nonce for | ∧ witness(, , alice_bob_rc, ) | % has freshly generated the timestamp for | ∧ witness(, , alice_bob_tc, ) | % Authentication phase | % Receive the authentication request message | (3) State = 2 ∧ Rcv(xor(xor(, ). | xor((xor(xor(xor(xor(xor((), | (())), | (.())), ), | ()), ), ). | (((. | ). | ) =∣> | % Send the authentication acknowlegement message | State′:= 3 ∧ | := xor(xor(xor(xor((), ), ), | ()), ) | ∧ := () | ∧ := (((. | ) | ∧ := (ADD(((). | ADD() | ∧ Snd() | % ’s acceptance of the value generated for by | ∧ request(, , bob_alice_rs, ) | % ’s acceptance of the value generated for by | ∧ request(, , bob_alice_ts, ) | end role |
|