Transcript Document

ノンス解析とストランド空間モデル
高橋 孝一
戸田 洋三
萩谷 昌己
(50音順)
概要
• 認証プロトコル (Needham-Schroeder) の検証
• 背景
– ノンス解析 (Hagiya, et al., 1999)
• ノンスの流れの解析
• 前向き推論によるメッセージと状態の網羅
– ストランド空間モデル (Guttman, et al., 1998)
• ストランド (個々の主体の実行トレース)
• バンドル (因果関係について閉じたストランドの集合)
• 後ろ向き推論 によるバンドルの網羅
• 本稿の成果 ー 両者の融合
– 単純で強力な検証技法
– 自動化も可能
...という ちょいとした話
Needham-Schroeder
• プロトコルの正しい実行 → バンドル
イニシエータ A
レスポンダ B
+m0(A, nA)pb(B)
-m0(A, nA)pb(B)
-m1(B, nA, nB)pb(A)
+m1(B, nA, nB)pb(A)
+m2(nB)pb(B)
-m2(nB)pb(B)
ノンス解析のためのフレームワーク
•
•
•
•
M … ネットワークを流れたメッセージの集合
S … 主体と状態の組 p:s の集合
(M, S) … システム状態
プロトコル・ステップ … (M, S) の間の遷移
– 主体と状態の組 p:sS を選び、
– メッセージ mM を受け取り、
– ノンス nnonce(M, S) を見つけ、
– 命題 R(p,s,m,n,s',m') を証明する。
– (M, S) M{m'}, (S -{p:s}){p:s'})
推論規則としてのプロトコル・ステップ
p:s S
m M
n nonce(M,S)
R(p,s,m,n,s',m')
(M, S) M{m'}, (S -{p:s}){p:s'})
プロトコル検証
• Needham-Schroeder … 例
• 状態:
s0(B, nA)
s1(A, nA, nB)
s2(B, nA, nB)
s3(A, nA, nB)
• メッセージ:
m0(A, nA)pb(B)
m1(B, nA, nB)pb(A)
m2(nA)pb(B)
Needham-Schroeder
• 侵入者の形式化
• closure(MS) … 侵入者によって生成可能な
メッセージの集合
m closure(MS)
(M, S) M{m}, S)
nA nonce(M,S)
(M, S) M{m0(A, nA)pb(B)}, S {A:s0(B, nA)})
m0(A, nA)pb(B) M
nB nonce(M,S)
(M, S) M{m1(B, nA, nB)pb(A)}, S {B:s1(A, nA, nB)})
A:s0(B, nA) S
m1(B, nA , nB)pb(A) M
(M, S)M{m2(nB)pb(B)}, (S -{A:s0(B,nA)}) {A:s2(B,nA,nB)})
B:s1(A, nA nB) S
m2(nB)pb(B) M
(M, S) M, (S -{B:s1(A, nA, nB)}) {B:s3(A,nA,nB)})
Lemma 1
m0(A, nA)pb(B) M
nB nonce(M,S)
(M, S) M{m1(B, nA, nB)pb(A)}, S {B:s1(A, nA, nB)})
M1
S1
• もし (M1, S1) * (M', S') ならば、
– もし mM' かつ m が nB を含むならば、
• m=m1(B, nA, nB)pb(A) または
• m=m2(nB)pb(B).
– もし sS' かつ s が nB を含むならば、
• s=B:s1(A, nA, nB) または
• s=A:s2(B, nA, nB) または
• s=B:s3(A, nA, nB).
Lemma 2
nA nonce(M,S)
(M, S) M{m0(B, nA)pb(B)}, S {A:s0(B, nB)})
M1
S1
• もし (M1, S1) * (M', S') ならば、
– もし mM' かつ m が nA を含むならば、
• m=m0(A, nA)pb(B), or
• m=m1(B, nA, X)pb(A) for some XnA.
– もし sS' かつ s が nA を含むならば、
• s=A:s0(B, nA) または
• s=B:s1(A, nA, X) または
• s=A:s2(B, nA, X) または
• s=B:s3(A, nA, X) for some XnA.
Lemma 3
m0(A, nA)pb(B) M
nB nonce(M,S)
(M, S) M{m1(B, nA, nB)pb(A)}, S {B:s1(A, nA, nB)})
M1
S1
• もし (M1, S1) * (M', S') ならば、
– もし m2(nB)pb(B)closure(M' S) ならば、
• m2(nB)pb(B)M'.
– もし m1(B, nA, nB)pb(A)closure(M' S) ならば、
• m1(B, nA, nB)pb(A)M'.
Lemma 4
nA nonce(M,S)
(M, S) M{m0(B, nA)pb(B)}, S {A:s0(B, nB)})
M1
S1
• もし (M1, S1) * (M', S') ならば、
– もし m0(A, nA)pb(B) closure(M' S) ならば、
• m0(A, nA)pb(B) M'.
– もし m1(B, nA, X)pb(A)closure(M' S) ならば、
• m1(B, nA, X)pb(A)M'.
ストランド
• イニシエータ A のストランド
+m0(A, nA)pb(B)
-m1(B, nA, nB)pb(A)
+m2(nB)pb(B)
ストランド
• レスポンダ B のストランド
-m0(A, nA)pb(B)
+m1(B, nA, nB)pb(A)
-m2(nB)pb(B)
バンドル
• 因果関係について閉じたストランドの集合
+m0(A, nA)pb(B)
-m0(A, nA)pb(B)
-m1(B, nA, nB)pb(A)
+m1(B, nA, nB)pb(A)
+m2(nB)pb(B)
-m2(nB)pb(B)
ストランド空間モデル
• agreement の検証
ある主体のストランドを仮定して、
それを含むバンドルを網羅し、
対応する主体のストランドが必ずバンドルに
含まれることを示す。
• 侵入者のストランド
– 侵入者によるあらゆる攻撃を想定
侵入者のストランドを素朴に含めると、
バンドルの数え上げは終了しない。
ノンス解析とストランド空間モデル
• ノンス解析の結果をバンドルの構成に利用
-m0(A, nA)pb(B)
+m0(A, nA)pb(B)
Lemma 4
Lemma 1
-m1(B, nA, nB)pb(A)
+m1(B, nA, nB)pb(A)
Lemma 3
-m2(nB)pb(B)
+m2(nB)pb(B)
Lemma 3
まとめ
• ノンス解析は前方探索によって自動化可能
• バンドルの後ろ向きの構成も自動的
• 両者の融合
– オリジナルのストランド空間モデルの探索より
はるかに簡素
– 強力かつ単純で効率的なプロトコル検証器
• 課題
– 検証器の実装
– 他のプロトコルの検証
Nonce Analysis
• a kind of abstract model checking
• K: the interesting set
– the set of nonces and keys on which the analysis
focuses
– example: {nA, pv(A), pv(B)}
– It should be carefully chosen so that the intruder’s
transition is properly abstracted.
• (Q,R): abstract state
– Q: a set of message patterns containing elements of K
– R: a set of patterns of principal-state pairs containing
elements of K
Patterns
• constants
– nonces, principals, etc., that are introduced at the
protocol stop on which the analysis focuses
• constructors
–
–
–
–
encryption: enc(m,k), abbreviated as mk
message constructors, message tuples
state constructors
key constructors: pb(p), pv(p), sym(n)
• variables
representing messages that do not contain elements of K
• examples
– m1(B, nA, X)pb(A)
– B:s3(A, nA, X)
Restrictions on Patterns
• If enc occurs in a pattern, it should be applied to a
message constructor.
– enc(c(m1,…,ml),k)
– This allows decomposition during unification.
• A patterns should not contain a non-variable
subterm that contains a variable and can match
with an element of K.
– This restriction can be removed if the subterm is always
instantiated to each possible element of K.