(comment "CPSA 2.2.11")
(comment "Extracted shapes")
(herald "Perrig-Song Example protocol, symmetrized."
  (comment "auth failure known to them."
    "Symmetrized to symulate (ltk a b) = (ltk b a)"))
(comment "CPSA 2.2.11")
(comment "All input read from ps_sym.scm")

Trees: 0 3.

Tree 0.

2 1 0
(defprotocol ps basic
  (defrole init_l
    (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 init_r
    (vars (my_init_id yr_resp_id name) (n1 n2 text))
    (trace (send (cat my_init_id n1))
      (recv (enc n1 n2 (ltk yr_resp_id my_init_id))) (send n2)))
  (defrole resp_l
    (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)))
  (defrole resp_r
    (vars (my_resp_id yr_init_id name) (n2 n1 text))
    (trace (recv (cat yr_init_id n1))
      (send (enc n1 n2 (ltk my_resp_id yr_init_id))) (recv n2))))

Item 0, Children: 1 2.

n2 (enc n1 n2 (ltk a b)) (cat a n1) ((n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b)) init_l ps 0
(defskeleton ps
  (vars (n1 n2 text) (a b name))
  (defstrand init_l 3 (n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b))
  (non-orig (ltk a b) (ltk b a))
  (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 "2 in cohort - 2 not yet seen"))

Item 1, Parent: 0.

(enc n1 n2 (ltk a b)) (cat a n1) n2 (enc n1 n2 (ltk a b)) (cat a n1) ((n2 n2) (n1 n1) (my_resp_id b) (yr_init_id a)) resp_l ((n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b)) init_l ps 1 (realized)
(defskeleton ps
  (vars (n1 n2 text) (a b name))
  (defstrand init_l 3 (n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b))
  (defstrand resp_l 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) (ltk b a))
  (uniq-orig n1)
  (operation encryption-test (added-strand resp_l 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))))

Item 2, Parent: 0.

(enc n1 n2 (ltk a b)) (cat b n1) n2 (enc n1 n2 (ltk a b)) (cat a n1) ((n2 n2) (n1 n1) (my_resp_id a) (yr_init_id b)) resp_r ((n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b)) init_l ps 2 (realized)
(defskeleton ps
  (vars (n1 n2 text) (a b name))
  (defstrand init_l 3 (n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b))
  (defstrand resp_r 2 (n2 n2) (n1 n1) (my_resp_id a) (yr_init_id b))
  (precedes ((0 0) (1 0)) ((1 1) (0 1)))
  (non-orig (ltk a b) (ltk b a))
  (uniq-orig n1)
  (operation encryption-test (added-strand resp_r 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 b n1)) (send (enc n1 n2 (ltk a b)))))
  (label 2)
  (parent 0)
  (unrealized)
  (shape)
  (maps ((0) ((a a) (b b) (n1 n1) (n2 n2))))
  (origs (n1 (0 0))))

Tree 3.

5 4 3
(defprotocol ps basic
  (defrole init_l
    (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 init_r
    (vars (my_init_id yr_resp_id name) (n1 n2 text))
    (trace (send (cat my_init_id n1))
      (recv (enc n1 n2 (ltk yr_resp_id my_init_id))) (send n2)))
  (defrole resp_l
    (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)))
  (defrole resp_r
    (vars (my_resp_id yr_init_id name) (n2 n1 text))
    (trace (recv (cat yr_init_id n1))
      (send (enc n1 n2 (ltk my_resp_id yr_init_id))) (recv n2))))

Item 3, Children: 4 5.

n2 (enc n1 n2 (ltk b a)) (cat a n1) ((n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b)) init_r ps 3
(defskeleton ps
  (vars (n1 n2 text) (a b name))
  (defstrand init_r 3 (n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b))
  (non-orig (ltk a b) (ltk b a))
  (uniq-orig n1)
  (comment "Initiator point-of-view, symmetric")
  (traces ((send (cat a n1)) (recv (enc n1 n2 (ltk b a))) (send n2)))
  (label 3)
  (unrealized (0 1))
  (origs (n1 (0 0)))
  (comment "2 in cohort - 2 not yet seen"))

Item 4, Parent: 3.

(enc n1 n2 (ltk b a)) (cat b n1) n2 (enc n1 n2 (ltk b a)) (cat a n1) ((n2 n2) (n1 n1) (my_resp_id a) (yr_init_id b)) resp_l ((n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b)) init_r ps 4 (realized)
(defskeleton ps
  (vars (n1 n2 text) (a b name))
  (defstrand init_r 3 (n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b))
  (defstrand resp_l 2 (n2 n2) (n1 n1) (my_resp_id a) (yr_init_id b))
  (precedes ((0 0) (1 0)) ((1 1) (0 1)))
  (non-orig (ltk a b) (ltk b a))
  (uniq-orig n1)
  (operation encryption-test (added-strand resp_l 2)
    (enc n1 n2 (ltk b a)) (0 1))
  (traces ((send (cat a n1)) (recv (enc n1 n2 (ltk b a))) (send n2))
    ((recv (cat b n1)) (send (enc n1 n2 (ltk b a)))))
  (label 4)
  (parent 3)
  (unrealized)
  (shape)
  (maps ((0) ((a a) (b b) (n1 n1) (n2 n2))))
  (origs (n1 (0 0))))

Item 5, Parent: 3.

(enc n1 n2 (ltk b a)) (cat a n1) n2 (enc n1 n2 (ltk b a)) (cat a n1) ((n2 n2) (n1 n1) (my_resp_id b) (yr_init_id a)) resp_r ((n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b)) init_r ps 5 (realized)
(defskeleton ps
  (vars (n1 n2 text) (a b name))
  (defstrand init_r 3 (n1 n1) (n2 n2) (my_init_id a) (yr_resp_id b))
  (defstrand resp_r 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) (ltk b a))
  (uniq-orig n1)
  (operation encryption-test (added-strand resp_r 2)
    (enc n1 n2 (ltk b a)) (0 1))
  (traces ((send (cat a n1)) (recv (enc n1 n2 (ltk b a))) (send n2))
    ((recv (cat a n1)) (send (enc n1 n2 (ltk b a)))))
  (label 5)
  (parent 3)
  (unrealized)
  (shape)
  (maps ((0) ((a a) (b b) (n1 n1) (n2 n2))))
  (origs (n1 (0 0))))