Theory WooLam
section‹The Woo-Lam Protocol›
theory WooLam imports Public begin
text‹Simplified version from page 11 of
Abadi and Needham (1996).
Prudent Engineering Practice for Cryptographic Protocols.
IEEE Trans. S.E. 22(1), pages 6-15.
Note: this differs from the Woo-Lam protocol discussed by Lowe (1996):
Some New Attacks upon Security Protocols.
Computer Security Foundations Workshop
›
inductive_set woolam :: "event list set"
where
Nil: "[] ∈ woolam"
| Fake: "⟦evsf ∈ woolam; X ∈ synth (analz (spies evsf))⟧
⟹ Says Spy B X # evsf ∈ woolam"
| WL1: "evs1 ∈ woolam ⟹ Says A B (Agent A) # evs1 ∈ woolam"
| WL2: "⟦evs2 ∈ woolam; Says A' B (Agent A) ∈ set evs2⟧
⟹ Says B A (Nonce NB) # evs2 ∈ woolam"
| WL3: "⟦evs3 ∈ woolam;
Says A B (Agent A) ∈ set evs3;
Says B' A (Nonce NB) ∈ set evs3⟧
⟹ Says A B (Crypt (shrK A) (Nonce NB)) # evs3 ∈ woolam"
| WL4: "⟦evs4 ∈ woolam;
Says A' B X ∈ set evs4;
Says A'' B (Agent A) ∈ set evs4⟧
⟹ Says B Server ⦃Agent A, Agent B, X⦄ # evs4 ∈ woolam"
| WL5: "⟦evs5 ∈ woolam;
Says B' Server ⦃Agent A, Agent B, Crypt (shrK A) (Nonce NB)⦄
∈ set evs5⟧
⟹ Says Server B (Crypt (shrK B) ⦃Agent A, Nonce NB⦄)
# evs5 ∈ woolam"
declare Says_imp_knows_Spy [THEN analz.Inj, dest]
declare parts.Body [dest]
declare analz_into_parts [dest]
declare Fake_parts_insert_in_Un [dest]
lemma "∃NB. ∃evs ∈ woolam.
Says Server B (Crypt (shrK B) ⦃Agent A, Nonce NB⦄) ∈ set evs"
apply (intro exI bexI)
apply (rule_tac [2] woolam.Nil
[THEN woolam.WL1, THEN woolam.WL2, THEN woolam.WL3,
THEN woolam.WL4, THEN woolam.WL5], possibility)
done
lemma Spy_see_shrK [simp]:
"evs ∈ woolam ⟹ (Key (shrK A) ∈ parts (spies evs)) = (A ∈ bad)"
by (erule woolam.induct, force, simp_all, blast+)
lemma Spy_analz_shrK [simp]:
"evs ∈ woolam ⟹ (Key (shrK A) ∈ analz (spies evs)) = (A ∈ bad)"
by auto
lemma Spy_see_shrK_D [dest!]:
"⟦Key (shrK A) ∈ parts (knows Spy evs); evs ∈ woolam⟧ ⟹ A ∈ bad"
by (blast dest: Spy_see_shrK)
lemma NB_Crypt_imp_Alice_msg:
"⟦Crypt (shrK A) (Nonce NB) ∈ parts (spies evs);
A ∉ bad; evs ∈ woolam⟧
⟹ ∃B. Says A B (Crypt (shrK A) (Nonce NB)) ∈ set evs"
by (erule rev_mp, erule woolam.induct, force, simp_all, blast+)
lemma Server_trusts_WL4 [dest]:
"⟦Says B' Server ⦃Agent A, Agent B, Crypt (shrK A) (Nonce NB)⦄
∈ set evs;
A ∉ bad; evs ∈ woolam⟧
⟹ ∃B. Says A B (Crypt (shrK A) (Nonce NB)) ∈ set evs"
by (blast intro!: NB_Crypt_imp_Alice_msg)
lemma Server_sent_WL5 [dest]:
"⟦Says Server B (Crypt (shrK B) ⦃Agent A, NB⦄) ∈ set evs;
evs ∈ woolam⟧
⟹ ∃B'. Says B' Server ⦃Agent A, Agent B, Crypt (shrK A) NB⦄
∈ set evs"
by (erule rev_mp, erule woolam.induct, force, simp_all, blast+)
lemma NB_Crypt_imp_Server_msg [rule_format]:
"⟦Crypt (shrK B) ⦃Agent A, NB⦄ ∈ parts (spies evs);
B ∉ bad; evs ∈ woolam⟧
⟹ Says Server B (Crypt (shrK B) ⦃Agent A, NB⦄) ∈ set evs"
by (erule rev_mp, erule woolam.induct, force, simp_all, blast+)
lemma B_trusts_WL5:
"⟦Says S B (Crypt (shrK B) ⦃Agent A, Nonce NB⦄) ∈ set evs;
A ∉ bad; B ∉ bad; evs ∈ woolam⟧
⟹ ∃B. Says A B (Crypt (shrK A) (Nonce NB)) ∈ set evs"
by (blast dest!: NB_Crypt_imp_Server_msg)
lemma B_said_WL2:
"⟦Says B A (Nonce NB) ∈ set evs; B ≠ Spy; evs ∈ woolam⟧
⟹ ∃A'. Says A' B (Agent A) ∈ set evs"
by (erule rev_mp, erule woolam.induct, force, simp_all, blast+)
lemma "⟦A ∉ bad; B ≠ Spy; evs ∈ woolam⟧
⟹ Crypt (shrK A) (Nonce NB) ∈ parts (spies evs) ∧
Says B A (Nonce NB) ∈ set evs
⟶ Says A B (Crypt (shrK A) (Nonce NB)) ∈ set evs"
apply (erule rev_mp, erule woolam.induct, force, simp_all, blast, auto)
oops
end