chapter‹Instances› text‹Here we instantiate our concrete parametrized models with a number of protocols from the
and variants of them that we derive ourselves.› section‹SCION› theory SCION imports "../Parametrized_Dataplane_3_directed" "../infrastructure/Keys" begin
locale scion_defs = network_assums_direct _ _ _ auth_seg0 for auth_seg0 :: "(msgterm × ahi list) set" begin
text‹The predicate @{term "hf_valid"} is given to the concrete parametrized model as a parameter.
ensures the authenticity of the hop authenticator in the hop field. The predicate takes an authenticated
field (in this model always a numeric value, hence the matching on Num ts), the hop field to
validated and in some cases the next hop field.
distinguish if there is a next hop field (this yields the two cases below). If there is not, then
hvf simply consists of a MAC over the authenticated info field and the local
information of the hop, using the key of the hop to which the hop field belongs. If on the
hand, there is a subsequent hop field, then the hvf of that hop field is also included
the MAC computation.› fun hf_valid :: "msgterm ==> msgterm ==> SCION_HF ==> SCION_HF option ==> bool"where "hf_valid (Num ts) uinfo (AHI = ahi, UHI = _, HVF = x) (Some (AHI = ahi2, UHI = _, HVF = x2)) ⟷ (∃upif downif upif2 downif2. x = Mac[macKey (ASID ahi)] (L [Num ts, upif, downif, upif2, downif2, x2]) ∧ ASIF (DownIF ahi) downif ∧ ASIF (UpIF ahi) upif ∧ ASIF (DownIF ahi2) downif2 ∧ ASIF (UpIF ahi2) upif2 ∧ uinfo = ε)"
| "hf_valid (Num ts) uinfo (AHI = ahi, UHI = _, HVF = x) None ⟷ (∃upif downif. x = Mac[macKey (ASID ahi)] (L [Num ts, upif, downif]) ∧ ASIF (DownIF ahi) downif ∧ ASIF (UpIF ahi) upif ∧ uinfo = ε)"
| "hf_valid _ _ _ _ = False"
text‹We can extract the entire path from the hvf field, which includes the local forwarding of the
hop, the local forwarding information of the next hop (if existant) and, recursively, all
hvf fields and their hop information.› fun extr :: "msgterm ==> ahi list"where "extr (Mac[macKey asid] (L [ts, upif, downif, upif2, downif2, x2])) = (UpIF = term2if upif, DownIF = term2if downif, ASID = asid) # extr x2"
| "extr (Mac[macKey asid] (L [ts, upif, downif])) = [(UpIF = term2if upif, DownIF = term2if downif, ASID = asid)]"
| "extr _ = []"
text‹Extract the authenticated info field from a hop validation field.› fun extr_ainfo :: "msgterm ==> msgterm"where "extr_ainfo (Mac[macKey asid] (L (Num ts # xs))) = Num ts"
| "extr_ainfo _ = ε"
text‹When observing a hop field, an attacker learns the HVF. UHI is empty and the AHI only contains
information that are not terms.› fun terms_hf :: "SCION_HF ==> msgterm set"where "terms_hf hf = {HVF hf}"
text‹An authenticated info field is always a number (corresponding to a timestamp). The
unauthenticated info field is set to the empty term @{term "ε"}.› definition auth_restrict where "auth_restrict ainfo uinfo l ≡ (∃ts. ainfo = Num ts) ∧ (uinfo = ε)"
lemma info_hvf: assumes"hf_valid ainfo uinfo m z""hf_valid ainfo' uinfo' m' z'""HVF m = HVF m'" shows"ainfo' = ainfo""m' = m" using assms by(auto simp add: hf_valid_invert intro: ahi_eq)
(******************************************************************************) subsection‹Definitions and properties of the added intruder knowledge› (******************************************************************************) text‹Here we define a @{text "ik_add"} and @{text "ik_oracle"} as being empty, as these features are
used in this instance model.›
(******************************************************************************) subsection‹Properties of the intruder knowledge, including @{text "ik_add"} and @{text "ik_oracle"}› (******************************************************************************) text‹We now instantiate the parametrized model's definition of the intruder knowledge, using the
of @{text "ik_add"} and @{text "ik_oracle"} from above. We then prove the properties
we need to instantiate the @{text "dataplane_3_directed"} locale.› sublocale
dataplane_3_directed_ik_defs _ _ _ auth_seg0 terms_uinfo no_oracle hf_valid auth_restrict extr extr_ainfo term_ainfo
terms_hf upd_uinfo ik_add ik_oracle by unfold_locales
lemma MAC_synth_helper: assumes"hf_valid ainfo uinfo m z""HVF m = Mac[Key (macK asid)] j""HVF m ∈ ik" shows"∃hfs. m ∈ set hfs ∧ (∃uinfo'. (ainfo, hfs) ∈ auth_seg2 uinfo')" proof- from assms(2-3) obtain ainfo' uinfo' m' hfs' nxt' where dfs: "m' ∈ set hfs'""(ainfo', hfs') ∈ auth_seg2 uinfo'""hf_valid ainfo' uinfo' m' nxt'" "HVF m = HVF m'" by(auto simp add: ik_def ik_hfs_simp) thenhave"ainfo' = ainfo""m' = m"using assms(1) by(auto elim!: info_hvf) thenshow ?thesis using dfs assms by auto qed
text‹This definition helps with the limiting the number of cases generated. We don't require it,
it is convenient. Given a hop validation field and an asid, return if the hvf has the expected
.› definition mac_format :: "msgterm ==> as ==> bool"where "mac_format m asid ≡∃ j . m = Mac[macKey asid] j"
text‹If a valid hop field is derivable by the attacker, but does not belong to the attacker, then
hop field is already contained in the set of authorized segments.› lemma MAC_synth: assumes"hf_valid ainfo uinfo m z""HVF m ∈ synth ik""mac_format (HVF m) asid" "asid ∉ bad""checkInfo ainfo" shows"∃hfs . m ∈ set hfs ∧ (∃uinfo'. (ainfo, hfs) ∈ auth_seg2 uinfo')" using assms apply(auto simp add: mac_format_def elim!: MAC_synth_helper dest!: key_ik_bad) by(auto simp add: ik_def ik_hfs_simp)
(******************************************************************************) subsection‹Direct proof goals for interpretation of @{text "dataplane_3_directed"}› (******************************************************************************)
lemma COND_honest_hf_analz: assumes"ASID (AHI hf) ∉ bad""hf_valid ainfo uinfo hf nxt""terms_hf hf ⊆ synth (analz ik)" "no_oracle ainfo uinfo" shows"terms_hf hf ⊆ analz ik" proof- let ?asid = "ASID (AHI hf)" from assms(3) have hf_synth_ik: "HVF hf ∈ synth ik"by auto from assms(2) have"mac_format (HVF hf) ?asid" by(auto simp add: mac_format_def hf_valid_invert) thenobtain hfs uinfo' where "hf ∈ set hfs""(ainfo, hfs) ∈ auth_seg2 uinfo'" using assms(1,2) hf_synth_ik by(auto dest!: MAC_synth) thenhave"HVF hf ∈ ik" using assms(2) by(auto simp add: ik_hfs_def intro!: ik_ik_hfs intro!: exI) thenshow ?thesis by auto qed
lemma COND_terms_hf: assumes"hf_valid ainfo uinfo hf z"and"terms_hf hf ⊆ analz ik"and"no_oracle ainfo uinfo" shows"∃hfs. hf ∈ set hfs ∧ (∃uinfo' . (ainfo, hfs) ∈ auth_seg2 uinfo')" proof- obtain hfs ainfo uinfo where hfs_def: "hf ∈ set hfs""(ainfo, hfs) ∈ auth_seg2 uinfo" using assms using assms by simp
(auto 34 simp add: hf_valid_invert ik_hfs_simp ik_def dest: ahi_eq) show ?thesis using hfs_def apply (auto simp add: auth_seg2_def dest!: TWu.holds_set_list) using hfs_def assms(1) by (auto simp add: auth_seg2_def dest: info_hvf) qed
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.