{"id":"def:dep-chapter","label":"dep-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:did-amt"],"nlp_text":"This chapter covers deployment models aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Operations","latex_link":"sect0004.html#def:dep-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Operations","lean_decl_name":"AMATELUS.Operations","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Operations.lean","lean4_code":"/-\n# Wallet/Holder/Issuer/Verifier 操作定義\n\nこのファイルは、Wallet、Holder、Issuer、Verifierの具体的な操作を定義します。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.Roles\nimport AMATELUS.SecurityAssumptions\nimport AMATELUS.Cryptographic\nimport AMATELUS.TrustChain\n\n-- ## Holder操作\n\nnamespace Holder\n\n/-- WalletにVCを保存\n\n **設計変更:**\n Holder構造体は単なるラッパーなので、操作はWalletレベルで行います。\n 不変条件 `wallet_valid` はHolder構築時に一度だけ保証されます。\n\n この関数は単にcredentialsリストにVCを追加するだけで、\n identitiesは変更しません。したがって、Wallet.isValidは保持されます。\n-/\ndef storeCredential\n (wallet : Wallet)\n (vc : ValidVC)","line":1,"end_line":30,"proof_status":"formalized"} {"id":"def:did-amt","label":"did-amt","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:amatelus"],"nlp_text":"The did:amt method is a Decentralized Identifier (DID) that is algorithmically generated and resolved without reliance on any external Verifiable Data Registry (VDR) such as a blockchain. This method is designed for high-stakes environments (public administration, government) where data integrity and operational robustness are paramount.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.DID","latex_link":"sect0003.html#def:did-amt","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.DID","lean_decl_name":"AMATELUS.DID","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/DID.lean","lean4_code":"/-\n# DID 定義\n\nこのファイルは、AMATELUSプロトコルのDID関連の型と定義を含みます。\nW3C DID仕様を基底として、AMATELUS固有の拡張を提供します。\n-/\n\nimport AMATELUS.CryptoTypes\nimport AMATELUS.SecurityAssumptions\nimport W3C.DID\n\n-- ## 基本型定義\n\n-- ## Definition 2.1: DID and DID Document (W3C DID仕様に準拠)\n\n/-- W3C.DIDDocumentから主要な公開鍵を抽出するヘルパー関数\n\n verificationMethodの最初のエントリから公開鍵を取得します。\n AMATELUSでは、did:amt仕様に従い、verificationMethodに必ず公開鍵が含まれます。\n-/\ndef extractPublicKey (doc : W3C.DIDDocument) : Option PublicKey :=\n match doc.verificationMethod.head? with\n | none => none\n | some vm =>\n match vm.publicKeyMultibase with\n | none => none\n | some pkStr =>\n -- multibase文字列からバイト列に変換(簡略化)\n some { bytes := pkStr.toUTF8.data.toList }\n","line":1,"end_line":30,"proof_status":"formalized"} {"id":"thm:did-local-resolution","label":"did-local-resolution","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:did-amt","def:crypto-assumptions"],"nlp_text":"The resolution of a did:amt is completed locally by a verifier. No external Verifiable Data Registry (blockchain, centralized service) or network calls are required. Verifier receives the [AMT Version Number, Public Key] pair from the owner and executes the same local derivation steps for verification.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.DID","latex_link":"sect0003.html#thm:did-local-resolution","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.DID","lean_decl_name":"AMATELUS.DID","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/DID.lean","lean4_code":"/-\n# DID 定義\n\nこのファイルは、AMATELUSプロトコルのDID関連の型と定義を含みます。\nW3C DID仕様を基底として、AMATELUS固有の拡張を提供します。\n-/\n\nimport AMATELUS.CryptoTypes\nimport AMATELUS.SecurityAssumptions\nimport W3C.DID\n\n-- ## 基本型定義\n\n-- ## Definition 2.1: DID and DID Document (W3C DID仕様に準拠)\n\n/-- W3C.DIDDocumentから主要な公開鍵を抽出するヘルパー関数\n\n verificationMethodの最初のエントリから公開鍵を取得します。\n AMATELUSでは、did:amt仕様に従い、verificationMethodに必ず公開鍵が含まれます。\n-/\ndef extractPublicKey (doc : W3C.DIDDocument) : Option PublicKey :=\n match doc.verificationMethod.head? with\n | none => none\n | some vm =>\n match vm.publicKeyMultibase with\n | none => none\n | some pkStr =>\n -- multibase文字列からバイト列に変換(簡略化)\n some { bytes := pkStr.toUTF8.data.toList }\n","line":1,"end_line":30,"proof_status":"formalized"} {"id":"def:tech-chapter","label":"tech-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:did-amt"],"nlp_text":"This chapter covers technical specifications aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","latex_link":"sect0005.html#def:tech-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","lean_decl_name":"AMATELUS.Protocol","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"thm:did-local-generation","label":"did-local-generation","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:did-amt","def:crypto-assumptions"],"nlp_text":"A did:amt identifier is generated locally on the owner’s device without network registration. The generation process consists of: Generate Ed25519 key pair Prepare information pair: AMT Version Number + Public Key Select DID Document template corresponding to AMT version Derive DID through local cryptographic operations","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.DID","latex_link":"sect0003.html#thm:did-local-generation","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.DID","lean_decl_name":"AMATELUS.DID","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/DID.lean","lean4_code":"/-\n# DID 定義\n\nこのファイルは、AMATELUSプロトコルのDID関連の型と定義を含みます。\nW3C DID仕様を基底として、AMATELUS固有の拡張を提供します。\n-/\n\nimport AMATELUS.CryptoTypes\nimport AMATELUS.SecurityAssumptions\nimport W3C.DID\n\n-- ## 基本型定義\n\n-- ## Definition 2.1: DID and DID Document (W3C DID仕様に準拠)\n\n/-- W3C.DIDDocumentから主要な公開鍵を抽出するヘルパー関数\n\n verificationMethodの最初のエントリから公開鍵を取得します。\n AMATELUSでは、did:amt仕様に従い、verificationMethodに必ず公開鍵が含まれます。\n-/\ndef extractPublicKey (doc : W3C.DIDDocument) : Option PublicKey :=\n match doc.verificationMethod.head? with\n | none => none\n | some vm =>\n match vm.publicKeyMultibase with\n | none => none\n | some pkStr =>\n -- multibase文字列からバイト列に変換(簡略化)\n some { bytes := pkStr.toUTF8.data.toList }\n","line":1,"end_line":30,"proof_status":"formalized"} {"id":"def:priv-chapter","label":"priv-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["thm:did-local-generation"],"nlp_text":"This chapter covers privacy architecture aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Privacy","latex_link":"sect0008.html#def:priv-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Privacy","lean_decl_name":"AMATELUS.Privacy","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"def:multi-chapter","label":"multi-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["thm:did-local-generation"],"nlp_text":"This chapter covers multi-device support aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.MultiDevice","latex_link":"sect0012.html#def:multi-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.MultiDevice","lean_decl_name":"AMATELUS.MultiDevice","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/MultiDevice.lean","lean4_code":"/-\n# マルチデバイス対応(Multi-Device Support)- クレーム個別転送版\n\nこのファイルは、AMATELUSプロトコルのマルチデバイス対応を定義します。\n単一のHolderが複数のデバイス上で異なるDIDを持つウォレットを運用し、\nデバイス間で**クレーム単位**で安全に転送する機能を提供します。\n\n**設計原則:**\n1. 秘密鍵の非共有(デバイス間で秘密鍵は転送しない)\n2. クレーム単位の転送(VCではなくクレームを転送してZKP効率化)\n3. 二重署名(issuer署名 + original subject転送署名)\n4. W3C標準準拠(holder ≠ credentialSubject をサポート)\n5. DIDComm使用(標準的なDID間通信プロトコル)\n6. エンドツーエンド暗号化(転送データは常に暗号化)\n\n**主要な概念:**\n- トラストチェーン: Schema継承、権限委譲(異なる組織のDID)\n- マルチデバイス: クレームの共有(同一Holderの異なるDID)\n\n**クレームの転送経路:**\n1. Issuer → Holder_A (初回発行)\n2. Holder_A → Holder_B (クレーム単位の転送) ← 本モジュールの対象\n\n**ZKP効率化:**\n- 必要なクレームのみをZKP回路に入力\n- 回路サイズ最小化、計算コスト削減\n- プライバシー保護(不要なクレームを扱わない)\n-/\n\nimport AMATELUS.DID","line":1,"end_line":30,"proof_status":"formalized"} {"id":"def:chain-chapter","label":"chain-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["thm:did-local-generation"],"nlp_text":"This chapter covers trust chain architecture aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.TrustChain","latex_link":"sect0011.html#def:chain-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.TrustChain","lean_decl_name":"AMATELUS.TrustChain","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/TrustChain.lean","lean4_code":"/-- VCの階層深度を取得(N階層対応)\n\n DelegationChainから階層深度を取得:\n - `None`: 0階層(直接発行)\n - `Some chain`: chain.depth階層(N階層委譲発行)\n\n **設計の利点:**\n - 動的な階層数をサポート\n - chain.depthはdelegationsリストの長さ\n - O(1)の計算量(リスト長の取得のみ)\n-/\ndef getVCDepthN (vc : UnknownVC) : Nat :=\n match UnknownVC.getDelegationChain vc with\n | none => 0 -- 直接発行\n | some chain => chain.depth -- N階層委譲発行","line":23,"end_line":37,"proof_status":"formalized"} {"id":"def:trust-chapter","label":"trust-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["thm:did-local-generation"],"nlp_text":"This chapter covers trust architecture aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.MutualAuthentication","latex_link":"sect0006.html#def:trust-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.MutualAuthentication","lean_decl_name":"AMATELUS.MutualAuthentication","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"def:crypto-assumptions","label":"crypto-assumptions","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:amatelus"],"nlp_text":"AMATELUS relies on the following cryptographic security assumptions: Collision-resistant hash: SHA3-512 provides 128-bit security against quantum adversaries Unforgeable signatures: Dilithium2 provides 128-bit security against quantum adversaries ZKP soundness: Standard zero-knowledge properties (completeness, soundness, zero-knowledge)","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","latex_link":"sect0007.html#def:crypto-assumptions","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","lean_decl_name":"AMATELUS.Cryptographic","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"def:revoke-chapter","label":"revoke-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:crypto-assumptions"],"nlp_text":"This chapter covers merkle tree revocation aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.RevocationMerkle","latex_link":"sect0013.html#def:revoke-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.RevocationMerkle","lean_decl_name":"AMATELUS.RevocationMerkle","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/RevocationMerkle.lean","lean4_code":"/-\n# Merkle Tree Revocation Specification for AMATELUS\n\nこのファイルは、AMATELUSプロトコルのMerkle Treeベースの失効確認フローを形式化します。\n\n**設計原則:**\n1. Merkle Treeの抽象化(暗号技術と同等に確立された技術)\n2. タイムスタンプ検証はVerifier側で実行(ZKP回路外)\n3. ゼロ知識性の保持(どのVCか特定されない)\n4. 型安全性によるプロトコル保証\n5. revocationEnabledフラグによる個人Issuer対応\n\n**主要な概念:**\n- ValidMerkleProof: 暗号学的に正しい包含証明\n- InvalidMerkleProof: 不正な包含証明\n- MerkleRevocationList: Issuerが管理する失効情報\n- ZKPWithRevocation: 失効確認付きZKP\n- revocationEnabled: 失効確認の有効化フラグ(Issuer署名で保護)\n\n**revocationEnabledフラグの重要性:**\n- Issuerがクレームごとに失効確認の可否を含める\n- HolderはZKPに失効確認フラグを入力\n- Verifierは数学的に失効確認の有無を判定可能\n- 個人IssuerはウェブサーバーなしでVC発行可能(revocationEnabled = false)\n\n**参考文献:**\n- RFC 6962: Certificate Transparency\n- RevocationMerkle.md: AMATELUS失効確認仕様\n-/\n","line":1,"end_line":30,"proof_status":"formalized"} {"id":"thm:impersonation-resistance","label":"impersonation-resistance","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:crypto-assumptions"],"nlp_text":"Impersonation attacks with different secret keys are cryptographically prevented. If an attacker uses a different secret key to forge a ZKP, the signature verification will fail because DIDComm makes the sender’s public key known to the recipient.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","latex_link":"sect0007.html#thm:impersonation-resistance","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","lean_decl_name":"AMATELUS.Cryptographic","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Cryptographic.lean","lean4_code":"/-- Theorem 3.1: DID衝突の量子安全性\n\n 異なるValidDIDDocumentから同じDIDが生成されることは、\n 量子計算機を用いても困難です。\n\n **元の主張(決定論的単射性)の問題点:**\n \"異なるDIDドキュメントは異なるDIDを生成する\"は数学的に偽である。\n なぜなら、SHA-3のような有限出力ハッシュ関数は鳩の巣原理により\n 必ず衝突を持つからである(無限入力空間 → 2^512出力空間)。\n\n **正しい主張(確率的単射性+量子安全性):**\n 衝突は存在するが、量子計算機を用いても衝突を発見することは困難である。\n\n **量子脅威下での安全性:**\n - 衝突探索の量子コスト: 128ビット(Grover適用後)\n - NIST最小要件: 128ビット\n - 結論: 安全(128 ≥ 128)\n\n **証明:**\n SecurityAssumptions.amtHashFunction.quantum_secureにより、\n SHA3-512の衝突探索の量子コストは128ビットであり、\n NIST最小要件128ビットを満たす。\n DID.fromValidDocument は内部でこのハッシュ関数を使用しているため、\n 異なるValidDIDDocumentから同じDIDが生成される確率は無視できるほど小さい。\n-/\ntheorem did_collision_quantum_secure :\n amtHashFunction.collisionSecurity.quantumBits ≥ minSecurityLevel.quantumBits := by\n -- 128 ≥ 128\n exact amtHashFunction.quantum_secure","line":14,"end_line":42,"proof_status":"formalized"} {"id":"def:key-chapter","label":"key-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:crypto-assumptions"],"nlp_text":"This chapter covers secret key lifecycle management aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.KeyManagement","latex_link":"sect0015.html#def:key-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.KeyManagement","lean_decl_name":"AMATELUS.KeyManagement","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/KeyManagement.lean","lean4_code":"/-\n# AMATELUS Key Management Lifecycle Specification\n\nこのファイルは、AMATELUSプロトコルにおける秘密鍵のライフサイクル管理を形式化します。\n\n**設計原則:**\n1. 決定性の原則: 秘密鍵が手元にある場合のみ、暗号学的に決定的な操作が可能\n2. 連絡可能性の限界: Holderが連絡できたIssuerのみ対応可能\n3. 数学的安全性の限界: 身分証明と紐づいていないDIDの紛失は復旧不可能\n4. 本人死亡時の特性: 秘密鍵が使用不可能なため、損害は極めて限定的\n5. 被後見人保護: 後見人VCにより法的保護と技術的管理を両立\n\n**主要な概念:**\n- PrivateKeyState: 秘密鍵の状態(正常、漏洩、紛失、更新中、本人死亡、被後見人)\n- KeyManagementScenario: 対応シナリオの分類\n- RevocationRequest: 失効要求(旧秘密鍵で署名)\n- DIDMigrationCredential: DID移行証明VC(信頼継承)\n- GuardianCredential: 後見人VC(被後見人保護)\n\n**参考文献:**\n- KeyManagement.md: AMATELUS秘密鍵ライフサイクル管理仕様\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.Cryptographic\nimport AMATELUS.RevocationMerkle\n\n-- ## Section 1: 秘密鍵状態の型定義","line":1,"end_line":30,"proof_status":"formalized"} {"id":"prop:mitm-defense","label":"mitm-defense","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:crypto-assumptions"],"nlp_text":"Man-in-the-Middle attacks are mitigated at the transport layer. While AMATELUS provides cryptographic identity verification, ECDH-1PU authenticated encryption and TLS/HTTPS are the responsibility of service providers.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","latex_link":"sect0007.html#prop:mitm-defense","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","lean_decl_name":"AMATELUS.Cryptographic","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Cryptographic.lean","lean4_code":"/-- Theorem 3.1: DID衝突の量子安全性\n\n 異なるValidDIDDocumentから同じDIDが生成されることは、\n 量子計算機を用いても困難です。\n\n **元の主張(決定論的単射性)の問題点:**\n \"異なるDIDドキュメントは異なるDIDを生成する\"は数学的に偽である。\n なぜなら、SHA-3のような有限出力ハッシュ関数は鳩の巣原理により\n 必ず衝突を持つからである(無限入力空間 → 2^512出力空間)。\n\n **正しい主張(確率的単射性+量子安全性):**\n 衝突は存在するが、量子計算機を用いても衝突を発見することは困難である。\n\n **量子脅威下での安全性:**\n - 衝突探索の量子コスト: 128ビット(Grover適用後)\n - NIST最小要件: 128ビット\n - 結論: 安全(128 ≥ 128)\n\n **証明:**\n SecurityAssumptions.amtHashFunction.quantum_secureにより、\n SHA3-512の衝突探索の量子コストは128ビットであり、\n NIST最小要件128ビットを満たす。\n DID.fromValidDocument は内部でこのハッシュ関数を使用しているため、\n 異なるValidDIDDocumentから同じDIDが生成される確率は無視できるほど小さい。\n-/\ntheorem did_collision_quantum_secure :\n amtHashFunction.collisionSecurity.quantumBits ≥ minSecurityLevel.quantumBits := by\n -- 128 ≥ 128\n exact amtHashFunction.quantum_secure","line":14,"end_line":42,"proof_status":"statement_formalized"} {"id":"def:impl-chapter","label":"impl-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:crypto-assumptions"],"nlp_text":"This chapter covers implementation guidance aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Operations","latex_link":"sect0009.html#def:impl-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Operations","lean_decl_name":"AMATELUS.Operations","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Operations.lean","lean4_code":"/-\n# Wallet/Holder/Issuer/Verifier 操作定義\n\nこのファイルは、Wallet、Holder、Issuer、Verifierの具体的な操作を定義します。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.Roles\nimport AMATELUS.SecurityAssumptions\nimport AMATELUS.Cryptographic\nimport AMATELUS.TrustChain\n\n-- ## Holder操作\n\nnamespace Holder\n\n/-- WalletにVCを保存\n\n **設計変更:**\n Holder構造体は単なるラッパーなので、操作はWalletレベルで行います。\n 不変条件 `wallet_valid` はHolder構築時に一度だけ保証されます。\n\n この関数は単にcredentialsリストにVCを追加するだけで、\n identitiesは変更しません。したがって、Wallet.isValidは保持されます。\n-/\ndef storeCredential\n (wallet : Wallet)\n (vc : ValidVC)","line":1,"end_line":30,"proof_status":"formalized"} {"id":"def:aud-chapter","label":"aud-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:crypto-assumptions"],"nlp_text":"This chapter covers audit mechanism: anonymous hash identifier (ahi) aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Audit","latex_link":"sect0014.html#def:aud-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Audit","lean_decl_name":"AMATELUS.Audit","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Audit.lean","lean4_code":"/-\n# 監査メカニズムの制限性証明\n\nこのファイルは、匿名ハッシュ識別子による監査の制限性を証明します\n(Theorem 6.1, 6.2)。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.SecurityAssumptions\n\n-- ## Theorem 6.1: Reverse Engineering Resistance (逆引き制限)\n\n/-- ハッシュの一方向性による保護(具体的なセキュリティレベル)\n\n AMATELUSの逆引き耐性は、SHA3-512の原像攻撃コストに依存します。\n\n **計算コスト(量子脅威下):**\n - 原像攻撃の量子コスト: 256ビット\n - NIST最小要件: 128ビット\n - 結論: 十分安全(256 ≥ 128)\n-/\ntheorem ahi_one_way_protection_quantum_secure :\n hashPreimageSecurity.quantumBits ≥ minSecurityLevel.quantumBits := by\n -- 256 ≥ 128\n exact hash_preimage_quantum_secure\n\n/-- 監査区分識別子のエントロピーの指数(ビット数の指数表現)\n\n audit_section_entropy = 2^8 = 256 ビット","line":1,"end_line":30,"proof_status":"formalized"} {"id":"prop:replay-application-layer","label":"replay-application-layer","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:crypto-assumptions"],"nlp_text":"Replay attack prevention (preventing legitimate users from reusing the same ZKP) is NOT a responsibility of AMATELUS protocol. This is an application-layer responsibility. Important distinction: Impersonation attacks (attacker with different secret key): PREVENTED by AMATELUS through DIDComm Replay attacks (legitimate user reusing same ZKP): NOT handled by AMATELUS. Applications requiring single-use semantics must implement nonce mechanisms. Applications that require ZKP single-use guarantees should implement nonce handling at the application layer: Generate unique session nonces for each verification Record and verify nonce freshness (checking that the nonce has not been used before) Maintain nonce history in application database Applications where ZKP reuse is acceptable (e.g., age verification, permission checks, one-time access grants) do not require additional replay prevention mechanisms.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","latex_link":"sect0007.html#prop:replay-application-layer","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","lean_decl_name":"AMATELUS.Cryptographic","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Cryptographic.lean","lean4_code":"/-- Theorem 3.1: DID衝突の量子安全性\n\n 異なるValidDIDDocumentから同じDIDが生成されることは、\n 量子計算機を用いても困難です。\n\n **元の主張(決定論的単射性)の問題点:**\n \"異なるDIDドキュメントは異なるDIDを生成する\"は数学的に偽である。\n なぜなら、SHA-3のような有限出力ハッシュ関数は鳩の巣原理により\n 必ず衝突を持つからである(無限入力空間 → 2^512出力空間)。\n\n **正しい主張(確率的単射性+量子安全性):**\n 衝突は存在するが、量子計算機を用いても衝突を発見することは困難である。\n\n **量子脅威下での安全性:**\n - 衝突探索の量子コスト: 128ビット(Grover適用後)\n - NIST最小要件: 128ビット\n - 結論: 安全(128 ≥ 128)\n\n **証明:**\n SecurityAssumptions.amtHashFunction.quantum_secureにより、\n SHA3-512の衝突探索の量子コストは128ビットであり、\n NIST最小要件128ビットを満たす。\n DID.fromValidDocument は内部でこのハッシュ関数を使用しているため、\n 異なるValidDIDDocumentから同じDIDが生成される確率は無視できるほど小さい。\n-/\ntheorem did_collision_quantum_secure :\n amtHashFunction.collisionSecurity.quantumBits ≥ minSecurityLevel.quantumBits := by\n -- 128 ≥ 128\n exact amtHashFunction.quantum_secure","line":14,"end_line":42,"proof_status":"statement_formalized"} {"id":"prop:design-philosophy","label":"design-philosophy","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["prop:amatelus-non-scope","prop:amatelus-capabilities"],"nlp_text":"AMATELUS is a cryptographic authentication mechanism, not a communication infrastructure.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","latex_link":"sect0002.html#prop:design-philosophy","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","lean_decl_name":"AMATELUS.Protocol","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Protocol.lean","lean4_code":"/-\n# プロトコル全体の一貫性と実装考慮事項\n\nこのファイルは、AMATELUSプロトコル全体の安全性と実装の実現可能性を証明します\n(Theorem 7.1, 7.2, 8.1)。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.SecurityAssumptions\nimport AMATELUS.Cryptographic\nimport AMATELUS.TrustChain\nimport AMATELUS.Privacy\nimport AMATELUS.Audit\nimport AMATELUS.Network\n\n-- ## Definition 7.1: Protocol State\n\n/-- Wallet内の通信用DID管理情報\n\n 通信相手ごとの通信用DIDとVCのアソシエーション。\n-/\nstructure WalletCommunicationRecord where\n -- 通信用DID\n commDID : ValidDID\n -- 通信相手のDID\n counterpartyDID : UnknownDID\n -- 発行されたVC(VC発行ありの場合のみ保存)\n vc : Option ValidVC","line":1,"end_line":30,"proof_status":"formalized"} {"id":"thm:boundary-clarity","label":"boundary-clarity","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["prop:design-philosophy"],"nlp_text":"The boundary between cryptographic verification (AMATELUS responsibility) and service provision (service provider responsibility) eliminates distributed infrastructure complexity while preserving cryptographic security properties.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","latex_link":"sect0002.html#thm:boundary-clarity","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","lean_decl_name":"AMATELUS.Protocol","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Protocol.lean","lean4_code":"/-\n# プロトコル全体の一貫性と実装考慮事項\n\nこのファイルは、AMATELUSプロトコル全体の安全性と実装の実現可能性を証明します\n(Theorem 7.1, 7.2, 8.1)。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.SecurityAssumptions\nimport AMATELUS.Cryptographic\nimport AMATELUS.TrustChain\nimport AMATELUS.Privacy\nimport AMATELUS.Audit\nimport AMATELUS.Network\n\n-- ## Definition 7.1: Protocol State\n\n/-- Wallet内の通信用DID管理情報\n\n 通信相手ごとの通信用DIDとVCのアソシエーション。\n-/\nstructure WalletCommunicationRecord where\n -- 通信用DID\n commDID : ValidDID\n -- 通信相手のDID\n counterpartyDID : UnknownDID\n -- 発行されたVC(VC発行ありの場合のみ保存)\n vc : Option ValidVC","line":1,"end_line":30,"proof_status":"formalized"} {"id":"def:amatelus","label":"amatelus","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The AMATELUS protocol is a cryptographic authentication mechanism integrating: Decentralized Identifiers (DIDs) Verifiable Credentials (VCs) Zero-Knowledge Proofs (ZKPs)","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","latex_link":"sect0002.html#def:amatelus","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","lean_decl_name":"AMATELUS.Protocol","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Protocol.lean","lean4_code":"/-\n# プロトコル全体の一貫性と実装考慮事項\n\nこのファイルは、AMATELUSプロトコル全体の安全性と実装の実現可能性を証明します\n(Theorem 7.1, 7.2, 8.1)。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.SecurityAssumptions\nimport AMATELUS.Cryptographic\nimport AMATELUS.TrustChain\nimport AMATELUS.Privacy\nimport AMATELUS.Audit\nimport AMATELUS.Network\n\n-- ## Definition 7.1: Protocol State\n\n/-- Wallet内の通信用DID管理情報\n\n 通信相手ごとの通信用DIDとVCのアソシエーション。\n-/\nstructure WalletCommunicationRecord where\n -- 通信用DID\n commDID : ValidDID\n -- 通信相手のDID\n counterpartyDID : UnknownDID\n -- 発行されたVC(VC発行ありの場合のみ保存)\n vc : Option ValidVC","line":1,"end_line":30,"proof_status":"formalized"} {"id":"prop:sybil-resilience","label":"sybil-resilience","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:amatelus"],"nlp_text":"Multiple DID possession is intentional protocol design for privacy protection. While a single entity can control multiple DIDs, Anonymous Hash Identifiers (AHI) restrict per-audit-domain abuse through cryptographic binding to national identity systems.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","latex_link":"sect0007.html#prop:sybil-resilience","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","lean_decl_name":"AMATELUS.Protocol","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Protocol.lean","lean4_code":"/-\n# プロトコル全体の一貫性と実装考慮事項\n\nこのファイルは、AMATELUSプロトコル全体の安全性と実装の実現可能性を証明します\n(Theorem 7.1, 7.2, 8.1)。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.SecurityAssumptions\nimport AMATELUS.Cryptographic\nimport AMATELUS.TrustChain\nimport AMATELUS.Privacy\nimport AMATELUS.Audit\nimport AMATELUS.Network\n\n-- ## Definition 7.1: Protocol State\n\n/-- Wallet内の通信用DID管理情報\n\n 通信相手ごとの通信用DIDとVCのアソシエーション。\n-/\nstructure WalletCommunicationRecord where\n -- 通信用DID\n commDID : ValidDID\n -- 通信相手のDID\n counterpartyDID : UnknownDID\n -- 発行されたVC(VC発行ありの場合のみ保存)\n vc : Option ValidVC","line":1,"end_line":30,"proof_status":"statement_formalized"} {"id":"def:schema-chapter","label":"schema-chapter","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:amatelus"],"nlp_text":"This chapter covers formally verifiable json schema subset aspects of AMATELUS.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.JSONSchemaSubset","latex_link":"sect0010.html#def:schema-chapter","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.JSONSchemaSubset","lean_decl_name":"AMATELUS.JSONSchemaSubset","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/JSONSchemaSubset.lean","lean4_code":"/-\n# AMATELUS JSON Schema Subset Definition\n\nこのファイルは、AMATELUS プロトコル用の JSON Schema サブセットの Lean 形式化を含みます。\n\n## 参考文献\n- AMATELUS JSON Schema Subset: AMATELUS/JSONSchemaSubset.md\n- JSON Schema 2020-12 (Base): https://json-schema.org/draft/2020-12/json-schema-core\n- JSON Schema Validation: https://json-schema.org/draft/2020-12/json-schema-validation\n\n## 設計方針\n1. **形式検証可能**: すべての機能が Lean で証明可能\n2. **参照なし**: $ref, $defs を除外し、循環参照を防止\n3. **停止性保証**: ネスト深さ制限により停止性を保証\n4. **プロトコル保証**: サブセットのみがプロトコルレベルで保証される\n\n## サブセットの制限\n- ❌ 参照系: $ref, $defs, $dynamicRef (循環参照防止)\n- ❌ 動的検証: additionalProperties, patternProperties (プロトコルレベルで無視)\n- ❌ 条件分岐: if/then/else (oneOf で代替可能)\n- ❌ フォーマット: format (pattern で代替可能)\n- ⚠️ ネスト制限: composition keywords は最大3レベル\n-/\n\n-- ## JSON データモデル\n\n/-- JSON値の型定義\n\n JSON仕様(RFC 8259)に基づく6つのプリミティブ型:\n - null: ヌル値","line":1,"end_line":30,"proof_status":"formalized"} {"id":"prop:amatelus-non-scope","label":"amatelus-non-scope","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:amatelus"],"nlp_text":"AMATELUS does not provide: Centralized directory services (DID resolution is local-only) Mediation or relay infrastructure User authorization decisions Communication endpoint management Message delivery guarantees","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","latex_link":"sect0002.html#prop:amatelus-non-scope","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","lean_decl_name":"AMATELUS.Protocol","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Protocol.lean","lean4_code":"/-\n# プロトコル全体の一貫性と実装考慮事項\n\nこのファイルは、AMATELUSプロトコル全体の安全性と実装の実現可能性を証明します\n(Theorem 7.1, 7.2, 8.1)。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.SecurityAssumptions\nimport AMATELUS.Cryptographic\nimport AMATELUS.TrustChain\nimport AMATELUS.Privacy\nimport AMATELUS.Audit\nimport AMATELUS.Network\n\n-- ## Definition 7.1: Protocol State\n\n/-- Wallet内の通信用DID管理情報\n\n 通信相手ごとの通信用DIDとVCのアソシエーション。\n-/\nstructure WalletCommunicationRecord where\n -- 通信用DID\n commDID : ValidDID\n -- 通信相手のDID\n counterpartyDID : UnknownDID\n -- 発行されたVC(VC発行ありの場合のみ保存)\n vc : Option ValidVC","line":1,"end_line":30,"proof_status":"statement_formalized"} {"id":"prop:amatelus-capabilities","label":"amatelus-capabilities","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":["def:amatelus"],"nlp_text":"AMATELUS delivers the following cryptographic capabilities: Public key infrastructure (PKI) based distributed identifiers Zero-knowledge proof-based attribute ownership verification Verifiable credentials for claim issuance and storage Cryptographic trust guarantees","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","latex_link":"sect0002.html#prop:amatelus-capabilities","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Protocol","lean_decl_name":"AMATELUS.Protocol","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Protocol.lean","lean4_code":"/-\n# プロトコル全体の一貫性と実装考慮事項\n\nこのファイルは、AMATELUSプロトコル全体の安全性と実装の実現可能性を証明します\n(Theorem 7.1, 7.2, 8.1)。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.VC\nimport AMATELUS.ZKP\nimport AMATELUS.SecurityAssumptions\nimport AMATELUS.Cryptographic\nimport AMATELUS.TrustChain\nimport AMATELUS.Privacy\nimport AMATELUS.Audit\nimport AMATELUS.Network\n\n-- ## Definition 7.1: Protocol State\n\n/-- Wallet内の通信用DID管理情報\n\n 通信相手ごとの通信用DIDとVCのアソシエーション。\n-/\nstructure WalletCommunicationRecord where\n -- 通信用DID\n commDID : ValidDID\n -- 通信相手のDID\n counterpartyDID : UnknownDID\n -- 発行されたVC(VC発行ありの場合のみ保存)\n vc : Option ValidVC","line":1,"end_line":30,"proof_status":"formalized"} {"id":"thm:privacy-with-didcomm","label":"privacy-with-didcomm","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Privacy is maintained despite public key transmission via DIDComm due to: Ephemeral Communication DIDs: Each session uses distinct DIDs with different key pairs Different services, different keys: User generates new keys for each service Cryptographic unlinkability: Public keys from different sessions cannot be linked (requires \\(2^{128}\\) quantum operations to link, assuming quantum-resistant hash functions) Service-specific communication DIDs: Verifier knows only the communication DID, not the user’s persistent identity DID Result: While DIDComm requires public key disclosure for impersonation prevention, the use of ephemeral DIDs with distinct key pairs per service ensures cross-service unlinkability and privacy.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Privacy","latex_link":"sect0008.html#thm:privacy-with-didcomm","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Privacy","lean_decl_name":"AMATELUS.Privacy","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Privacy.lean","lean4_code":"/-\n# プライバシー保護機構の完全性証明\n\nこのファイルは、複数DID使用による名寄せ防止と\nZKPの零知識性を証明します(Theorem 5.1, 5.3)。\n-/\n\nimport AMATELUS.DID\nimport AMATELUS.ZKP\nimport AMATELUS.SecurityAssumptions\n\n-- ## サービスとプロトコル実行履歴の定義\n\n/-- サービスを表す型 -/\nstructure Service where\n id : String\n deriving Repr, DecidableEq\n\n/-- ZKP提示イベント\n\n HolderがVerifier(サービス提供者)にZKPを提示したイベントを表します。\n このイベントにより、プロトコルの実行履歴を構造的に記録できます。\n\n **重要な設計:**\n - ZKPには**HolderのDIDは含まれない**(ゼロ知識性の保証)\n - ZKPは属性のみを証明し、身元は明かさない\n - presentedDIDは別チャネル(DID提示)で送信されることを想定\n-/\nstructure ZKPPresentationEvent where\n presentedDID : UnknownDID -- 別チャネルで送信されたDID(ZKPとは独立)","line":1,"end_line":30,"proof_status":"formalized"} {"id":"thm:didcomm-impersonation-prevention","label":"didcomm-impersonation-prevention","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Impersonation attacks (attacker with different secret key) are cryptographically prevented through DIDComm. Mechanism: Verifier receives ZKP along with sender’s public key via DIDComm (senderDoc) ZKP must be cryptographically signed with secret key corresponding to this public key If attacker uses different secret key, the signature verification fails Attacker cannot reuse legitimate ZKP with different SK (cryptographically impossible) Security guarantee: Impersonation attacks are prevented by DIDComm alone.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","latex_link":"sect0005.html#thm:didcomm-impersonation-prevention","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","lean_decl_name":"AMATELUS.Cryptographic","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Cryptographic.lean","lean4_code":"/-- Theorem 3.1: DID衝突の量子安全性\n\n 異なるValidDIDDocumentから同じDIDが生成されることは、\n 量子計算機を用いても困難です。\n\n **元の主張(決定論的単射性)の問題点:**\n \"異なるDIDドキュメントは異なるDIDを生成する\"は数学的に偽である。\n なぜなら、SHA-3のような有限出力ハッシュ関数は鳩の巣原理により\n 必ず衝突を持つからである(無限入力空間 → 2^512出力空間)。\n\n **正しい主張(確率的単射性+量子安全性):**\n 衝突は存在するが、量子計算機を用いても衝突を発見することは困難である。\n\n **量子脅威下での安全性:**\n - 衝突探索の量子コスト: 128ビット(Grover適用後)\n - NIST最小要件: 128ビット\n - 結論: 安全(128 ≥ 128)\n\n **証明:**\n SecurityAssumptions.amtHashFunction.quantum_secureにより、\n SHA3-512の衝突探索の量子コストは128ビットであり、\n NIST最小要件128ビットを満たす。\n DID.fromValidDocument は内部でこのハッシュ関数を使用しているため、\n 異なるValidDIDDocumentから同じDIDが生成される確率は無視できるほど小さい。\n-/\ntheorem did_collision_quantum_secure :\n amtHashFunction.collisionSecurity.quantumBits ≥ minSecurityLevel.quantumBits := by\n -- 128 ≥ 128\n exact amtHashFunction.quantum_secure","line":14,"end_line":42,"proof_status":"formalized"} {"id":"thm:secret-key-correspondence-certainty","label":"secret-key-correspondence-certainty","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://amatelus.com/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"DIDComm establishes cryptographic certainty between ZKP and secret key correspondence. By requiring explicit transmission of DIDDocument (containing public key), the protocol ensures: Verifier definitively knows which public key corresponds to the ZKP ZKP is bound to exactly one secret key (the corresponding private key) Any ZKP signed with different secret key will fail verification Result: Cryptographic correspondence is certain, making impersonation impossible.","doc_url":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","latex_link":"sect0005.html#thm:secret-key-correspondence-certainty","lean_link":"https://amatelus.com/docs/find/#doc/AMATELUS.Cryptographic","lean_decl_name":"AMATELUS.Cryptographic","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/amatelus/amatelus/cea74f0a4b1769c90f05dc65e70d1322d368cd86/AMATELUS/Cryptographic.lean","lean4_code":"/-- Theorem 3.1: DID衝突の量子安全性\n\n 異なるValidDIDDocumentから同じDIDが生成されることは、\n 量子計算機を用いても困難です。\n\n **元の主張(決定論的単射性)の問題点:**\n \"異なるDIDドキュメントは異なるDIDを生成する\"は数学的に偽である。\n なぜなら、SHA-3のような有限出力ハッシュ関数は鳩の巣原理により\n 必ず衝突を持つからである(無限入力空間 → 2^512出力空間)。\n\n **正しい主張(確率的単射性+量子安全性):**\n 衝突は存在するが、量子計算機を用いても衝突を発見することは困難である。\n\n **量子脅威下での安全性:**\n - 衝突探索の量子コスト: 128ビット(Grover適用後)\n - NIST最小要件: 128ビット\n - 結論: 安全(128 ≥ 128)\n\n **証明:**\n SecurityAssumptions.amtHashFunction.quantum_secureにより、\n SHA3-512の衝突探索の量子コストは128ビットであり、\n NIST最小要件128ビットを満たす。\n DID.fromValidDocument は内部でこのハッシュ関数を使用しているため、\n 異なるValidDIDDocumentから同じDIDが生成される確率は無視できるほど小さい。\n-/\ntheorem did_collision_quantum_secure :\n amtHashFunction.collisionSecurity.quantumBits ≥ minSecurityLevel.quantumBits := by\n -- 128 ≥ 128\n exact amtHashFunction.quantum_secure","line":14,"end_line":42,"proof_status":"formalized"}