VCの階層深度を取得(N階層対応)
DelegationChainから階層深度を取得:
None: 0階層(直接発行)Some chain: chain.depth階層(N階層委譲発行)
設計の利点:
- 動的な階層数をサポート
- chain.depthはdelegationsリストの長さ
- O(1)の計算量(リスト長の取得のみ)
Equations
- getVCDepthN vc = match vc.getDelegationChain with | none => 0 | some chain => chain.depth
Instances For
Theorem: N階層委任チェーンの有限性
検証に成功した委任チェーンは、InitialMaxDepth以下の長さを持つ。
証明:
DelegationChain.verifyの定義により、InitialMaxDepthを使用している。
TrustChainTypes.finite_delegation_chainから直接導かれる。
N階層対応による形式検証
形式検証の効果:
- W3C VC標準機能に依存
- Wallet.trustedAnchorsによる柔軟な信頼設定(ブラウザのルート証明書ストアと同様)
- 動的階層制限により実世界のニーズに対応(政府→都道府県→市区町村→部署)
- プロトコルレベルの論理的正しさは完全に証明可能
- PKI的脆弱性(循環、委譲チェーン攻撃)を動的制限で防止
Equations
- One or more equations did not get rendered due to their size.