(herald "Perrig-Song Example protocol" (comment "auth failure known to them.")) (comment "CPSA 2.2.11") (comment "All input read from ps.scm") (defprotocol ps basic (defrole init (vars (my_init_id yr_resp_id name) (n1 n2 text)) (trace (send (cat my_init_id n1)) (recv (enc n1 n2 (ltk my_init_id yr_resp_id))) (send n2))) (defrole resp (vars (my_resp_id yr_init_id name) (n2 n1 text)) (trace (recv (cat yr_init_id n1)) (send (enc n1 n2 (ltk yr_init_id my_resp_id))) (recv n2)))) (defskeleton ps (vars (n1 n2 text) (a b name)) (defstrand init 3 (n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b)) (non-orig (ltk a b)) (uniq-orig n1) (comment "Initiator point-of-view") (traces ((send (cat a n1)) (recv (enc n1 n2 (ltk a b))) (send n2))) (label 0) (unrealized (0 1)) (origs (n1 (0 0))) (comment "1 in cohort - 1 not yet seen")) (defskeleton ps (vars (n1 n2 text) (a b name)) (defstrand init 3 (n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b)) (defstrand resp 2 (n2 n2) (n1 n1) (my_resp_id b) (yr_init_id a)) (precedes ((0 0) (1 0)) ((1 1) (0 1))) (non-orig (ltk a b)) (uniq-orig n1) (operation encryption-test (added-strand resp 2) (enc n1 n2 (ltk a b)) (0 1)) (traces ((send (cat a n1)) (recv (enc n1 n2 (ltk a b))) (send n2)) ((recv (cat a n1)) (send (enc n1 n2 (ltk a b))))) (label 1) (parent 0) (unrealized) (shape) (maps ((0) ((a a) (b b) (n1 n1) (n2 n2)))) (origs (n1 (0 0)))) (comment "Nothing left to do")