cpsa-3.6.8: tst/stationbase.tst
(herald "Station-to-station protocol" (algebra diffie-hellman))
(comment "CPSA 3.6.8")
(comment "All input read from tst/stationbase.scm")
(defprotocol station-to-station diffie-hellman
(defrole init
(vars (x rndx) (y expt) (a b name))
(trace (send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul x y)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
(uniq-gen x))
(defrole resp
(vars (y rndx) (x expt) (a b name))
(trace (recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul y x)))))
(recv
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul y x)))))
(uniq-gen y)
(absent (y (exp (gen) x)))))
(defskeleton station-to-station
(vars (a b name) (x rndx) (y expt))
(defstrand init 3 (a a) (b b) (x x) (y y))
(non-orig (privk a) (privk b))
(uniq-gen x)
(traces
((send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul x y)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y))))))
(label 0)
(unrealized (0 1))
(origs)
(comment "2 in cohort - 2 not yet seen"))
(defskeleton station-to-station
(vars (a b b-0 name) (x x-0 rndx))
(defstrand init 3 (a a) (b b) (x x-0) (y x))
(defstrand init 3 (a b) (b b-0) (x x) (y x-0))
(precedes ((0 0) (1 1)) ((1 2) (0 1)))
(non-orig (privk a) (privk b))
(uniq-gen x x-0)
(operation encryption-test (added-strand init 3)
(enc (exp (gen) x) (exp (gen) x-0) (privk b)) (0 1))
(traces
((send (exp (gen) x-0))
(recv
(cat (exp (gen) x)
(enc (enc (exp (gen) x) (exp (gen) x-0) (privk b))
(exp (gen) (mul x x-0)))))
(send
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk a))
(exp (gen) (mul x x-0)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) x-0)
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk b-0))
(exp (gen) (mul x x-0)))))
(send
(enc (enc (exp (gen) x) (exp (gen) x-0) (privk b))
(exp (gen) (mul x x-0))))))
(label 1)
(parent 0)
(unrealized (1 1))
(comment "1 in cohort - 1 not yet seen"))
(defskeleton station-to-station
(vars (a b name) (y x rndx))
(defstrand init 3 (a a) (b b) (x x) (y y))
(defstrand resp 2 (b b) (y y) (x x))
(precedes ((0 0) (1 0)) ((1 1) (0 1)))
(absent (y (exp (gen) x)))
(non-orig (privk a) (privk b))
(uniq-gen y x)
(operation encryption-test (added-strand resp 2)
(enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))
(traces
((send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul y x)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul y x)))))
((recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul y x)))))))
(label 2)
(parent 0)
(unrealized)
(shape)
(maps ((0) ((a a) (b b) (x x) (y y))))
(origs))
(defskeleton station-to-station
(vars (a b b-0 name) (x x-0 rndx))
(defstrand init 3 (a a) (b b) (x x-0) (y x))
(defstrand init 3 (a b) (b b-0) (x x) (y x-0))
(deflistener (exp (gen) (mul x x-0)))
(precedes ((0 0) (2 0)) ((1 0) (2 0)) ((1 2) (0 1)) ((2 1) (1 1)))
(non-orig (privk a) (privk b))
(uniq-gen x x-0)
(operation encryption-test (added-listener (exp (gen) (mul x x-0)))
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk b-0))
(exp (gen) (mul x x-0))) (1 1))
(traces
((send (exp (gen) x-0))
(recv
(cat (exp (gen) x)
(enc (enc (exp (gen) x) (exp (gen) x-0) (privk b))
(exp (gen) (mul x x-0)))))
(send
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk a))
(exp (gen) (mul x x-0)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) x-0)
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk b-0))
(exp (gen) (mul x x-0)))))
(send
(enc (enc (exp (gen) x) (exp (gen) x-0) (privk b))
(exp (gen) (mul x x-0)))))
((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0)))))
(label 3)
(parent 1)
(unrealized (2 0))
(comment "2 in cohort - 2 not yet seen"))
(defskeleton station-to-station
(vars (a b b-0 name) (x x-0 rndx))
(defstrand init 3 (a a) (b b) (x x-0) (y x))
(defstrand init 3 (a b) (b b-0) (x x) (y x-0))
(deflistener (exp (gen) (mul x x-0)))
(deflistener (cat (exp (gen) x) x-0))
(precedes ((0 0) (3 0)) ((1 0) (3 0)) ((1 2) (0 1)) ((2 1) (1 1))
((3 1) (2 0)))
(non-orig (privk a) (privk b))
(uniq-gen x x-0)
(operation nonce-test (added-listener (cat (exp (gen) x) x-0))
(exp (gen) (mul x x-0)) (2 0))
(traces
((send (exp (gen) x-0))
(recv
(cat (exp (gen) x)
(enc (enc (exp (gen) x) (exp (gen) x-0) (privk b))
(exp (gen) (mul x x-0)))))
(send
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk a))
(exp (gen) (mul x x-0)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) x-0)
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk b-0))
(exp (gen) (mul x x-0)))))
(send
(enc (enc (exp (gen) x) (exp (gen) x-0) (privk b))
(exp (gen) (mul x x-0)))))
((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))
((recv (cat (exp (gen) x) x-0)) (send (cat (exp (gen) x) x-0))))
(label 4)
(parent 3)
(unrealized (3 0))
(dead)
(comment "empty cohort"))
(defskeleton station-to-station
(vars (a b b-0 name) (x x-0 rndx))
(defstrand init 3 (a a) (b b) (x x-0) (y x))
(defstrand init 3 (a b) (b b-0) (x x) (y x-0))
(deflistener (exp (gen) (mul x x-0)))
(deflistener (cat (exp (gen) x-0) x))
(precedes ((0 0) (3 0)) ((1 0) (3 0)) ((1 2) (0 1)) ((2 1) (1 1))
((3 1) (2 0)))
(non-orig (privk a) (privk b))
(uniq-gen x x-0)
(operation nonce-test (added-listener (cat (exp (gen) x-0) x))
(exp (gen) (mul x x-0)) (2 0))
(traces
((send (exp (gen) x-0))
(recv
(cat (exp (gen) x)
(enc (enc (exp (gen) x) (exp (gen) x-0) (privk b))
(exp (gen) (mul x x-0)))))
(send
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk a))
(exp (gen) (mul x x-0)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) x-0)
(enc (enc (exp (gen) x-0) (exp (gen) x) (privk b-0))
(exp (gen) (mul x x-0)))))
(send
(enc (enc (exp (gen) x) (exp (gen) x-0) (privk b))
(exp (gen) (mul x x-0)))))
((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))
((recv (cat (exp (gen) x-0) x)) (send (cat (exp (gen) x-0) x))))
(label 5)
(parent 3)
(unrealized (3 0))
(dead)
(comment "empty cohort"))
(comment "Nothing left to do")
(defprotocol station-to-station diffie-hellman
(defrole init
(vars (x rndx) (y expt) (a b name))
(trace (send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul x y)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
(uniq-gen x))
(defrole resp
(vars (y rndx) (x expt) (a b name))
(trace (recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul y x)))))
(recv
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul y x)))))
(uniq-gen y)
(absent (y (exp (gen) x)))))
(defskeleton station-to-station
(vars (a b name) (y rndx) (x expt))
(defstrand resp 3 (a a) (b b) (y y) (x x))
(absent (y (exp (gen) x)))
(non-orig (privk a) (privk b))
(uniq-gen y)
(traces
((recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul y x)))))
(recv
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul y x))))))
(label 6)
(unrealized (0 2))
(origs)
(comment "1 in cohort - 1 not yet seen"))
(defskeleton station-to-station
(vars (a b b-0 name) (x y rndx))
(defstrand resp 3 (a a) (b b) (y y) (x x))
(defstrand init 3 (a a) (b b-0) (x x) (y y))
(precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))
(absent (y (exp (gen) x)))
(non-orig (privk a) (privk b))
(uniq-gen x y)
(operation encryption-test (added-strand init 3)
(enc (exp (gen) x) (exp (gen) y) (privk a)) (0 2))
(traces
((recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul x y)))))
(recv
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))
(exp (gen) (mul x y)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y))))))
(label 7)
(parent 6)
(unrealized (1 1))
(comment "2 in cohort - 2 not yet seen"))
(defskeleton station-to-station
(vars (a b name) (y x rndx))
(defstrand resp 3 (a a) (b b) (y y) (x x))
(defstrand init 3 (a a) (b b) (x x) (y y))
(precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))
(absent (y (exp (gen) x)))
(non-orig (privk a) (privk b))
(uniq-gen y x)
(operation encryption-test (displaced 2 0 resp 2)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))
(exp (gen) (mul y x))) (1 1))
(traces
((recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul y x)))))
(recv
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul y x)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul y x)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul y x))))))
(label 8)
(parent 7)
(unrealized)
(shape)
(maps ((0) ((a a) (b b) (y y) (x x))))
(origs))
(defskeleton station-to-station
(vars (a b b-0 name) (x y rndx))
(defstrand resp 3 (a a) (b b) (y y) (x x))
(defstrand init 3 (a a) (b b-0) (x x) (y y))
(deflistener (exp (gen) (mul x y)))
(precedes ((0 1) (2 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1)))
(absent (y (exp (gen) x)))
(non-orig (privk a) (privk b))
(uniq-gen x y)
(operation encryption-test (added-listener (exp (gen) (mul x y)))
(enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))
(exp (gen) (mul x y))) (1 1))
(traces
((recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul x y)))))
(recv
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))
(exp (gen) (mul x y)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))
(label 9)
(parent 7)
(unrealized (2 0))
(comment "2 in cohort - 2 not yet seen"))
(defskeleton station-to-station
(vars (a b b-0 name) (x y rndx))
(defstrand resp 3 (a a) (b b) (y y) (x x))
(defstrand init 3 (a a) (b b-0) (x x) (y y))
(deflistener (exp (gen) (mul x y)))
(deflistener (cat (exp (gen) x) y))
(precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))
((3 1) (2 0)))
(absent (y (exp (gen) x)))
(non-orig (privk a) (privk b))
(uniq-gen x y)
(operation nonce-test (added-listener (cat (exp (gen) x) y))
(exp (gen) (mul x y)) (2 0))
(traces
((recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul x y)))))
(recv
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))
(exp (gen) (mul x y)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))
((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))
(label 10)
(parent 9)
(unrealized (3 0))
(dead)
(comment "empty cohort"))
(defskeleton station-to-station
(vars (a b b-0 name) (x y rndx))
(defstrand resp 3 (a a) (b b) (y y) (x x))
(defstrand init 3 (a a) (b b-0) (x x) (y y))
(deflistener (exp (gen) (mul x y)))
(deflistener (cat (exp (gen) y) x))
(precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))
((3 1) (2 0)))
(absent (y (exp (gen) x)))
(non-orig (privk a) (privk b))
(uniq-gen x y)
(operation nonce-test (added-listener (cat (exp (gen) y) x))
(exp (gen) (mul x y)) (2 0))
(traces
((recv (exp (gen) x))
(send
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b))
(exp (gen) (mul x y)))))
(recv
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
((send (exp (gen) x))
(recv
(cat (exp (gen) y)
(enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))
(exp (gen) (mul x y)))))
(send
(enc (enc (exp (gen) x) (exp (gen) y) (privk a))
(exp (gen) (mul x y)))))
((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))
((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))
(label 11)
(parent 9)
(unrealized (3 0))
(dead)
(comment "empty cohort"))
(comment "Nothing left to do")