[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trail-of-bits-crypto-protocol-diagram":3,"mdc--bxrz5w-key":38,"related-repo-trail-of-bits-crypto-protocol-diagram":3544,"related-org-trail-of-bits-crypto-protocol-diagram":3641},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":33,"sourceUrl":36,"mdContent":37},"crypto-protocol-diagram","generate cryptographic protocol sequence diagrams","Extracts protocol message flow from source code, RFCs, academic papers, pseudocode, informal prose, ProVerif (.pv), or Tamarin (.spthy) models and generates Mermaid sequenceDiagrams with cryptographic annotations. Use when diagramming a crypto protocol, visualizing a handshake or key exchange flow, extracting message flow from a spec or RFC, diagramming a ProVerif or Tamarin model, or drawing sequence diagrams for TLS, Noise, Signal, X3DH, Double Ratchet, FROST, DH, or ECDH protocols.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"trail-of-bits","Trail of Bits","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrail-of-bits.png","trailofbits",[13,17,20,23],{"name":14,"slug":15,"type":16},"Security","security","tag",{"name":18,"slug":19,"type":16},"Cryptography","cryptography",{"name":21,"slug":22,"type":16},"Engineering","engineering",{"name":24,"slug":25,"type":16},"Diagrams","diagrams",6139,"https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills","2026-07-18T05:47:34.661009",null,541,[32],"agent-skills",{"repoUrl":27,"stars":26,"forks":30,"topics":34,"description":35},[32],"Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows","https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Ftrailmark\u002Fskills\u002Fcrypto-protocol-diagram","---\nname: crypto-protocol-diagram\ndescription: \"Extracts protocol message flow from source code, RFCs, academic papers, pseudocode, informal prose, ProVerif (.pv), or Tamarin (.spthy) models and generates Mermaid sequenceDiagrams with cryptographic annotations. Use when diagramming a crypto protocol, visualizing a handshake or key exchange flow, extracting message flow from a spec or RFC, diagramming a ProVerif or Tamarin model, or drawing sequence diagrams for TLS, Noise, Signal, X3DH, Double Ratchet, FROST, DH, or ECDH protocols.\"\n---\n\n# Crypto Protocol Diagram\n\nProduces a Mermaid `sequenceDiagram` (written to file) and an ASCII sequence\ndiagram (printed inline) from either:\n\n- **Source code** implementing a cryptographic protocol, or\n- **A specification** — RFC, academic paper, pseudocode, informal prose,\n  ProVerif (`.pv`), or Tamarin (`.spthy`) model.\n\n**Tools used:** Read, Write, Grep, Glob, Bash, WebFetch (for URL specs).\n\nUnlike the `diagramming-code` skill (which visualizes code structure), this skill\nextracts **protocol semantics**: who sends what to whom, what cryptographic\ntransformations occur at each step, and what protocol phases exist.\n\nFor call graphs, class hierarchies, or module dependency maps, use the\n`diagramming-code` skill instead.\n\n## When to Use\n\n- User asks to diagram, visualize, or extract a cryptographic protocol\n- Input is source code implementing a handshake, key exchange, or multi-party protocol\n- Input is an RFC, academic paper, pseudocode, or formal model (ProVerif\u002FTamarin)\n- User names a specific protocol (TLS, Noise, Signal, X3DH, FROST)\n\n## When NOT to Use\n\n- User wants a call graph, class hierarchy, or module dependency map — use `diagramming-code`\n- User wants to formally verify a protocol — use `mermaid-to-proverif` (after generating the diagram)\n- Input has no cryptographic protocol semantics (no parties, no message exchange)\n\n## Rationalizations to Reject\n\n| Rationalization | Why It's Wrong | Required Action |\n|-----------------|----------------|-----------------|\n| \"The protocol is simple, I can diagram from memory\" | Memory-based diagrams miss steps and invert arrows | Read the source or spec systematically |\n| \"I'll skip the spec path since code exists\" | Code may diverge from the spec — both paths catch different bugs | When both exist, run spec workflow first, then annotate code divergences |\n| \"Crypto annotations are optional decoration\" | Without crypto annotations, the diagram is just a message flow — useless for security review | Annotate every cryptographic operation |\n| \"The abort path is obvious, no need for alt blocks\" | Implicit abort handling hides missing error checks | Show every abort\u002Ferror path with `alt` blocks |\n| \"I don't need to check the examples first\" | The examples define the expected output quality bar | Study the relevant example before working on unfamiliar input |\n| \"ProVerif\u002FTamarin models are code, not specs\" | Formal models are specifications — they describe intended behavior, not implementation | Use the spec workflow (S1–S5) for `.pv` and `.spthy` files |\n\n---\n\n## Workflow\n\n```\nProtocol Diagram Progress:\n- [ ] Step 0: Determine input type (code \u002F spec \u002F both)\n- [ ] Step 1 (code) or S1–S5 (spec): Extract protocol structure\n- [ ] Step 6: Generate sequenceDiagram\n- [ ] Step 7: Verify and deliver\n```\n\n---\n\n### Step 0: Determine Input Type\n\nBefore doing anything else, classify the input:\n\n| Signal | Input type |\n|--------|-----------|\n| Source file extensions (`.py`, `.rs`, `.go`, `.ts`, `.js`, `.cpp`, `.c`) | **Code** |\n| Function\u002Fclass definitions, import statements | **Code** |\n| RFC-style section headers (`§`, `Section X.Y`, `MUST`\u002F`SHALL` keywords) | **Spec** |\n| `Algorithm`\u002F`Protocol`\u002F`Figure` labels, mathematical notation | **Spec** |\n| ProVerif file (`.pv`) with `process`, `let`, `in`\u002F`out` | **Spec** |\n| Tamarin file (`.spthy`) with `rule`, `--[...]->` | **Spec** |\n| Plain prose or numbered steps describing a protocol | **Spec** |\n| Both source files and a spec document | **Both** (annotate divergences with `⚠️`) |\n\n- **Code only** → skip to Step 1 below\n- **Spec only** → skip to Spec Workflow (S1–S5) below\n- **Both** → run Spec Workflow first, then use the code-reading steps to verify\n  the implementation against the spec diagram and annotate any divergences with `⚠️`\n- **Ambiguous** → ask the user: \"Is this a source code file, a specification\n  document, or both?\"\n\n---\n\n### Step 1: Locate Protocol Entry Points\n\nGrep for function names, type names, and comments that reveal the protocol:\n\n```bash\n# Find handshake, session, round, phase entry points\nrg -l \"handshake|session_init|round[_0-9]|setup|keygen|send_msg|recv_msg\" {targetDir}\n\n# Find crypto primitives in use\nrg \"sign|verify|encrypt|decrypt|dh|ecdh|kdf|hkdf|hmac|hash|commit|reveal|share\" \\\n    {targetDir} --type-add 'src:*.{py,rs,go,ts,js,cpp,c}' -t src -l\n```\n\nStart reading from the highest-level orchestration function — the one that calls\ninto handshake phases or the main protocol loop.\n\n### Step 2: Identify Parties and Roles\n\nExtract participant names from:\n\n- Struct\u002Fclass names: `Client`, `Server`, `Initiator`, `Responder`, `Prover`,\n  `Verifier`, `Dealer`, `Party`, `Coordinator`\n- Function parameter names that carry state for a role\n- Comments declaring the protocol role\n- Test fixtures that set up two-party or N-party scenarios\n\nMap these to Mermaid `participant` declarations. Use short, readable aliases:\n\n```\nparticipant I as Initiator\nparticipant R as Responder\n```\n\n### Step 3: Trace Message Flow\n\nFollow state transitions and network sends\u002Freceives. Look for patterns like:\n\n| Pattern | Meaning |\n|---------|---------|\n| `send(msg)` \u002F `recv()` | Direct message exchange |\n| `serialize` + `transmit` | Structured message sent |\n| Return value passed to other party's function | Logical message (in-process) |\n| `round1_output` → `round2_input` | Round-based MPC step |\n| Struct fields named `ephemeral_key`, `ciphertext`, `mac`, `tag` | Message contents |\n\nFor **in-process** protocol implementations (where both parties run in the same\nprocess), treat function call boundaries as logical message sends when they\nrepresent what would be a network boundary in deployment.\n\n### Step 4: Annotate Cryptographic Operations\n\nAt each protocol step, identify and label:\n\n| Operation | Diagram annotation |\n|-----------|-------------------|\n| Key generation | `Note over A: keygen(params) → pk, sk` |\n| DH \u002F ECDH | `Note over A,B: DH(sk_A, pk_B)` |\n| KDF \u002F HKDF | `Note over A: HKDF(ikm, salt, info)` |\n| Signing | `Note over A: Sign(sk, msg) → σ` |\n| Verification | `Note over B: Verify(pk, msg, σ)` |\n| Encryption | `Note over A: Enc(key, plaintext) → ct` |\n| Decryption | `Note over B: Dec(key, ct) → plaintext` |\n| Commitment | `Note over A: Commit(value, rand) → C` |\n| Hash | `Note over A: H(data) → digest` |\n| Secret sharing | `Note over D: Share(secret, t, n) → {s_i}` |\n| Threshold combine | `Note over C: Combine({s_i}) → secret` |\n\nKeep annotations concise — use mathematical shorthand, not code.\n\n### Step 5: Identify Protocol Phases\n\nGroup message steps into named phases using `rect` or `Note` blocks:\n\nCommon phases to detect:\n- **Setup \u002F Key Generation**: party key creation, trusted setup, parameter gen\n- **Handshake \u002F Init**: ephemeral key exchange, nonce exchange, version negotiation\n- **Authentication**: identity proof, certificate exchange, signature verification\n- **Key Derivation**: session key derivation from shared secrets\n- **Data Transfer \u002F Main Protocol**: encrypted application data exchange\n- **Finalization \u002F Teardown**: session close, MAC verification, abort handling\n\nDetect abort\u002Ferror paths and show them with `alt` blocks.\n\n---\n\n## Spec Workflow (S1–S5)\n\nUse this path when the input is a specification document rather than source code.\nAfter completing S1–S5, continue with Step 6 (Generate sequenceDiagram) and\nStep 7 (Verify and deliver) from the code workflow above.\n\n### Step S1: Ingest the Spec\n\nObtain the full spec text:\n\n- **File path provided** → read with the Read tool\n- **URL provided** → fetch with WebFetch\n- **Pasted inline** → work directly from conversation context\n\nThen identify the spec format and read\n[references\u002Fspec-parsing-patterns.md](references\u002Fspec-parsing-patterns.md)\nfor format-specific extraction guidance:\n\n| Format | Signals |\n|--------|---------|\n| RFC | `RFC XXXX`, `MUST`\u002F`SHALL`\u002F`SHOULD`, ABNF grammars, section-numbered prose |\n| Academic paper \u002F pseudocode | `Algorithm X`, `Protocol X`, `Figure X`, numbered steps, `←`\u002F`→` in math mode |\n| Informal prose | Numbered lists, \"A sends B ...\", plain English descriptions |\n| ProVerif (`.pv`) | `process`, `let`, `in(ch, x)`, `out(ch, msg)`, `!` (replication) |\n| Tamarin (`.spthy`) | `rule`, `--[ ]->`, `Fr(~x)`, `!Pk(A, pk)`, `In(m)`, `Out(m)` |\n\nIf the spec references a known named protocol (TLS, Noise, Signal, X3DH, Double\nRatchet, FROST), also read\n[references\u002Fprotocol-patterns.md](references\u002Fprotocol-patterns.md) to use its\ncanonical flow as a skeleton and fill in spec-specific details.\n\n### Step S2: Extract Parties and Roles\n\nIdentify all protocol participants. Look for:\n\n- **Named roles** in prose or pseudocode: `Alice`, `Bob`, `Client`, `Server`,\n  `Initiator`, `Responder`, `Prover`, `Verifier`, `Dealer`, `Party_i`,\n  `Coordinator`, `Signer`\n- **Section headers**: \"Parties\", \"Roles\", \"Participants\", \"Setup\", \"Notation\"\n- **ProVerif**: process names at top level (`let ClientProc(...)`, `let ServerProc(...)`)\n- **Tamarin**: rule names and fact arguments (e.g. `!Pk($A, pk)` — `$A` is a party)\n\nMap each role to a Mermaid `participant` declaration. Use short IDs with\ndescriptive aliases (see naming conventions in\n[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)).\n\n### Step S3: Extract Message Flow\n\nTrace what each party sends to whom and in what order. Extraction patterns by format:\n\n**RFC \u002F informal prose:**\n- Arrow notation: `A → B: msg`, `A -> B`\n- Sentence patterns: \"A sends B ...\", \"B responds with ...\", \"A transmits ...\",\n  \"upon receiving X, B sends Y\"\n- Numbered steps: extract in order, inferring sender\u002Freceiver from context\n\n**Pseudocode:**\n- Function signatures with explicit `sender`\u002F`receiver` parameters\n- `send(party, msg)` \u002F `receive(party)` calls\n- Return values passed as inputs to the other party's function in the next step\n\n**ProVerif (`.pv`):**\n- `out(ch, msg)` — send on channel `ch`\n- `in(ch, x)` — receive on channel `ch`, bind to `x`\n- Match `out`\u002F`in` pairs on the same channel to identify message flows\n- `!` (replication) signals a role that handles multiple sessions\n\n**Tamarin (`.spthy`):**\n- `In(m)` premise — receive message `m`\n- `Out(m)` conclusion — send message `m`\n- Rule name and ordering of rules reveal protocol rounds\n- `Fr(~x)` — fresh random value generated by a party\n- `--[ Label ]->` facts — security annotations, not messages\n\nPreserve the ordering and round structure. Group concurrent sends (broadcast)\nusing `par` blocks in the final diagram.\n\n### Step S4: Extract Cryptographic Operations\n\nFor each protocol step, identify the cryptographic operations performed and which\nparty performs them:\n\n| Spec notation | Operation | Diagram annotation |\n|---------------|-----------|-------------------|\n| `keygen()`, `Gen(1^λ)` | Key generation | `Note over A: keygen() → pk, sk` |\n| `DH(a, B)`, `g^ab` | DH \u002F ECDH | `Note over A,B: DH(sk_A, pk_B)` |\n| `KDF(ikm)`, `HKDF(...)` | Key derivation | `Note over A: HKDF(ikm, salt, info) → k` |\n| `Sign(sk, m)`, `σ ← Sign` | Signing | `Note over A: Sign(sk, msg) → σ` |\n| `Verify(pk, m, σ)` | Verification | `Note over B: Verify(pk, msg, σ)` |\n| `Enc(k, m)`, `{m}_k` | Encryption | `Note over A: Enc(k, plaintext) → ct` |\n| `Dec(k, c)` | Decryption | `Note over B: Dec(k, ct) → plaintext` |\n| `H(m)`, `hash(m)` | Hash | `Note over A: H(data) → digest` |\n| `Commit(v, r)`, `com` | Commitment | `Note over A: Commit(value, rand) → C` |\n| ProVerif `senc(m, k)` | Symmetric encryption | `Note over A: Enc(k, m) → ct` |\n| ProVerif `pk(sk)` | Public key derivation | `Note over A: pk = pk(sk)` |\n| ProVerif `sign(m, sk)` | Signing | `Note over A: Sign(sk, m) → σ` |\n\nIdentify security conditions and abort paths:\n\n- Prose: \"if verification fails, abort\", \"only if ...\", \"reject if ...\"\n- Pseudocode: `assert`, `require`, `if ... abort`\n- ProVerif: `if m = expected then ... else 0`\n- Tamarin: contradicting facts or restriction lemmas\n\nThese become `alt` blocks in the final diagram.\n\n### Step S5: Flag Spec Ambiguities\n\nBefore moving to Step 6, check for gaps:\n\n- **Unclear message ordering**: infer from round structure or section order;\n  annotate with `⚠️ ordering inferred from spec structure`\n- **Implied parties**: if a party's role is implied but unnamed, give it a\n  descriptive name and note the inference\n- **Missing steps**: if the spec omits a step that the canonical pattern for\n  this protocol requires, annotate:\n  `⚠️ spec omits [step] — canonical protocol requires it`\n- **Underspecified crypto**: if the spec says \"encrypt\" without specifying\n  the scheme, annotate: `⚠️ encryption scheme not specified`\n- **ProVerif\u002FTamarin**: private channels (`c` declared with `new c` or as a\n  private free name) represent out-of-band channels — note them\n\n---\n\n\u003C!-- Both code path (Steps 1–5) and spec path (Steps S1–S5) continue here -->\n\n### Step 6: Generate sequenceDiagram\n\nProduce Mermaid syntax following the rules in\n[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md).\n\n**Completeness over brevity.** Show every distinct message type. Omit repeated\nloop iterations (use `loop` blocks instead), but never omit a distinct protocol\nstep.\n\n**Correctness over aesthetics.** The diagram must match what the code actually\ndoes. If the code diverges from a known spec, annotate the divergence:\n\n```\nNote over A,B: ⚠️ spec requires MAC here — implementation omits it\n```\n\n### Step 7: Verify and Deliver\n\nBefore delivering:\n\n- [ ] Every participant declared actually sends or receives at least one message\n- [ ] Arrows point in the correct direction (sender → receiver)\n- [ ] Cryptographic operations are on the correct party (the one computing them)\n- [ ] If protocol phases are used, no arrows appear outside a phase block\n- [ ] `alt` blocks cover known abort\u002Ferror paths\n- [ ] Diagram renders without syntax errors (check\n      [references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)\n      for common pitfalls)\n- [ ] If spec divergence found, annotated with `⚠️`\n\n**Write the diagram to a file.** Choose a filename derived from the protocol\nname, e.g. `noise-xx-handshake.md` or `x3dh-key-agreement.md`. Write a\nMarkdown file with this structure:\n\n```markdown\n# \u003CProtocol Name> Sequence Diagram\n\n\\`\\`\\`mermaid\nsequenceDiagram\n    ...\n\\`\\`\\`\n\n## Protocol Summary\n\n- **Parties:** ...\n- **Round complexity:** ...\n- **Key primitives:** ...\n- **Authentication:** ...\n- **Forward secrecy:** ...\n- **Notable:** [spec deviations or security observations, or \"none\"]\n```\n\nAfter writing the file, print an **ASCII sequence diagram** inline in the\nresponse, followed by the Protocol Summary. State the output filename so the\nuser knows where to find the Mermaid source.\n\nFollow all drawing conventions in\n[references\u002Fascii-sequence-diagram.md](references\u002Fascii-sequence-diagram.md),\nincluding the inline output format.\n\n---\n\n## Decision Tree\n\n```\n── Input is a spec document (not code)?\n│  └─ Step S1: identify format, read references\u002Fspec-parsing-patterns.md\n│\n── Input is source code (not a spec)?\n│  └─ Step 1: grep for handshake\u002Fround\u002Fsend\u002Frecv entry points\n│\n── Both spec and code provided?\n│  └─ Run Spec Workflow (S1–S5) first to build canonical diagram,\n│     then read code and annotate divergences with ⚠️\n│\n── Spec is a known protocol (TLS, Noise, Signal, X3DH, FROST)?\n│  └─ Read references\u002Fprotocol-patterns.md and use canonical flow as skeleton\n│\n── Spec is ProVerif (.pv) or Tamarin (.spthy)?\n│  └─ Read references\u002Fspec-parsing-patterns.md → Formal Models section\n│\n── Spec message ordering is ambiguous?\n│  └─ Infer from round\u002Fsection structure, annotate with ⚠️\n│\n── Can't identify parties from spec?\n│  └─ Check \"Parties\"\u002F\"Notation\" sections; for ProVerif read process names;\n│     for Tamarin read rule names and fact arguments\n│\n── Don't know which code files implement the protocol?\n│  └─ Step 1: grep for handshake\u002Fround\u002Fsend\u002Frecv entry points\n│\n── Can't identify parties from struct names?\n│  └─ Read test files — test setup reveals roles\n│\n── Protocol runs in-process (no network calls)?\n│  └─ Treat function argument passing at role boundaries as messages\n│\n── MPC \u002F threshold protocol with N parties?\n│  └─ Read references\u002Fprotocol-patterns.md → MPC section\n│\n── Mermaid syntax error?\n│  └─ Read references\u002Fmermaid-sequence-syntax.md → Common Pitfalls\n│\n└─ ASCII drawing conventions?\n   └─ Read references\u002Fascii-sequence-diagram.md\n```\n\n---\n\n## Examples\n\n**Code path** — `examples\u002Fsimple-handshake\u002F`:\n\n- **`protocol.py`** — two-party authenticated key exchange (X25519 DH +\n  Ed25519 signing + HKDF + ChaCha20-Poly1305)\n- **`expected-output.md`** — exact ASCII diagram and Mermaid file the skill\n  should produce for that protocol\n\n**Spec path (ProVerif)** — `examples\u002Fsimple-proverif\u002F`:\n\n- **`model.pv`** — HMAC challenge-response authentication modeled in ProVerif\n- **`expected-output.md`** — step-by-step extraction walkthrough (parties,\n  message flow, crypto ops) and the exact ASCII diagram and Mermaid file the\n  skill should produce\n\nStudy the relevant example before working on an unfamiliar input.\n\n---\n\n## Supporting Documentation\n\n- **[references\u002Fspec-parsing-patterns.md](references\u002Fspec-parsing-patterns.md)** —\n  Extraction rules for RFC, academic paper\u002Fpseudocode, informal prose, ProVerif,\n  and Tamarin input formats; read during Step S1\n- **[references\u002Fmermaid-sequence-syntax.md](references\u002Fmermaid-sequence-syntax.md)** —\n  Participant syntax, arrow types, activations, grouping blocks, escaping rules,\n  and common rendering pitfalls\n- **[references\u002Fprotocol-patterns.md](references\u002Fprotocol-patterns.md)** —\n  Canonical message flows for TLS 1.3, Noise, X3DH, Double Ratchet, Shamir\n  secret sharing, commit-reveal, and generic MPC rounds; use as a reference\n  when comparing implementation against spec\n- **[references\u002Fascii-sequence-diagram.md](references\u002Fascii-sequence-diagram.md)** —\n  Column layout, arrow conventions, self-loops, phase labels, and inline\n  output format for the ASCII diagram\n",{"data":39,"body":40},{"name":4,"description":6},{"type":41,"children":42},"root",[43,51,66,108,118,138,150,157,180,186,217,223,386,390,396,408,411,418,423,731,778,781,787,792,940,945,951,956,1042,1055,1064,1070,1075,1224,1236,1242,1247,1456,1461,1467,1488,1493,1556,1568,1571,1577,1582,1588,1593,1626,1639,1868,1880,1886,1891,2039,2058,2064,2069,2077,2108,2116,2162,2176,2246,2259,2319,2332,2338,2343,2719,2724,2773,2784,2790,2795,2882,2885,2891,2902,2920,2930,2939,2945,2950,3039,3064,3328,3340,3352,3355,3361,3370,3373,3379,3396,3427,3443,3473,3478,3481,3487,3538],{"type":44,"tag":45,"props":46,"children":47},"element","h1",{"id":4},[48],{"type":49,"value":50},"text","Crypto Protocol Diagram",{"type":44,"tag":52,"props":53,"children":54},"p",{},[55,57,64],{"type":49,"value":56},"Produces a Mermaid ",{"type":44,"tag":58,"props":59,"children":61},"code",{"className":60},[],[62],{"type":49,"value":63},"sequenceDiagram",{"type":49,"value":65}," (written to file) and an ASCII sequence\ndiagram (printed inline) from either:",{"type":44,"tag":67,"props":68,"children":69},"ul",{},[70,82],{"type":44,"tag":71,"props":72,"children":73},"li",{},[74,80],{"type":44,"tag":75,"props":76,"children":77},"strong",{},[78],{"type":49,"value":79},"Source code",{"type":49,"value":81}," implementing a cryptographic protocol, or",{"type":44,"tag":71,"props":83,"children":84},{},[85,90,92,98,100,106],{"type":44,"tag":75,"props":86,"children":87},{},[88],{"type":49,"value":89},"A specification",{"type":49,"value":91}," — RFC, academic paper, pseudocode, informal prose,\nProVerif (",{"type":44,"tag":58,"props":93,"children":95},{"className":94},[],[96],{"type":49,"value":97},".pv",{"type":49,"value":99},"), or Tamarin (",{"type":44,"tag":58,"props":101,"children":103},{"className":102},[],[104],{"type":49,"value":105},".spthy",{"type":49,"value":107},") model.",{"type":44,"tag":52,"props":109,"children":110},{},[111,116],{"type":44,"tag":75,"props":112,"children":113},{},[114],{"type":49,"value":115},"Tools used:",{"type":49,"value":117}," Read, Write, Grep, Glob, Bash, WebFetch (for URL specs).",{"type":44,"tag":52,"props":119,"children":120},{},[121,123,129,131,136],{"type":49,"value":122},"Unlike the ",{"type":44,"tag":58,"props":124,"children":126},{"className":125},[],[127],{"type":49,"value":128},"diagramming-code",{"type":49,"value":130}," skill (which visualizes code structure), this skill\nextracts ",{"type":44,"tag":75,"props":132,"children":133},{},[134],{"type":49,"value":135},"protocol semantics",{"type":49,"value":137},": who sends what to whom, what cryptographic\ntransformations occur at each step, and what protocol phases exist.",{"type":44,"tag":52,"props":139,"children":140},{},[141,143,148],{"type":49,"value":142},"For call graphs, class hierarchies, or module dependency maps, use the\n",{"type":44,"tag":58,"props":144,"children":146},{"className":145},[],[147],{"type":49,"value":128},{"type":49,"value":149}," skill instead.",{"type":44,"tag":151,"props":152,"children":154},"h2",{"id":153},"when-to-use",[155],{"type":49,"value":156},"When to Use",{"type":44,"tag":67,"props":158,"children":159},{},[160,165,170,175],{"type":44,"tag":71,"props":161,"children":162},{},[163],{"type":49,"value":164},"User asks to diagram, visualize, or extract a cryptographic protocol",{"type":44,"tag":71,"props":166,"children":167},{},[168],{"type":49,"value":169},"Input is source code implementing a handshake, key exchange, or multi-party protocol",{"type":44,"tag":71,"props":171,"children":172},{},[173],{"type":49,"value":174},"Input is an RFC, academic paper, pseudocode, or formal model (ProVerif\u002FTamarin)",{"type":44,"tag":71,"props":176,"children":177},{},[178],{"type":49,"value":179},"User names a specific protocol (TLS, Noise, Signal, X3DH, FROST)",{"type":44,"tag":151,"props":181,"children":183},{"id":182},"when-not-to-use",[184],{"type":49,"value":185},"When NOT to Use",{"type":44,"tag":67,"props":187,"children":188},{},[189,199,212],{"type":44,"tag":71,"props":190,"children":191},{},[192,194],{"type":49,"value":193},"User wants a call graph, class hierarchy, or module dependency map — use ",{"type":44,"tag":58,"props":195,"children":197},{"className":196},[],[198],{"type":49,"value":128},{"type":44,"tag":71,"props":200,"children":201},{},[202,204,210],{"type":49,"value":203},"User wants to formally verify a protocol — use ",{"type":44,"tag":58,"props":205,"children":207},{"className":206},[],[208],{"type":49,"value":209},"mermaid-to-proverif",{"type":49,"value":211}," (after generating the diagram)",{"type":44,"tag":71,"props":213,"children":214},{},[215],{"type":49,"value":216},"Input has no cryptographic protocol semantics (no parties, no message exchange)",{"type":44,"tag":151,"props":218,"children":220},{"id":219},"rationalizations-to-reject",[221],{"type":49,"value":222},"Rationalizations to Reject",{"type":44,"tag":224,"props":225,"children":226},"table",{},[227,251],{"type":44,"tag":228,"props":229,"children":230},"thead",{},[231],{"type":44,"tag":232,"props":233,"children":234},"tr",{},[235,241,246],{"type":44,"tag":236,"props":237,"children":238},"th",{},[239],{"type":49,"value":240},"Rationalization",{"type":44,"tag":236,"props":242,"children":243},{},[244],{"type":49,"value":245},"Why It's Wrong",{"type":44,"tag":236,"props":247,"children":248},{},[249],{"type":49,"value":250},"Required Action",{"type":44,"tag":252,"props":253,"children":254},"tbody",{},[255,274,292,310,336,354],{"type":44,"tag":232,"props":256,"children":257},{},[258,264,269],{"type":44,"tag":259,"props":260,"children":261},"td",{},[262],{"type":49,"value":263},"\"The protocol is simple, I can diagram from memory\"",{"type":44,"tag":259,"props":265,"children":266},{},[267],{"type":49,"value":268},"Memory-based diagrams miss steps and invert arrows",{"type":44,"tag":259,"props":270,"children":271},{},[272],{"type":49,"value":273},"Read the source or spec systematically",{"type":44,"tag":232,"props":275,"children":276},{},[277,282,287],{"type":44,"tag":259,"props":278,"children":279},{},[280],{"type":49,"value":281},"\"I'll skip the spec path since code exists\"",{"type":44,"tag":259,"props":283,"children":284},{},[285],{"type":49,"value":286},"Code may diverge from the spec — both paths catch different bugs",{"type":44,"tag":259,"props":288,"children":289},{},[290],{"type":49,"value":291},"When both exist, run spec workflow first, then annotate code divergences",{"type":44,"tag":232,"props":293,"children":294},{},[295,300,305],{"type":44,"tag":259,"props":296,"children":297},{},[298],{"type":49,"value":299},"\"Crypto annotations are optional decoration\"",{"type":44,"tag":259,"props":301,"children":302},{},[303],{"type":49,"value":304},"Without crypto annotations, the diagram is just a message flow — useless for security review",{"type":44,"tag":259,"props":306,"children":307},{},[308],{"type":49,"value":309},"Annotate every cryptographic operation",{"type":44,"tag":232,"props":311,"children":312},{},[313,318,323],{"type":44,"tag":259,"props":314,"children":315},{},[316],{"type":49,"value":317},"\"The abort path is obvious, no need for alt blocks\"",{"type":44,"tag":259,"props":319,"children":320},{},[321],{"type":49,"value":322},"Implicit abort handling hides missing error checks",{"type":44,"tag":259,"props":324,"children":325},{},[326,328,334],{"type":49,"value":327},"Show every abort\u002Ferror path with ",{"type":44,"tag":58,"props":329,"children":331},{"className":330},[],[332],{"type":49,"value":333},"alt",{"type":49,"value":335}," blocks",{"type":44,"tag":232,"props":337,"children":338},{},[339,344,349],{"type":44,"tag":259,"props":340,"children":341},{},[342],{"type":49,"value":343},"\"I don't need to check the examples first\"",{"type":44,"tag":259,"props":345,"children":346},{},[347],{"type":49,"value":348},"The examples define the expected output quality bar",{"type":44,"tag":259,"props":350,"children":351},{},[352],{"type":49,"value":353},"Study the relevant example before working on unfamiliar input",{"type":44,"tag":232,"props":355,"children":356},{},[357,362,367],{"type":44,"tag":259,"props":358,"children":359},{},[360],{"type":49,"value":361},"\"ProVerif\u002FTamarin models are code, not specs\"",{"type":44,"tag":259,"props":363,"children":364},{},[365],{"type":49,"value":366},"Formal models are specifications — they describe intended behavior, not implementation",{"type":44,"tag":259,"props":368,"children":369},{},[370,372,377,379,384],{"type":49,"value":371},"Use the spec workflow (S1–S5) for ",{"type":44,"tag":58,"props":373,"children":375},{"className":374},[],[376],{"type":49,"value":97},{"type":49,"value":378}," and ",{"type":44,"tag":58,"props":380,"children":382},{"className":381},[],[383],{"type":49,"value":105},{"type":49,"value":385}," files",{"type":44,"tag":387,"props":388,"children":389},"hr",{},[],{"type":44,"tag":151,"props":391,"children":393},{"id":392},"workflow",[394],{"type":49,"value":395},"Workflow",{"type":44,"tag":397,"props":398,"children":402},"pre",{"className":399,"code":401,"language":49},[400],"language-text","Protocol Diagram Progress:\n- [ ] Step 0: Determine input type (code \u002F spec \u002F both)\n- [ ] Step 1 (code) or S1–S5 (spec): Extract protocol structure\n- [ ] Step 6: Generate sequenceDiagram\n- [ ] Step 7: Verify and deliver\n",[403],{"type":44,"tag":58,"props":404,"children":406},{"__ignoreMap":405},"",[407],{"type":49,"value":401},{"type":44,"tag":387,"props":409,"children":410},{},[],{"type":44,"tag":412,"props":413,"children":415},"h3",{"id":414},"step-0-determine-input-type",[416],{"type":49,"value":417},"Step 0: Determine Input Type",{"type":44,"tag":52,"props":419,"children":420},{},[421],{"type":49,"value":422},"Before doing anything else, classify the input:",{"type":44,"tag":224,"props":424,"children":425},{},[426,442],{"type":44,"tag":228,"props":427,"children":428},{},[429],{"type":44,"tag":232,"props":430,"children":431},{},[432,437],{"type":44,"tag":236,"props":433,"children":434},{},[435],{"type":49,"value":436},"Signal",{"type":44,"tag":236,"props":438,"children":439},{},[440],{"type":49,"value":441},"Input type",{"type":44,"tag":252,"props":443,"children":444},{},[445,512,527,573,608,657,691,706],{"type":44,"tag":232,"props":446,"children":447},{},[448,504],{"type":44,"tag":259,"props":449,"children":450},{},[451,453,459,461,467,468,474,475,481,482,488,489,495,496,502],{"type":49,"value":452},"Source file extensions (",{"type":44,"tag":58,"props":454,"children":456},{"className":455},[],[457],{"type":49,"value":458},".py",{"type":49,"value":460},", ",{"type":44,"tag":58,"props":462,"children":464},{"className":463},[],[465],{"type":49,"value":466},".rs",{"type":49,"value":460},{"type":44,"tag":58,"props":469,"children":471},{"className":470},[],[472],{"type":49,"value":473},".go",{"type":49,"value":460},{"type":44,"tag":58,"props":476,"children":478},{"className":477},[],[479],{"type":49,"value":480},".ts",{"type":49,"value":460},{"type":44,"tag":58,"props":483,"children":485},{"className":484},[],[486],{"type":49,"value":487},".js",{"type":49,"value":460},{"type":44,"tag":58,"props":490,"children":492},{"className":491},[],[493],{"type":49,"value":494},".cpp",{"type":49,"value":460},{"type":44,"tag":58,"props":497,"children":499},{"className":498},[],[500],{"type":49,"value":501},".c",{"type":49,"value":503},")",{"type":44,"tag":259,"props":505,"children":506},{},[507],{"type":44,"tag":75,"props":508,"children":509},{},[510],{"type":49,"value":511},"Code",{"type":44,"tag":232,"props":513,"children":514},{},[515,520],{"type":44,"tag":259,"props":516,"children":517},{},[518],{"type":49,"value":519},"Function\u002Fclass definitions, import statements",{"type":44,"tag":259,"props":521,"children":522},{},[523],{"type":44,"tag":75,"props":524,"children":525},{},[526],{"type":49,"value":511},{"type":44,"tag":232,"props":528,"children":529},{},[530,565],{"type":44,"tag":259,"props":531,"children":532},{},[533,535,541,542,548,549,555,557,563],{"type":49,"value":534},"RFC-style section headers (",{"type":44,"tag":58,"props":536,"children":538},{"className":537},[],[539],{"type":49,"value":540},"§",{"type":49,"value":460},{"type":44,"tag":58,"props":543,"children":545},{"className":544},[],[546],{"type":49,"value":547},"Section X.Y",{"type":49,"value":460},{"type":44,"tag":58,"props":550,"children":552},{"className":551},[],[553],{"type":49,"value":554},"MUST",{"type":49,"value":556},"\u002F",{"type":44,"tag":58,"props":558,"children":560},{"className":559},[],[561],{"type":49,"value":562},"SHALL",{"type":49,"value":564}," keywords)",{"type":44,"tag":259,"props":566,"children":567},{},[568],{"type":44,"tag":75,"props":569,"children":570},{},[571],{"type":49,"value":572},"Spec",{"type":44,"tag":232,"props":574,"children":575},{},[576,601],{"type":44,"tag":259,"props":577,"children":578},{},[579,585,586,592,593,599],{"type":44,"tag":58,"props":580,"children":582},{"className":581},[],[583],{"type":49,"value":584},"Algorithm",{"type":49,"value":556},{"type":44,"tag":58,"props":587,"children":589},{"className":588},[],[590],{"type":49,"value":591},"Protocol",{"type":49,"value":556},{"type":44,"tag":58,"props":594,"children":596},{"className":595},[],[597],{"type":49,"value":598},"Figure",{"type":49,"value":600}," labels, mathematical notation",{"type":44,"tag":259,"props":602,"children":603},{},[604],{"type":44,"tag":75,"props":605,"children":606},{},[607],{"type":49,"value":572},{"type":44,"tag":232,"props":609,"children":610},{},[611,650],{"type":44,"tag":259,"props":612,"children":613},{},[614,616,621,623,629,630,636,637,643,644],{"type":49,"value":615},"ProVerif file (",{"type":44,"tag":58,"props":617,"children":619},{"className":618},[],[620],{"type":49,"value":97},{"type":49,"value":622},") with ",{"type":44,"tag":58,"props":624,"children":626},{"className":625},[],[627],{"type":49,"value":628},"process",{"type":49,"value":460},{"type":44,"tag":58,"props":631,"children":633},{"className":632},[],[634],{"type":49,"value":635},"let",{"type":49,"value":460},{"type":44,"tag":58,"props":638,"children":640},{"className":639},[],[641],{"type":49,"value":642},"in",{"type":49,"value":556},{"type":44,"tag":58,"props":645,"children":647},{"className":646},[],[648],{"type":49,"value":649},"out",{"type":44,"tag":259,"props":651,"children":652},{},[653],{"type":44,"tag":75,"props":654,"children":655},{},[656],{"type":49,"value":572},{"type":44,"tag":232,"props":658,"children":659},{},[660,684],{"type":44,"tag":259,"props":661,"children":662},{},[663,665,670,671,677,678],{"type":49,"value":664},"Tamarin file (",{"type":44,"tag":58,"props":666,"children":668},{"className":667},[],[669],{"type":49,"value":105},{"type":49,"value":622},{"type":44,"tag":58,"props":672,"children":674},{"className":673},[],[675],{"type":49,"value":676},"rule",{"type":49,"value":460},{"type":44,"tag":58,"props":679,"children":681},{"className":680},[],[682],{"type":49,"value":683},"--[...]->",{"type":44,"tag":259,"props":685,"children":686},{},[687],{"type":44,"tag":75,"props":688,"children":689},{},[690],{"type":49,"value":572},{"type":44,"tag":232,"props":692,"children":693},{},[694,699],{"type":44,"tag":259,"props":695,"children":696},{},[697],{"type":49,"value":698},"Plain prose or numbered steps describing a protocol",{"type":44,"tag":259,"props":700,"children":701},{},[702],{"type":44,"tag":75,"props":703,"children":704},{},[705],{"type":49,"value":572},{"type":44,"tag":232,"props":707,"children":708},{},[709,714],{"type":44,"tag":259,"props":710,"children":711},{},[712],{"type":49,"value":713},"Both source files and a spec document",{"type":44,"tag":259,"props":715,"children":716},{},[717,722,724,730],{"type":44,"tag":75,"props":718,"children":719},{},[720],{"type":49,"value":721},"Both",{"type":49,"value":723}," (annotate divergences with ",{"type":44,"tag":58,"props":725,"children":727},{"className":726},[],[728],{"type":49,"value":729},"⚠️",{"type":49,"value":503},{"type":44,"tag":67,"props":732,"children":733},{},[734,744,754,768],{"type":44,"tag":71,"props":735,"children":736},{},[737,742],{"type":44,"tag":75,"props":738,"children":739},{},[740],{"type":49,"value":741},"Code only",{"type":49,"value":743}," → skip to Step 1 below",{"type":44,"tag":71,"props":745,"children":746},{},[747,752],{"type":44,"tag":75,"props":748,"children":749},{},[750],{"type":49,"value":751},"Spec only",{"type":49,"value":753}," → skip to Spec Workflow (S1–S5) below",{"type":44,"tag":71,"props":755,"children":756},{},[757,761,763],{"type":44,"tag":75,"props":758,"children":759},{},[760],{"type":49,"value":721},{"type":49,"value":762}," → run Spec Workflow first, then use the code-reading steps to verify\nthe implementation against the spec diagram and annotate any divergences with ",{"type":44,"tag":58,"props":764,"children":766},{"className":765},[],[767],{"type":49,"value":729},{"type":44,"tag":71,"props":769,"children":770},{},[771,776],{"type":44,"tag":75,"props":772,"children":773},{},[774],{"type":49,"value":775},"Ambiguous",{"type":49,"value":777}," → ask the user: \"Is this a source code file, a specification\ndocument, or both?\"",{"type":44,"tag":387,"props":779,"children":780},{},[],{"type":44,"tag":412,"props":782,"children":784},{"id":783},"step-1-locate-protocol-entry-points",[785],{"type":49,"value":786},"Step 1: Locate Protocol Entry Points",{"type":44,"tag":52,"props":788,"children":789},{},[790],{"type":49,"value":791},"Grep for function names, type names, and comments that reveal the protocol:",{"type":44,"tag":397,"props":793,"children":797},{"className":794,"code":795,"language":796,"meta":405,"style":405},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Find handshake, session, round, phase entry points\nrg -l \"handshake|session_init|round[_0-9]|setup|keygen|send_msg|recv_msg\" {targetDir}\n\n# Find crypto primitives in use\nrg \"sign|verify|encrypt|decrypt|dh|ecdh|kdf|hkdf|hmac|hash|commit|reveal|share\" \\\n    {targetDir} --type-add 'src:*.{py,rs,go,ts,js,cpp,c}' -t src -l\n","bash",[798],{"type":44,"tag":58,"props":799,"children":800},{"__ignoreMap":405},[801,813,850,860,869,896],{"type":44,"tag":802,"props":803,"children":806},"span",{"class":804,"line":805},"line",1,[807],{"type":44,"tag":802,"props":808,"children":810},{"style":809},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[811],{"type":49,"value":812},"# Find handshake, session, round, phase entry points\n",{"type":44,"tag":802,"props":814,"children":816},{"class":804,"line":815},2,[817,823,829,835,840,845],{"type":44,"tag":802,"props":818,"children":820},{"style":819},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[821],{"type":49,"value":822},"rg",{"type":44,"tag":802,"props":824,"children":826},{"style":825},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[827],{"type":49,"value":828}," -l",{"type":44,"tag":802,"props":830,"children":832},{"style":831},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[833],{"type":49,"value":834}," \"",{"type":44,"tag":802,"props":836,"children":837},{"style":825},[838],{"type":49,"value":839},"handshake|session_init|round[_0-9]|setup|keygen|send_msg|recv_msg",{"type":44,"tag":802,"props":841,"children":842},{"style":831},[843],{"type":49,"value":844},"\"",{"type":44,"tag":802,"props":846,"children":847},{"style":825},[848],{"type":49,"value":849}," {targetDir}\n",{"type":44,"tag":802,"props":851,"children":853},{"class":804,"line":852},3,[854],{"type":44,"tag":802,"props":855,"children":857},{"emptyLinePlaceholder":856},true,[858],{"type":49,"value":859},"\n",{"type":44,"tag":802,"props":861,"children":863},{"class":804,"line":862},4,[864],{"type":44,"tag":802,"props":865,"children":866},{"style":809},[867],{"type":49,"value":868},"# Find crypto primitives in use\n",{"type":44,"tag":802,"props":870,"children":872},{"class":804,"line":871},5,[873,877,881,886,890],{"type":44,"tag":802,"props":874,"children":875},{"style":819},[876],{"type":49,"value":822},{"type":44,"tag":802,"props":878,"children":879},{"style":831},[880],{"type":49,"value":834},{"type":44,"tag":802,"props":882,"children":883},{"style":825},[884],{"type":49,"value":885},"sign|verify|encrypt|decrypt|dh|ecdh|kdf|hkdf|hmac|hash|commit|reveal|share",{"type":44,"tag":802,"props":887,"children":888},{"style":831},[889],{"type":49,"value":844},{"type":44,"tag":802,"props":891,"children":893},{"style":892},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[894],{"type":49,"value":895}," \\\n",{"type":44,"tag":802,"props":897,"children":899},{"class":804,"line":898},6,[900,905,910,915,920,925,930,935],{"type":44,"tag":802,"props":901,"children":902},{"style":825},[903],{"type":49,"value":904},"    {targetDir}",{"type":44,"tag":802,"props":906,"children":907},{"style":825},[908],{"type":49,"value":909}," --type-add",{"type":44,"tag":802,"props":911,"children":912},{"style":831},[913],{"type":49,"value":914}," '",{"type":44,"tag":802,"props":916,"children":917},{"style":825},[918],{"type":49,"value":919},"src:*.{py,rs,go,ts,js,cpp,c}",{"type":44,"tag":802,"props":921,"children":922},{"style":831},[923],{"type":49,"value":924},"'",{"type":44,"tag":802,"props":926,"children":927},{"style":825},[928],{"type":49,"value":929}," -t",{"type":44,"tag":802,"props":931,"children":932},{"style":825},[933],{"type":49,"value":934}," src",{"type":44,"tag":802,"props":936,"children":937},{"style":825},[938],{"type":49,"value":939}," -l\n",{"type":44,"tag":52,"props":941,"children":942},{},[943],{"type":49,"value":944},"Start reading from the highest-level orchestration function — the one that calls\ninto handshake phases or the main protocol loop.",{"type":44,"tag":412,"props":946,"children":948},{"id":947},"step-2-identify-parties-and-roles",[949],{"type":49,"value":950},"Step 2: Identify Parties and Roles",{"type":44,"tag":52,"props":952,"children":953},{},[954],{"type":49,"value":955},"Extract participant names from:",{"type":44,"tag":67,"props":957,"children":958},{},[959,1027,1032,1037],{"type":44,"tag":71,"props":960,"children":961},{},[962,964,970,971,977,978,984,985,991,992,998,1000,1006,1007,1013,1014,1020,1021],{"type":49,"value":963},"Struct\u002Fclass names: ",{"type":44,"tag":58,"props":965,"children":967},{"className":966},[],[968],{"type":49,"value":969},"Client",{"type":49,"value":460},{"type":44,"tag":58,"props":972,"children":974},{"className":973},[],[975],{"type":49,"value":976},"Server",{"type":49,"value":460},{"type":44,"tag":58,"props":979,"children":981},{"className":980},[],[982],{"type":49,"value":983},"Initiator",{"type":49,"value":460},{"type":44,"tag":58,"props":986,"children":988},{"className":987},[],[989],{"type":49,"value":990},"Responder",{"type":49,"value":460},{"type":44,"tag":58,"props":993,"children":995},{"className":994},[],[996],{"type":49,"value":997},"Prover",{"type":49,"value":999},",\n",{"type":44,"tag":58,"props":1001,"children":1003},{"className":1002},[],[1004],{"type":49,"value":1005},"Verifier",{"type":49,"value":460},{"type":44,"tag":58,"props":1008,"children":1010},{"className":1009},[],[1011],{"type":49,"value":1012},"Dealer",{"type":49,"value":460},{"type":44,"tag":58,"props":1015,"children":1017},{"className":1016},[],[1018],{"type":49,"value":1019},"Party",{"type":49,"value":460},{"type":44,"tag":58,"props":1022,"children":1024},{"className":1023},[],[1025],{"type":49,"value":1026},"Coordinator",{"type":44,"tag":71,"props":1028,"children":1029},{},[1030],{"type":49,"value":1031},"Function parameter names that carry state for a role",{"type":44,"tag":71,"props":1033,"children":1034},{},[1035],{"type":49,"value":1036},"Comments declaring the protocol role",{"type":44,"tag":71,"props":1038,"children":1039},{},[1040],{"type":49,"value":1041},"Test fixtures that set up two-party or N-party scenarios",{"type":44,"tag":52,"props":1043,"children":1044},{},[1045,1047,1053],{"type":49,"value":1046},"Map these to Mermaid ",{"type":44,"tag":58,"props":1048,"children":1050},{"className":1049},[],[1051],{"type":49,"value":1052},"participant",{"type":49,"value":1054}," declarations. Use short, readable aliases:",{"type":44,"tag":397,"props":1056,"children":1059},{"className":1057,"code":1058,"language":49},[400],"participant I as Initiator\nparticipant R as Responder\n",[1060],{"type":44,"tag":58,"props":1061,"children":1062},{"__ignoreMap":405},[1063],{"type":49,"value":1058},{"type":44,"tag":412,"props":1065,"children":1067},{"id":1066},"step-3-trace-message-flow",[1068],{"type":49,"value":1069},"Step 3: Trace Message Flow",{"type":44,"tag":52,"props":1071,"children":1072},{},[1073],{"type":49,"value":1074},"Follow state transitions and network sends\u002Freceives. Look for patterns like:",{"type":44,"tag":224,"props":1076,"children":1077},{},[1078,1094],{"type":44,"tag":228,"props":1079,"children":1080},{},[1081],{"type":44,"tag":232,"props":1082,"children":1083},{},[1084,1089],{"type":44,"tag":236,"props":1085,"children":1086},{},[1087],{"type":49,"value":1088},"Pattern",{"type":44,"tag":236,"props":1090,"children":1091},{},[1092],{"type":49,"value":1093},"Meaning",{"type":44,"tag":252,"props":1095,"children":1096},{},[1097,1122,1147,1160,1185],{"type":44,"tag":232,"props":1098,"children":1099},{},[1100,1117],{"type":44,"tag":259,"props":1101,"children":1102},{},[1103,1109,1111],{"type":44,"tag":58,"props":1104,"children":1106},{"className":1105},[],[1107],{"type":49,"value":1108},"send(msg)",{"type":49,"value":1110}," \u002F ",{"type":44,"tag":58,"props":1112,"children":1114},{"className":1113},[],[1115],{"type":49,"value":1116},"recv()",{"type":44,"tag":259,"props":1118,"children":1119},{},[1120],{"type":49,"value":1121},"Direct message exchange",{"type":44,"tag":232,"props":1123,"children":1124},{},[1125,1142],{"type":44,"tag":259,"props":1126,"children":1127},{},[1128,1134,1136],{"type":44,"tag":58,"props":1129,"children":1131},{"className":1130},[],[1132],{"type":49,"value":1133},"serialize",{"type":49,"value":1135}," + ",{"type":44,"tag":58,"props":1137,"children":1139},{"className":1138},[],[1140],{"type":49,"value":1141},"transmit",{"type":44,"tag":259,"props":1143,"children":1144},{},[1145],{"type":49,"value":1146},"Structured message sent",{"type":44,"tag":232,"props":1148,"children":1149},{},[1150,1155],{"type":44,"tag":259,"props":1151,"children":1152},{},[1153],{"type":49,"value":1154},"Return value passed to other party's function",{"type":44,"tag":259,"props":1156,"children":1157},{},[1158],{"type":49,"value":1159},"Logical message (in-process)",{"type":44,"tag":232,"props":1161,"children":1162},{},[1163,1180],{"type":44,"tag":259,"props":1164,"children":1165},{},[1166,1172,1174],{"type":44,"tag":58,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":49,"value":1171},"round1_output",{"type":49,"value":1173}," → ",{"type":44,"tag":58,"props":1175,"children":1177},{"className":1176},[],[1178],{"type":49,"value":1179},"round2_input",{"type":44,"tag":259,"props":1181,"children":1182},{},[1183],{"type":49,"value":1184},"Round-based MPC step",{"type":44,"tag":232,"props":1186,"children":1187},{},[1188,1219],{"type":44,"tag":259,"props":1189,"children":1190},{},[1191,1193,1199,1200,1206,1207,1213,1214],{"type":49,"value":1192},"Struct fields named ",{"type":44,"tag":58,"props":1194,"children":1196},{"className":1195},[],[1197],{"type":49,"value":1198},"ephemeral_key",{"type":49,"value":460},{"type":44,"tag":58,"props":1201,"children":1203},{"className":1202},[],[1204],{"type":49,"value":1205},"ciphertext",{"type":49,"value":460},{"type":44,"tag":58,"props":1208,"children":1210},{"className":1209},[],[1211],{"type":49,"value":1212},"mac",{"type":49,"value":460},{"type":44,"tag":58,"props":1215,"children":1217},{"className":1216},[],[1218],{"type":49,"value":16},{"type":44,"tag":259,"props":1220,"children":1221},{},[1222],{"type":49,"value":1223},"Message contents",{"type":44,"tag":52,"props":1225,"children":1226},{},[1227,1229,1234],{"type":49,"value":1228},"For ",{"type":44,"tag":75,"props":1230,"children":1231},{},[1232],{"type":49,"value":1233},"in-process",{"type":49,"value":1235}," protocol implementations (where both parties run in the same\nprocess), treat function call boundaries as logical message sends when they\nrepresent what would be a network boundary in deployment.",{"type":44,"tag":412,"props":1237,"children":1239},{"id":1238},"step-4-annotate-cryptographic-operations",[1240],{"type":49,"value":1241},"Step 4: Annotate Cryptographic Operations",{"type":44,"tag":52,"props":1243,"children":1244},{},[1245],{"type":49,"value":1246},"At each protocol step, identify and label:",{"type":44,"tag":224,"props":1248,"children":1249},{},[1250,1266],{"type":44,"tag":228,"props":1251,"children":1252},{},[1253],{"type":44,"tag":232,"props":1254,"children":1255},{},[1256,1261],{"type":44,"tag":236,"props":1257,"children":1258},{},[1259],{"type":49,"value":1260},"Operation",{"type":44,"tag":236,"props":1262,"children":1263},{},[1264],{"type":49,"value":1265},"Diagram annotation",{"type":44,"tag":252,"props":1267,"children":1268},{},[1269,1286,1303,1320,1337,1354,1371,1388,1405,1422,1439],{"type":44,"tag":232,"props":1270,"children":1271},{},[1272,1277],{"type":44,"tag":259,"props":1273,"children":1274},{},[1275],{"type":49,"value":1276},"Key generation",{"type":44,"tag":259,"props":1278,"children":1279},{},[1280],{"type":44,"tag":58,"props":1281,"children":1283},{"className":1282},[],[1284],{"type":49,"value":1285},"Note over A: keygen(params) → pk, sk",{"type":44,"tag":232,"props":1287,"children":1288},{},[1289,1294],{"type":44,"tag":259,"props":1290,"children":1291},{},[1292],{"type":49,"value":1293},"DH \u002F ECDH",{"type":44,"tag":259,"props":1295,"children":1296},{},[1297],{"type":44,"tag":58,"props":1298,"children":1300},{"className":1299},[],[1301],{"type":49,"value":1302},"Note over A,B: DH(sk_A, pk_B)",{"type":44,"tag":232,"props":1304,"children":1305},{},[1306,1311],{"type":44,"tag":259,"props":1307,"children":1308},{},[1309],{"type":49,"value":1310},"KDF \u002F HKDF",{"type":44,"tag":259,"props":1312,"children":1313},{},[1314],{"type":44,"tag":58,"props":1315,"children":1317},{"className":1316},[],[1318],{"type":49,"value":1319},"Note over A: HKDF(ikm, salt, info)",{"type":44,"tag":232,"props":1321,"children":1322},{},[1323,1328],{"type":44,"tag":259,"props":1324,"children":1325},{},[1326],{"type":49,"value":1327},"Signing",{"type":44,"tag":259,"props":1329,"children":1330},{},[1331],{"type":44,"tag":58,"props":1332,"children":1334},{"className":1333},[],[1335],{"type":49,"value":1336},"Note over A: Sign(sk, msg) → σ",{"type":44,"tag":232,"props":1338,"children":1339},{},[1340,1345],{"type":44,"tag":259,"props":1341,"children":1342},{},[1343],{"type":49,"value":1344},"Verification",{"type":44,"tag":259,"props":1346,"children":1347},{},[1348],{"type":44,"tag":58,"props":1349,"children":1351},{"className":1350},[],[1352],{"type":49,"value":1353},"Note over B: Verify(pk, msg, σ)",{"type":44,"tag":232,"props":1355,"children":1356},{},[1357,1362],{"type":44,"tag":259,"props":1358,"children":1359},{},[1360],{"type":49,"value":1361},"Encryption",{"type":44,"tag":259,"props":1363,"children":1364},{},[1365],{"type":44,"tag":58,"props":1366,"children":1368},{"className":1367},[],[1369],{"type":49,"value":1370},"Note over A: Enc(key, plaintext) → ct",{"type":44,"tag":232,"props":1372,"children":1373},{},[1374,1379],{"type":44,"tag":259,"props":1375,"children":1376},{},[1377],{"type":49,"value":1378},"Decryption",{"type":44,"tag":259,"props":1380,"children":1381},{},[1382],{"type":44,"tag":58,"props":1383,"children":1385},{"className":1384},[],[1386],{"type":49,"value":1387},"Note over B: Dec(key, ct) → plaintext",{"type":44,"tag":232,"props":1389,"children":1390},{},[1391,1396],{"type":44,"tag":259,"props":1392,"children":1393},{},[1394],{"type":49,"value":1395},"Commitment",{"type":44,"tag":259,"props":1397,"children":1398},{},[1399],{"type":44,"tag":58,"props":1400,"children":1402},{"className":1401},[],[1403],{"type":49,"value":1404},"Note over A: Commit(value, rand) → C",{"type":44,"tag":232,"props":1406,"children":1407},{},[1408,1413],{"type":44,"tag":259,"props":1409,"children":1410},{},[1411],{"type":49,"value":1412},"Hash",{"type":44,"tag":259,"props":1414,"children":1415},{},[1416],{"type":44,"tag":58,"props":1417,"children":1419},{"className":1418},[],[1420],{"type":49,"value":1421},"Note over A: H(data) → digest",{"type":44,"tag":232,"props":1423,"children":1424},{},[1425,1430],{"type":44,"tag":259,"props":1426,"children":1427},{},[1428],{"type":49,"value":1429},"Secret sharing",{"type":44,"tag":259,"props":1431,"children":1432},{},[1433],{"type":44,"tag":58,"props":1434,"children":1436},{"className":1435},[],[1437],{"type":49,"value":1438},"Note over D: Share(secret, t, n) → {s_i}",{"type":44,"tag":232,"props":1440,"children":1441},{},[1442,1447],{"type":44,"tag":259,"props":1443,"children":1444},{},[1445],{"type":49,"value":1446},"Threshold combine",{"type":44,"tag":259,"props":1448,"children":1449},{},[1450],{"type":44,"tag":58,"props":1451,"children":1453},{"className":1452},[],[1454],{"type":49,"value":1455},"Note over C: Combine({s_i}) → secret",{"type":44,"tag":52,"props":1457,"children":1458},{},[1459],{"type":49,"value":1460},"Keep annotations concise — use mathematical shorthand, not code.",{"type":44,"tag":412,"props":1462,"children":1464},{"id":1463},"step-5-identify-protocol-phases",[1465],{"type":49,"value":1466},"Step 5: Identify Protocol Phases",{"type":44,"tag":52,"props":1468,"children":1469},{},[1470,1472,1478,1480,1486],{"type":49,"value":1471},"Group message steps into named phases using ",{"type":44,"tag":58,"props":1473,"children":1475},{"className":1474},[],[1476],{"type":49,"value":1477},"rect",{"type":49,"value":1479}," or ",{"type":44,"tag":58,"props":1481,"children":1483},{"className":1482},[],[1484],{"type":49,"value":1485},"Note",{"type":49,"value":1487}," blocks:",{"type":44,"tag":52,"props":1489,"children":1490},{},[1491],{"type":49,"value":1492},"Common phases to detect:",{"type":44,"tag":67,"props":1494,"children":1495},{},[1496,1506,1516,1526,1536,1546],{"type":44,"tag":71,"props":1497,"children":1498},{},[1499,1504],{"type":44,"tag":75,"props":1500,"children":1501},{},[1502],{"type":49,"value":1503},"Setup \u002F Key Generation",{"type":49,"value":1505},": party key creation, trusted setup, parameter gen",{"type":44,"tag":71,"props":1507,"children":1508},{},[1509,1514],{"type":44,"tag":75,"props":1510,"children":1511},{},[1512],{"type":49,"value":1513},"Handshake \u002F Init",{"type":49,"value":1515},": ephemeral key exchange, nonce exchange, version negotiation",{"type":44,"tag":71,"props":1517,"children":1518},{},[1519,1524],{"type":44,"tag":75,"props":1520,"children":1521},{},[1522],{"type":49,"value":1523},"Authentication",{"type":49,"value":1525},": identity proof, certificate exchange, signature verification",{"type":44,"tag":71,"props":1527,"children":1528},{},[1529,1534],{"type":44,"tag":75,"props":1530,"children":1531},{},[1532],{"type":49,"value":1533},"Key Derivation",{"type":49,"value":1535},": session key derivation from shared secrets",{"type":44,"tag":71,"props":1537,"children":1538},{},[1539,1544],{"type":44,"tag":75,"props":1540,"children":1541},{},[1542],{"type":49,"value":1543},"Data Transfer \u002F Main Protocol",{"type":49,"value":1545},": encrypted application data exchange",{"type":44,"tag":71,"props":1547,"children":1548},{},[1549,1554],{"type":44,"tag":75,"props":1550,"children":1551},{},[1552],{"type":49,"value":1553},"Finalization \u002F Teardown",{"type":49,"value":1555},": session close, MAC verification, abort handling",{"type":44,"tag":52,"props":1557,"children":1558},{},[1559,1561,1566],{"type":49,"value":1560},"Detect abort\u002Ferror paths and show them with ",{"type":44,"tag":58,"props":1562,"children":1564},{"className":1563},[],[1565],{"type":49,"value":333},{"type":49,"value":1567}," blocks.",{"type":44,"tag":387,"props":1569,"children":1570},{},[],{"type":44,"tag":151,"props":1572,"children":1574},{"id":1573},"spec-workflow-s1s5",[1575],{"type":49,"value":1576},"Spec Workflow (S1–S5)",{"type":44,"tag":52,"props":1578,"children":1579},{},[1580],{"type":49,"value":1581},"Use this path when the input is a specification document rather than source code.\nAfter completing S1–S5, continue with Step 6 (Generate sequenceDiagram) and\nStep 7 (Verify and deliver) from the code workflow above.",{"type":44,"tag":412,"props":1583,"children":1585},{"id":1584},"step-s1-ingest-the-spec",[1586],{"type":49,"value":1587},"Step S1: Ingest the Spec",{"type":44,"tag":52,"props":1589,"children":1590},{},[1591],{"type":49,"value":1592},"Obtain the full spec text:",{"type":44,"tag":67,"props":1594,"children":1595},{},[1596,1606,1616],{"type":44,"tag":71,"props":1597,"children":1598},{},[1599,1604],{"type":44,"tag":75,"props":1600,"children":1601},{},[1602],{"type":49,"value":1603},"File path provided",{"type":49,"value":1605}," → read with the Read tool",{"type":44,"tag":71,"props":1607,"children":1608},{},[1609,1614],{"type":44,"tag":75,"props":1610,"children":1611},{},[1612],{"type":49,"value":1613},"URL provided",{"type":49,"value":1615}," → fetch with WebFetch",{"type":44,"tag":71,"props":1617,"children":1618},{},[1619,1624],{"type":44,"tag":75,"props":1620,"children":1621},{},[1622],{"type":49,"value":1623},"Pasted inline",{"type":49,"value":1625}," → work directly from conversation context",{"type":44,"tag":52,"props":1627,"children":1628},{},[1629,1631,1637],{"type":49,"value":1630},"Then identify the spec format and read\n",{"type":44,"tag":1632,"props":1633,"children":1635},"a",{"href":1634},"references\u002Fspec-parsing-patterns.md",[1636],{"type":49,"value":1634},{"type":49,"value":1638},"\nfor format-specific extraction guidance:",{"type":44,"tag":224,"props":1640,"children":1641},{},[1642,1658],{"type":44,"tag":228,"props":1643,"children":1644},{},[1645],{"type":44,"tag":232,"props":1646,"children":1647},{},[1648,1653],{"type":44,"tag":236,"props":1649,"children":1650},{},[1651],{"type":49,"value":1652},"Format",{"type":44,"tag":236,"props":1654,"children":1655},{},[1656],{"type":49,"value":1657},"Signals",{"type":44,"tag":252,"props":1659,"children":1660},{},[1661,1699,1747,1760,1811],{"type":44,"tag":232,"props":1662,"children":1663},{},[1664,1669],{"type":44,"tag":259,"props":1665,"children":1666},{},[1667],{"type":49,"value":1668},"RFC",{"type":44,"tag":259,"props":1670,"children":1671},{},[1672,1678,1679,1684,1685,1690,1691,1697],{"type":44,"tag":58,"props":1673,"children":1675},{"className":1674},[],[1676],{"type":49,"value":1677},"RFC XXXX",{"type":49,"value":460},{"type":44,"tag":58,"props":1680,"children":1682},{"className":1681},[],[1683],{"type":49,"value":554},{"type":49,"value":556},{"type":44,"tag":58,"props":1686,"children":1688},{"className":1687},[],[1689],{"type":49,"value":562},{"type":49,"value":556},{"type":44,"tag":58,"props":1692,"children":1694},{"className":1693},[],[1695],{"type":49,"value":1696},"SHOULD",{"type":49,"value":1698},", ABNF grammars, section-numbered prose",{"type":44,"tag":232,"props":1700,"children":1701},{},[1702,1707],{"type":44,"tag":259,"props":1703,"children":1704},{},[1705],{"type":49,"value":1706},"Academic paper \u002F pseudocode",{"type":44,"tag":259,"props":1708,"children":1709},{},[1710,1716,1717,1723,1724,1730,1732,1738,1739,1745],{"type":44,"tag":58,"props":1711,"children":1713},{"className":1712},[],[1714],{"type":49,"value":1715},"Algorithm X",{"type":49,"value":460},{"type":44,"tag":58,"props":1718,"children":1720},{"className":1719},[],[1721],{"type":49,"value":1722},"Protocol X",{"type":49,"value":460},{"type":44,"tag":58,"props":1725,"children":1727},{"className":1726},[],[1728],{"type":49,"value":1729},"Figure X",{"type":49,"value":1731},", numbered steps, ",{"type":44,"tag":58,"props":1733,"children":1735},{"className":1734},[],[1736],{"type":49,"value":1737},"←",{"type":49,"value":556},{"type":44,"tag":58,"props":1740,"children":1742},{"className":1741},[],[1743],{"type":49,"value":1744},"→",{"type":49,"value":1746}," in math mode",{"type":44,"tag":232,"props":1748,"children":1749},{},[1750,1755],{"type":44,"tag":259,"props":1751,"children":1752},{},[1753],{"type":49,"value":1754},"Informal prose",{"type":44,"tag":259,"props":1756,"children":1757},{},[1758],{"type":49,"value":1759},"Numbered lists, \"A sends B ...\", plain English descriptions",{"type":44,"tag":232,"props":1761,"children":1762},{},[1763,1774],{"type":44,"tag":259,"props":1764,"children":1765},{},[1766,1768,1773],{"type":49,"value":1767},"ProVerif (",{"type":44,"tag":58,"props":1769,"children":1771},{"className":1770},[],[1772],{"type":49,"value":97},{"type":49,"value":503},{"type":44,"tag":259,"props":1775,"children":1776},{},[1777,1782,1783,1788,1789,1795,1796,1802,1803,1809],{"type":44,"tag":58,"props":1778,"children":1780},{"className":1779},[],[1781],{"type":49,"value":628},{"type":49,"value":460},{"type":44,"tag":58,"props":1784,"children":1786},{"className":1785},[],[1787],{"type":49,"value":635},{"type":49,"value":460},{"type":44,"tag":58,"props":1790,"children":1792},{"className":1791},[],[1793],{"type":49,"value":1794},"in(ch, x)",{"type":49,"value":460},{"type":44,"tag":58,"props":1797,"children":1799},{"className":1798},[],[1800],{"type":49,"value":1801},"out(ch, msg)",{"type":49,"value":460},{"type":44,"tag":58,"props":1804,"children":1806},{"className":1805},[],[1807],{"type":49,"value":1808},"!",{"type":49,"value":1810}," (replication)",{"type":44,"tag":232,"props":1812,"children":1813},{},[1814,1825],{"type":44,"tag":259,"props":1815,"children":1816},{},[1817,1819,1824],{"type":49,"value":1818},"Tamarin (",{"type":44,"tag":58,"props":1820,"children":1822},{"className":1821},[],[1823],{"type":49,"value":105},{"type":49,"value":503},{"type":44,"tag":259,"props":1826,"children":1827},{},[1828,1833,1834,1840,1841,1847,1848,1854,1855,1861,1862],{"type":44,"tag":58,"props":1829,"children":1831},{"className":1830},[],[1832],{"type":49,"value":676},{"type":49,"value":460},{"type":44,"tag":58,"props":1835,"children":1837},{"className":1836},[],[1838],{"type":49,"value":1839},"--[ ]->",{"type":49,"value":460},{"type":44,"tag":58,"props":1842,"children":1844},{"className":1843},[],[1845],{"type":49,"value":1846},"Fr(~x)",{"type":49,"value":460},{"type":44,"tag":58,"props":1849,"children":1851},{"className":1850},[],[1852],{"type":49,"value":1853},"!Pk(A, pk)",{"type":49,"value":460},{"type":44,"tag":58,"props":1856,"children":1858},{"className":1857},[],[1859],{"type":49,"value":1860},"In(m)",{"type":49,"value":460},{"type":44,"tag":58,"props":1863,"children":1865},{"className":1864},[],[1866],{"type":49,"value":1867},"Out(m)",{"type":44,"tag":52,"props":1869,"children":1870},{},[1871,1873,1878],{"type":49,"value":1872},"If the spec references a known named protocol (TLS, Noise, Signal, X3DH, Double\nRatchet, FROST), also read\n",{"type":44,"tag":1632,"props":1874,"children":1876},{"href":1875},"references\u002Fprotocol-patterns.md",[1877],{"type":49,"value":1875},{"type":49,"value":1879}," to use its\ncanonical flow as a skeleton and fill in spec-specific details.",{"type":44,"tag":412,"props":1881,"children":1883},{"id":1882},"step-s2-extract-parties-and-roles",[1884],{"type":49,"value":1885},"Step S2: Extract Parties and Roles",{"type":44,"tag":52,"props":1887,"children":1888},{},[1889],{"type":49,"value":1890},"Identify all protocol participants. Look for:",{"type":44,"tag":67,"props":1892,"children":1893},{},[1894,1979,1989,2013],{"type":44,"tag":71,"props":1895,"children":1896},{},[1897,1902,1904,1910,1911,1917,1918,1923,1924,1929,1930,1935,1936,1941,1942,1947,1948,1953,1954,1959,1960,1966,1967,1972,1973],{"type":44,"tag":75,"props":1898,"children":1899},{},[1900],{"type":49,"value":1901},"Named roles",{"type":49,"value":1903}," in prose or pseudocode: ",{"type":44,"tag":58,"props":1905,"children":1907},{"className":1906},[],[1908],{"type":49,"value":1909},"Alice",{"type":49,"value":460},{"type":44,"tag":58,"props":1912,"children":1914},{"className":1913},[],[1915],{"type":49,"value":1916},"Bob",{"type":49,"value":460},{"type":44,"tag":58,"props":1919,"children":1921},{"className":1920},[],[1922],{"type":49,"value":969},{"type":49,"value":460},{"type":44,"tag":58,"props":1925,"children":1927},{"className":1926},[],[1928],{"type":49,"value":976},{"type":49,"value":999},{"type":44,"tag":58,"props":1931,"children":1933},{"className":1932},[],[1934],{"type":49,"value":983},{"type":49,"value":460},{"type":44,"tag":58,"props":1937,"children":1939},{"className":1938},[],[1940],{"type":49,"value":990},{"type":49,"value":460},{"type":44,"tag":58,"props":1943,"children":1945},{"className":1944},[],[1946],{"type":49,"value":997},{"type":49,"value":460},{"type":44,"tag":58,"props":1949,"children":1951},{"className":1950},[],[1952],{"type":49,"value":1005},{"type":49,"value":460},{"type":44,"tag":58,"props":1955,"children":1957},{"className":1956},[],[1958],{"type":49,"value":1012},{"type":49,"value":460},{"type":44,"tag":58,"props":1961,"children":1963},{"className":1962},[],[1964],{"type":49,"value":1965},"Party_i",{"type":49,"value":999},{"type":44,"tag":58,"props":1968,"children":1970},{"className":1969},[],[1971],{"type":49,"value":1026},{"type":49,"value":460},{"type":44,"tag":58,"props":1974,"children":1976},{"className":1975},[],[1977],{"type":49,"value":1978},"Signer",{"type":44,"tag":71,"props":1980,"children":1981},{},[1982,1987],{"type":44,"tag":75,"props":1983,"children":1984},{},[1985],{"type":49,"value":1986},"Section headers",{"type":49,"value":1988},": \"Parties\", \"Roles\", \"Participants\", \"Setup\", \"Notation\"",{"type":44,"tag":71,"props":1990,"children":1991},{},[1992,1997,1999,2005,2006,2012],{"type":44,"tag":75,"props":1993,"children":1994},{},[1995],{"type":49,"value":1996},"ProVerif",{"type":49,"value":1998},": process names at top level (",{"type":44,"tag":58,"props":2000,"children":2002},{"className":2001},[],[2003],{"type":49,"value":2004},"let ClientProc(...)",{"type":49,"value":460},{"type":44,"tag":58,"props":2007,"children":2009},{"className":2008},[],[2010],{"type":49,"value":2011},"let ServerProc(...)",{"type":49,"value":503},{"type":44,"tag":71,"props":2014,"children":2015},{},[2016,2021,2023,2029,2031,2037],{"type":44,"tag":75,"props":2017,"children":2018},{},[2019],{"type":49,"value":2020},"Tamarin",{"type":49,"value":2022},": rule names and fact arguments (e.g. ",{"type":44,"tag":58,"props":2024,"children":2026},{"className":2025},[],[2027],{"type":49,"value":2028},"!Pk($A, pk)",{"type":49,"value":2030}," — ",{"type":44,"tag":58,"props":2032,"children":2034},{"className":2033},[],[2035],{"type":49,"value":2036},"$A",{"type":49,"value":2038}," is a party)",{"type":44,"tag":52,"props":2040,"children":2041},{},[2042,2044,2049,2051,2056],{"type":49,"value":2043},"Map each role to a Mermaid ",{"type":44,"tag":58,"props":2045,"children":2047},{"className":2046},[],[2048],{"type":49,"value":1052},{"type":49,"value":2050}," declaration. Use short IDs with\ndescriptive aliases (see naming conventions in\n",{"type":44,"tag":1632,"props":2052,"children":2054},{"href":2053},"references\u002Fmermaid-sequence-syntax.md",[2055],{"type":49,"value":2053},{"type":49,"value":2057},").",{"type":44,"tag":412,"props":2059,"children":2061},{"id":2060},"step-s3-extract-message-flow",[2062],{"type":49,"value":2063},"Step S3: Extract Message Flow",{"type":44,"tag":52,"props":2065,"children":2066},{},[2067],{"type":49,"value":2068},"Trace what each party sends to whom and in what order. Extraction patterns by format:",{"type":44,"tag":52,"props":2070,"children":2071},{},[2072],{"type":44,"tag":75,"props":2073,"children":2074},{},[2075],{"type":49,"value":2076},"RFC \u002F informal prose:",{"type":44,"tag":67,"props":2078,"children":2079},{},[2080,2098,2103],{"type":44,"tag":71,"props":2081,"children":2082},{},[2083,2085,2091,2092],{"type":49,"value":2084},"Arrow notation: ",{"type":44,"tag":58,"props":2086,"children":2088},{"className":2087},[],[2089],{"type":49,"value":2090},"A → B: msg",{"type":49,"value":460},{"type":44,"tag":58,"props":2093,"children":2095},{"className":2094},[],[2096],{"type":49,"value":2097},"A -> B",{"type":44,"tag":71,"props":2099,"children":2100},{},[2101],{"type":49,"value":2102},"Sentence patterns: \"A sends B ...\", \"B responds with ...\", \"A transmits ...\",\n\"upon receiving X, B sends Y\"",{"type":44,"tag":71,"props":2104,"children":2105},{},[2106],{"type":49,"value":2107},"Numbered steps: extract in order, inferring sender\u002Freceiver from context",{"type":44,"tag":52,"props":2109,"children":2110},{},[2111],{"type":44,"tag":75,"props":2112,"children":2113},{},[2114],{"type":49,"value":2115},"Pseudocode:",{"type":44,"tag":67,"props":2117,"children":2118},{},[2119,2139,2157],{"type":44,"tag":71,"props":2120,"children":2121},{},[2122,2124,2130,2131,2137],{"type":49,"value":2123},"Function signatures with explicit ",{"type":44,"tag":58,"props":2125,"children":2127},{"className":2126},[],[2128],{"type":49,"value":2129},"sender",{"type":49,"value":556},{"type":44,"tag":58,"props":2132,"children":2134},{"className":2133},[],[2135],{"type":49,"value":2136},"receiver",{"type":49,"value":2138}," parameters",{"type":44,"tag":71,"props":2140,"children":2141},{},[2142,2148,2149,2155],{"type":44,"tag":58,"props":2143,"children":2145},{"className":2144},[],[2146],{"type":49,"value":2147},"send(party, msg)",{"type":49,"value":1110},{"type":44,"tag":58,"props":2150,"children":2152},{"className":2151},[],[2153],{"type":49,"value":2154},"receive(party)",{"type":49,"value":2156}," calls",{"type":44,"tag":71,"props":2158,"children":2159},{},[2160],{"type":49,"value":2161},"Return values passed as inputs to the other party's function in the next step",{"type":44,"tag":52,"props":2163,"children":2164},{},[2165],{"type":44,"tag":75,"props":2166,"children":2167},{},[2168,2169,2174],{"type":49,"value":1767},{"type":44,"tag":58,"props":2170,"children":2172},{"className":2171},[],[2173],{"type":49,"value":97},{"type":49,"value":2175},"):",{"type":44,"tag":67,"props":2177,"children":2178},{},[2179,2195,2218,2236],{"type":44,"tag":71,"props":2180,"children":2181},{},[2182,2187,2189],{"type":44,"tag":58,"props":2183,"children":2185},{"className":2184},[],[2186],{"type":49,"value":1801},{"type":49,"value":2188}," — send on channel ",{"type":44,"tag":58,"props":2190,"children":2192},{"className":2191},[],[2193],{"type":49,"value":2194},"ch",{"type":44,"tag":71,"props":2196,"children":2197},{},[2198,2203,2205,2210,2212],{"type":44,"tag":58,"props":2199,"children":2201},{"className":2200},[],[2202],{"type":49,"value":1794},{"type":49,"value":2204}," — receive on channel ",{"type":44,"tag":58,"props":2206,"children":2208},{"className":2207},[],[2209],{"type":49,"value":2194},{"type":49,"value":2211},", bind to ",{"type":44,"tag":58,"props":2213,"children":2215},{"className":2214},[],[2216],{"type":49,"value":2217},"x",{"type":44,"tag":71,"props":2219,"children":2220},{},[2221,2223,2228,2229,2234],{"type":49,"value":2222},"Match ",{"type":44,"tag":58,"props":2224,"children":2226},{"className":2225},[],[2227],{"type":49,"value":649},{"type":49,"value":556},{"type":44,"tag":58,"props":2230,"children":2232},{"className":2231},[],[2233],{"type":49,"value":642},{"type":49,"value":2235}," pairs on the same channel to identify message flows",{"type":44,"tag":71,"props":2237,"children":2238},{},[2239,2244],{"type":44,"tag":58,"props":2240,"children":2242},{"className":2241},[],[2243],{"type":49,"value":1808},{"type":49,"value":2245}," (replication) signals a role that handles multiple sessions",{"type":44,"tag":52,"props":2247,"children":2248},{},[2249],{"type":44,"tag":75,"props":2250,"children":2251},{},[2252,2253,2258],{"type":49,"value":1818},{"type":44,"tag":58,"props":2254,"children":2256},{"className":2255},[],[2257],{"type":49,"value":105},{"type":49,"value":2175},{"type":44,"tag":67,"props":2260,"children":2261},{},[2262,2278,2293,2298,2308],{"type":44,"tag":71,"props":2263,"children":2264},{},[2265,2270,2272],{"type":44,"tag":58,"props":2266,"children":2268},{"className":2267},[],[2269],{"type":49,"value":1860},{"type":49,"value":2271}," premise — receive message ",{"type":44,"tag":58,"props":2273,"children":2275},{"className":2274},[],[2276],{"type":49,"value":2277},"m",{"type":44,"tag":71,"props":2279,"children":2280},{},[2281,2286,2288],{"type":44,"tag":58,"props":2282,"children":2284},{"className":2283},[],[2285],{"type":49,"value":1867},{"type":49,"value":2287}," conclusion — send message ",{"type":44,"tag":58,"props":2289,"children":2291},{"className":2290},[],[2292],{"type":49,"value":2277},{"type":44,"tag":71,"props":2294,"children":2295},{},[2296],{"type":49,"value":2297},"Rule name and ordering of rules reveal protocol rounds",{"type":44,"tag":71,"props":2299,"children":2300},{},[2301,2306],{"type":44,"tag":58,"props":2302,"children":2304},{"className":2303},[],[2305],{"type":49,"value":1846},{"type":49,"value":2307}," — fresh random value generated by a party",{"type":44,"tag":71,"props":2309,"children":2310},{},[2311,2317],{"type":44,"tag":58,"props":2312,"children":2314},{"className":2313},[],[2315],{"type":49,"value":2316},"--[ Label ]->",{"type":49,"value":2318}," facts — security annotations, not messages",{"type":44,"tag":52,"props":2320,"children":2321},{},[2322,2324,2330],{"type":49,"value":2323},"Preserve the ordering and round structure. Group concurrent sends (broadcast)\nusing ",{"type":44,"tag":58,"props":2325,"children":2327},{"className":2326},[],[2328],{"type":49,"value":2329},"par",{"type":49,"value":2331}," blocks in the final diagram.",{"type":44,"tag":412,"props":2333,"children":2335},{"id":2334},"step-s4-extract-cryptographic-operations",[2336],{"type":49,"value":2337},"Step S4: Extract Cryptographic Operations",{"type":44,"tag":52,"props":2339,"children":2340},{},[2341],{"type":49,"value":2342},"For each protocol step, identify the cryptographic operations performed and which\nparty performs them:",{"type":44,"tag":224,"props":2344,"children":2345},{},[2346,2365],{"type":44,"tag":228,"props":2347,"children":2348},{},[2349],{"type":44,"tag":232,"props":2350,"children":2351},{},[2352,2357,2361],{"type":44,"tag":236,"props":2353,"children":2354},{},[2355],{"type":49,"value":2356},"Spec notation",{"type":44,"tag":236,"props":2358,"children":2359},{},[2360],{"type":49,"value":1260},{"type":44,"tag":236,"props":2362,"children":2363},{},[2364],{"type":49,"value":1265},{"type":44,"tag":252,"props":2366,"children":2367},{},[2368,2400,2431,2464,2495,2519,2551,2576,2607,2638,2666,2693],{"type":44,"tag":232,"props":2369,"children":2370},{},[2371,2387,2391],{"type":44,"tag":259,"props":2372,"children":2373},{},[2374,2380,2381],{"type":44,"tag":58,"props":2375,"children":2377},{"className":2376},[],[2378],{"type":49,"value":2379},"keygen()",{"type":49,"value":460},{"type":44,"tag":58,"props":2382,"children":2384},{"className":2383},[],[2385],{"type":49,"value":2386},"Gen(1^λ)",{"type":44,"tag":259,"props":2388,"children":2389},{},[2390],{"type":49,"value":1276},{"type":44,"tag":259,"props":2392,"children":2393},{},[2394],{"type":44,"tag":58,"props":2395,"children":2397},{"className":2396},[],[2398],{"type":49,"value":2399},"Note over A: keygen() → pk, sk",{"type":44,"tag":232,"props":2401,"children":2402},{},[2403,2419,2423],{"type":44,"tag":259,"props":2404,"children":2405},{},[2406,2412,2413],{"type":44,"tag":58,"props":2407,"children":2409},{"className":2408},[],[2410],{"type":49,"value":2411},"DH(a, B)",{"type":49,"value":460},{"type":44,"tag":58,"props":2414,"children":2416},{"className":2415},[],[2417],{"type":49,"value":2418},"g^ab",{"type":44,"tag":259,"props":2420,"children":2421},{},[2422],{"type":49,"value":1293},{"type":44,"tag":259,"props":2424,"children":2425},{},[2426],{"type":44,"tag":58,"props":2427,"children":2429},{"className":2428},[],[2430],{"type":49,"value":1302},{"type":44,"tag":232,"props":2432,"children":2433},{},[2434,2450,2455],{"type":44,"tag":259,"props":2435,"children":2436},{},[2437,2443,2444],{"type":44,"tag":58,"props":2438,"children":2440},{"className":2439},[],[2441],{"type":49,"value":2442},"KDF(ikm)",{"type":49,"value":460},{"type":44,"tag":58,"props":2445,"children":2447},{"className":2446},[],[2448],{"type":49,"value":2449},"HKDF(...)",{"type":44,"tag":259,"props":2451,"children":2452},{},[2453],{"type":49,"value":2454},"Key derivation",{"type":44,"tag":259,"props":2456,"children":2457},{},[2458],{"type":44,"tag":58,"props":2459,"children":2461},{"className":2460},[],[2462],{"type":49,"value":2463},"Note over A: HKDF(ikm, salt, info) → k",{"type":44,"tag":232,"props":2465,"children":2466},{},[2467,2483,2487],{"type":44,"tag":259,"props":2468,"children":2469},{},[2470,2476,2477],{"type":44,"tag":58,"props":2471,"children":2473},{"className":2472},[],[2474],{"type":49,"value":2475},"Sign(sk, m)",{"type":49,"value":460},{"type":44,"tag":58,"props":2478,"children":2480},{"className":2479},[],[2481],{"type":49,"value":2482},"σ ← Sign",{"type":44,"tag":259,"props":2484,"children":2485},{},[2486],{"type":49,"value":1327},{"type":44,"tag":259,"props":2488,"children":2489},{},[2490],{"type":44,"tag":58,"props":2491,"children":2493},{"className":2492},[],[2494],{"type":49,"value":1336},{"type":44,"tag":232,"props":2496,"children":2497},{},[2498,2507,2511],{"type":44,"tag":259,"props":2499,"children":2500},{},[2501],{"type":44,"tag":58,"props":2502,"children":2504},{"className":2503},[],[2505],{"type":49,"value":2506},"Verify(pk, m, σ)",{"type":44,"tag":259,"props":2508,"children":2509},{},[2510],{"type":49,"value":1344},{"type":44,"tag":259,"props":2512,"children":2513},{},[2514],{"type":44,"tag":58,"props":2515,"children":2517},{"className":2516},[],[2518],{"type":49,"value":1353},{"type":44,"tag":232,"props":2520,"children":2521},{},[2522,2538,2542],{"type":44,"tag":259,"props":2523,"children":2524},{},[2525,2531,2532],{"type":44,"tag":58,"props":2526,"children":2528},{"className":2527},[],[2529],{"type":49,"value":2530},"Enc(k, m)",{"type":49,"value":460},{"type":44,"tag":58,"props":2533,"children":2535},{"className":2534},[],[2536],{"type":49,"value":2537},"{m}_k",{"type":44,"tag":259,"props":2539,"children":2540},{},[2541],{"type":49,"value":1361},{"type":44,"tag":259,"props":2543,"children":2544},{},[2545],{"type":44,"tag":58,"props":2546,"children":2548},{"className":2547},[],[2549],{"type":49,"value":2550},"Note over A: Enc(k, plaintext) → ct",{"type":44,"tag":232,"props":2552,"children":2553},{},[2554,2563,2567],{"type":44,"tag":259,"props":2555,"children":2556},{},[2557],{"type":44,"tag":58,"props":2558,"children":2560},{"className":2559},[],[2561],{"type":49,"value":2562},"Dec(k, c)",{"type":44,"tag":259,"props":2564,"children":2565},{},[2566],{"type":49,"value":1378},{"type":44,"tag":259,"props":2568,"children":2569},{},[2570],{"type":44,"tag":58,"props":2571,"children":2573},{"className":2572},[],[2574],{"type":49,"value":2575},"Note over B: Dec(k, ct) → plaintext",{"type":44,"tag":232,"props":2577,"children":2578},{},[2579,2595,2599],{"type":44,"tag":259,"props":2580,"children":2581},{},[2582,2588,2589],{"type":44,"tag":58,"props":2583,"children":2585},{"className":2584},[],[2586],{"type":49,"value":2587},"H(m)",{"type":49,"value":460},{"type":44,"tag":58,"props":2590,"children":2592},{"className":2591},[],[2593],{"type":49,"value":2594},"hash(m)",{"type":44,"tag":259,"props":2596,"children":2597},{},[2598],{"type":49,"value":1412},{"type":44,"tag":259,"props":2600,"children":2601},{},[2602],{"type":44,"tag":58,"props":2603,"children":2605},{"className":2604},[],[2606],{"type":49,"value":1421},{"type":44,"tag":232,"props":2608,"children":2609},{},[2610,2626,2630],{"type":44,"tag":259,"props":2611,"children":2612},{},[2613,2619,2620],{"type":44,"tag":58,"props":2614,"children":2616},{"className":2615},[],[2617],{"type":49,"value":2618},"Commit(v, r)",{"type":49,"value":460},{"type":44,"tag":58,"props":2621,"children":2623},{"className":2622},[],[2624],{"type":49,"value":2625},"com",{"type":44,"tag":259,"props":2627,"children":2628},{},[2629],{"type":49,"value":1395},{"type":44,"tag":259,"props":2631,"children":2632},{},[2633],{"type":44,"tag":58,"props":2634,"children":2636},{"className":2635},[],[2637],{"type":49,"value":1404},{"type":44,"tag":232,"props":2639,"children":2640},{},[2641,2652,2657],{"type":44,"tag":259,"props":2642,"children":2643},{},[2644,2646],{"type":49,"value":2645},"ProVerif ",{"type":44,"tag":58,"props":2647,"children":2649},{"className":2648},[],[2650],{"type":49,"value":2651},"senc(m, k)",{"type":44,"tag":259,"props":2653,"children":2654},{},[2655],{"type":49,"value":2656},"Symmetric encryption",{"type":44,"tag":259,"props":2658,"children":2659},{},[2660],{"type":44,"tag":58,"props":2661,"children":2663},{"className":2662},[],[2664],{"type":49,"value":2665},"Note over A: Enc(k, m) → ct",{"type":44,"tag":232,"props":2667,"children":2668},{},[2669,2679,2684],{"type":44,"tag":259,"props":2670,"children":2671},{},[2672,2673],{"type":49,"value":2645},{"type":44,"tag":58,"props":2674,"children":2676},{"className":2675},[],[2677],{"type":49,"value":2678},"pk(sk)",{"type":44,"tag":259,"props":2680,"children":2681},{},[2682],{"type":49,"value":2683},"Public key derivation",{"type":44,"tag":259,"props":2685,"children":2686},{},[2687],{"type":44,"tag":58,"props":2688,"children":2690},{"className":2689},[],[2691],{"type":49,"value":2692},"Note over A: pk = pk(sk)",{"type":44,"tag":232,"props":2694,"children":2695},{},[2696,2706,2710],{"type":44,"tag":259,"props":2697,"children":2698},{},[2699,2700],{"type":49,"value":2645},{"type":44,"tag":58,"props":2701,"children":2703},{"className":2702},[],[2704],{"type":49,"value":2705},"sign(m, sk)",{"type":44,"tag":259,"props":2707,"children":2708},{},[2709],{"type":49,"value":1327},{"type":44,"tag":259,"props":2711,"children":2712},{},[2713],{"type":44,"tag":58,"props":2714,"children":2716},{"className":2715},[],[2717],{"type":49,"value":2718},"Note over A: Sign(sk, m) → σ",{"type":44,"tag":52,"props":2720,"children":2721},{},[2722],{"type":49,"value":2723},"Identify security conditions and abort paths:",{"type":44,"tag":67,"props":2725,"children":2726},{},[2727,2732,2757,2768],{"type":44,"tag":71,"props":2728,"children":2729},{},[2730],{"type":49,"value":2731},"Prose: \"if verification fails, abort\", \"only if ...\", \"reject if ...\"",{"type":44,"tag":71,"props":2733,"children":2734},{},[2735,2737,2743,2744,2750,2751],{"type":49,"value":2736},"Pseudocode: ",{"type":44,"tag":58,"props":2738,"children":2740},{"className":2739},[],[2741],{"type":49,"value":2742},"assert",{"type":49,"value":460},{"type":44,"tag":58,"props":2745,"children":2747},{"className":2746},[],[2748],{"type":49,"value":2749},"require",{"type":49,"value":460},{"type":44,"tag":58,"props":2752,"children":2754},{"className":2753},[],[2755],{"type":49,"value":2756},"if ... abort",{"type":44,"tag":71,"props":2758,"children":2759},{},[2760,2762],{"type":49,"value":2761},"ProVerif: ",{"type":44,"tag":58,"props":2763,"children":2765},{"className":2764},[],[2766],{"type":49,"value":2767},"if m = expected then ... else 0",{"type":44,"tag":71,"props":2769,"children":2770},{},[2771],{"type":49,"value":2772},"Tamarin: contradicting facts or restriction lemmas",{"type":44,"tag":52,"props":2774,"children":2775},{},[2776,2778,2783],{"type":49,"value":2777},"These become ",{"type":44,"tag":58,"props":2779,"children":2781},{"className":2780},[],[2782],{"type":49,"value":333},{"type":49,"value":2331},{"type":44,"tag":412,"props":2785,"children":2787},{"id":2786},"step-s5-flag-spec-ambiguities",[2788],{"type":49,"value":2789},"Step S5: Flag Spec Ambiguities",{"type":44,"tag":52,"props":2791,"children":2792},{},[2793],{"type":49,"value":2794},"Before moving to Step 6, check for gaps:",{"type":44,"tag":67,"props":2796,"children":2797},{},[2798,2814,2824,2840,2856],{"type":44,"tag":71,"props":2799,"children":2800},{},[2801,2806,2808],{"type":44,"tag":75,"props":2802,"children":2803},{},[2804],{"type":49,"value":2805},"Unclear message ordering",{"type":49,"value":2807},": infer from round structure or section order;\nannotate with ",{"type":44,"tag":58,"props":2809,"children":2811},{"className":2810},[],[2812],{"type":49,"value":2813},"⚠️ ordering inferred from spec structure",{"type":44,"tag":71,"props":2815,"children":2816},{},[2817,2822],{"type":44,"tag":75,"props":2818,"children":2819},{},[2820],{"type":49,"value":2821},"Implied parties",{"type":49,"value":2823},": if a party's role is implied but unnamed, give it a\ndescriptive name and note the inference",{"type":44,"tag":71,"props":2825,"children":2826},{},[2827,2832,2834],{"type":44,"tag":75,"props":2828,"children":2829},{},[2830],{"type":49,"value":2831},"Missing steps",{"type":49,"value":2833},": if the spec omits a step that the canonical pattern for\nthis protocol requires, annotate:\n",{"type":44,"tag":58,"props":2835,"children":2837},{"className":2836},[],[2838],{"type":49,"value":2839},"⚠️ spec omits [step] — canonical protocol requires it",{"type":44,"tag":71,"props":2841,"children":2842},{},[2843,2848,2850],{"type":44,"tag":75,"props":2844,"children":2845},{},[2846],{"type":49,"value":2847},"Underspecified crypto",{"type":49,"value":2849},": if the spec says \"encrypt\" without specifying\nthe scheme, annotate: ",{"type":44,"tag":58,"props":2851,"children":2853},{"className":2852},[],[2854],{"type":49,"value":2855},"⚠️ encryption scheme not specified",{"type":44,"tag":71,"props":2857,"children":2858},{},[2859,2864,2866,2872,2874,2880],{"type":44,"tag":75,"props":2860,"children":2861},{},[2862],{"type":49,"value":2863},"ProVerif\u002FTamarin",{"type":49,"value":2865},": private channels (",{"type":44,"tag":58,"props":2867,"children":2869},{"className":2868},[],[2870],{"type":49,"value":2871},"c",{"type":49,"value":2873}," declared with ",{"type":44,"tag":58,"props":2875,"children":2877},{"className":2876},[],[2878],{"type":49,"value":2879},"new c",{"type":49,"value":2881}," or as a\nprivate free name) represent out-of-band channels — note them",{"type":44,"tag":387,"props":2883,"children":2884},{},[],{"type":44,"tag":412,"props":2886,"children":2888},{"id":2887},"step-6-generate-sequencediagram",[2889],{"type":49,"value":2890},"Step 6: Generate sequenceDiagram",{"type":44,"tag":52,"props":2892,"children":2893},{},[2894,2896,2900],{"type":49,"value":2895},"Produce Mermaid syntax following the rules in\n",{"type":44,"tag":1632,"props":2897,"children":2898},{"href":2053},[2899],{"type":49,"value":2053},{"type":49,"value":2901},".",{"type":44,"tag":52,"props":2903,"children":2904},{},[2905,2910,2912,2918],{"type":44,"tag":75,"props":2906,"children":2907},{},[2908],{"type":49,"value":2909},"Completeness over brevity.",{"type":49,"value":2911}," Show every distinct message type. Omit repeated\nloop iterations (use ",{"type":44,"tag":58,"props":2913,"children":2915},{"className":2914},[],[2916],{"type":49,"value":2917},"loop",{"type":49,"value":2919}," blocks instead), but never omit a distinct protocol\nstep.",{"type":44,"tag":52,"props":2921,"children":2922},{},[2923,2928],{"type":44,"tag":75,"props":2924,"children":2925},{},[2926],{"type":49,"value":2927},"Correctness over aesthetics.",{"type":49,"value":2929}," The diagram must match what the code actually\ndoes. If the code diverges from a known spec, annotate the divergence:",{"type":44,"tag":397,"props":2931,"children":2934},{"className":2932,"code":2933,"language":49},[400],"Note over A,B: ⚠️ spec requires MAC here — implementation omits it\n",[2935],{"type":44,"tag":58,"props":2936,"children":2937},{"__ignoreMap":405},[2938],{"type":49,"value":2933},{"type":44,"tag":412,"props":2940,"children":2942},{"id":2941},"step-7-verify-and-deliver",[2943],{"type":49,"value":2944},"Step 7: Verify and Deliver",{"type":44,"tag":52,"props":2946,"children":2947},{},[2948],{"type":49,"value":2949},"Before delivering:",{"type":44,"tag":67,"props":2951,"children":2954},{"className":2952},[2953],"contains-task-list",[2955,2967,2976,2985,2994,3010,3025],{"type":44,"tag":71,"props":2956,"children":2959},{"className":2957},[2958],"task-list-item",[2960,2965],{"type":44,"tag":2961,"props":2962,"children":2964},"input",{"disabled":856,"type":2963},"checkbox",[],{"type":49,"value":2966}," Every participant declared actually sends or receives at least one message",{"type":44,"tag":71,"props":2968,"children":2970},{"className":2969},[2958],[2971,2974],{"type":44,"tag":2961,"props":2972,"children":2973},{"disabled":856,"type":2963},[],{"type":49,"value":2975}," Arrows point in the correct direction (sender → receiver)",{"type":44,"tag":71,"props":2977,"children":2979},{"className":2978},[2958],[2980,2983],{"type":44,"tag":2961,"props":2981,"children":2982},{"disabled":856,"type":2963},[],{"type":49,"value":2984}," Cryptographic operations are on the correct party (the one computing them)",{"type":44,"tag":71,"props":2986,"children":2988},{"className":2987},[2958],[2989,2992],{"type":44,"tag":2961,"props":2990,"children":2991},{"disabled":856,"type":2963},[],{"type":49,"value":2993}," If protocol phases are used, no arrows appear outside a phase block",{"type":44,"tag":71,"props":2995,"children":2997},{"className":2996},[2958],[2998,3001,3003,3008],{"type":44,"tag":2961,"props":2999,"children":3000},{"disabled":856,"type":2963},[],{"type":49,"value":3002}," ",{"type":44,"tag":58,"props":3004,"children":3006},{"className":3005},[],[3007],{"type":49,"value":333},{"type":49,"value":3009}," blocks cover known abort\u002Ferror paths",{"type":44,"tag":71,"props":3011,"children":3013},{"className":3012},[2958],[3014,3017,3019,3023],{"type":44,"tag":2961,"props":3015,"children":3016},{"disabled":856,"type":2963},[],{"type":49,"value":3018}," Diagram renders without syntax errors (check\n",{"type":44,"tag":1632,"props":3020,"children":3021},{"href":2053},[3022],{"type":49,"value":2053},{"type":49,"value":3024},"\nfor common pitfalls)",{"type":44,"tag":71,"props":3026,"children":3028},{"className":3027},[2958],[3029,3032,3034],{"type":44,"tag":2961,"props":3030,"children":3031},{"disabled":856,"type":2963},[],{"type":49,"value":3033}," If spec divergence found, annotated with ",{"type":44,"tag":58,"props":3035,"children":3037},{"className":3036},[],[3038],{"type":49,"value":729},{"type":44,"tag":52,"props":3040,"children":3041},{},[3042,3047,3049,3055,3056,3062],{"type":44,"tag":75,"props":3043,"children":3044},{},[3045],{"type":49,"value":3046},"Write the diagram to a file.",{"type":49,"value":3048}," Choose a filename derived from the protocol\nname, e.g. ",{"type":44,"tag":58,"props":3050,"children":3052},{"className":3051},[],[3053],{"type":49,"value":3054},"noise-xx-handshake.md",{"type":49,"value":1479},{"type":44,"tag":58,"props":3057,"children":3059},{"className":3058},[],[3060],{"type":49,"value":3061},"x3dh-key-agreement.md",{"type":49,"value":3063},". Write a\nMarkdown file with this structure:",{"type":44,"tag":397,"props":3065,"children":3069},{"className":3066,"code":3067,"language":3068,"meta":405,"style":405},"language-markdown shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# \u003CProtocol Name> Sequence Diagram\n\n\\`\\`\\`mermaid\nsequenceDiagram\n    ...\n\\`\\`\\`\n\n## Protocol Summary\n\n- **Parties:** ...\n- **Round complexity:** ...\n- **Key primitives:** ...\n- **Authentication:** ...\n- **Forward secrecy:** ...\n- **Notable:** [spec deviations or security observations, or \"none\"]\n","markdown",[3070],{"type":44,"tag":58,"props":3071,"children":3072},{"__ignoreMap":405},[3073,3102,3109,3117,3125,3133,3141,3149,3163,3171,3202,3227,3252,3277,3302],{"type":44,"tag":802,"props":3074,"children":3075},{"class":804,"line":805},[3076,3081,3086,3092,3097],{"type":44,"tag":802,"props":3077,"children":3078},{"style":831},[3079],{"type":49,"value":3080},"# \u003C",{"type":44,"tag":802,"props":3082,"children":3084},{"style":3083},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[3085],{"type":49,"value":591},{"type":44,"tag":802,"props":3087,"children":3089},{"style":3088},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[3090],{"type":49,"value":3091}," Name",{"type":44,"tag":802,"props":3093,"children":3094},{"style":831},[3095],{"type":49,"value":3096},">",{"type":44,"tag":802,"props":3098,"children":3099},{"style":819},[3100],{"type":49,"value":3101}," Sequence Diagram\n",{"type":44,"tag":802,"props":3103,"children":3104},{"class":804,"line":815},[3105],{"type":44,"tag":802,"props":3106,"children":3107},{"emptyLinePlaceholder":856},[3108],{"type":49,"value":859},{"type":44,"tag":802,"props":3110,"children":3111},{"class":804,"line":852},[3112],{"type":44,"tag":802,"props":3113,"children":3114},{"style":892},[3115],{"type":49,"value":3116},"\\`\\`\\`mermaid\n",{"type":44,"tag":802,"props":3118,"children":3119},{"class":804,"line":862},[3120],{"type":44,"tag":802,"props":3121,"children":3122},{"style":892},[3123],{"type":49,"value":3124},"sequenceDiagram\n",{"type":44,"tag":802,"props":3126,"children":3127},{"class":804,"line":871},[3128],{"type":44,"tag":802,"props":3129,"children":3130},{"style":892},[3131],{"type":49,"value":3132},"    ...\n",{"type":44,"tag":802,"props":3134,"children":3135},{"class":804,"line":898},[3136],{"type":44,"tag":802,"props":3137,"children":3138},{"style":892},[3139],{"type":49,"value":3140},"\\`\\`\\`\n",{"type":44,"tag":802,"props":3142,"children":3144},{"class":804,"line":3143},7,[3145],{"type":44,"tag":802,"props":3146,"children":3147},{"emptyLinePlaceholder":856},[3148],{"type":49,"value":859},{"type":44,"tag":802,"props":3150,"children":3152},{"class":804,"line":3151},8,[3153,3158],{"type":44,"tag":802,"props":3154,"children":3155},{"style":831},[3156],{"type":49,"value":3157},"## ",{"type":44,"tag":802,"props":3159,"children":3160},{"style":819},[3161],{"type":49,"value":3162},"Protocol Summary\n",{"type":44,"tag":802,"props":3164,"children":3166},{"class":804,"line":3165},9,[3167],{"type":44,"tag":802,"props":3168,"children":3169},{"emptyLinePlaceholder":856},[3170],{"type":49,"value":859},{"type":44,"tag":802,"props":3172,"children":3174},{"class":804,"line":3173},10,[3175,3180,3186,3192,3197],{"type":44,"tag":802,"props":3176,"children":3177},{"style":831},[3178],{"type":49,"value":3179},"-",{"type":44,"tag":802,"props":3181,"children":3183},{"style":3182},"--shiki-light:#39ADB5;--shiki-light-font-weight:bold;--shiki-default:#89DDFF;--shiki-default-font-weight:bold;--shiki-dark:#89DDFF;--shiki-dark-font-weight:bold",[3184],{"type":49,"value":3185}," **",{"type":44,"tag":802,"props":3187,"children":3189},{"style":3188},"--shiki-light:#E53935;--shiki-light-font-weight:bold;--shiki-default:#F07178;--shiki-default-font-weight:bold;--shiki-dark:#F07178;--shiki-dark-font-weight:bold",[3190],{"type":49,"value":3191},"Parties:",{"type":44,"tag":802,"props":3193,"children":3194},{"style":3182},[3195],{"type":49,"value":3196},"**",{"type":44,"tag":802,"props":3198,"children":3199},{"style":892},[3200],{"type":49,"value":3201}," ...\n",{"type":44,"tag":802,"props":3203,"children":3205},{"class":804,"line":3204},11,[3206,3210,3214,3219,3223],{"type":44,"tag":802,"props":3207,"children":3208},{"style":831},[3209],{"type":49,"value":3179},{"type":44,"tag":802,"props":3211,"children":3212},{"style":3182},[3213],{"type":49,"value":3185},{"type":44,"tag":802,"props":3215,"children":3216},{"style":3188},[3217],{"type":49,"value":3218},"Round complexity:",{"type":44,"tag":802,"props":3220,"children":3221},{"style":3182},[3222],{"type":49,"value":3196},{"type":44,"tag":802,"props":3224,"children":3225},{"style":892},[3226],{"type":49,"value":3201},{"type":44,"tag":802,"props":3228,"children":3230},{"class":804,"line":3229},12,[3231,3235,3239,3244,3248],{"type":44,"tag":802,"props":3232,"children":3233},{"style":831},[3234],{"type":49,"value":3179},{"type":44,"tag":802,"props":3236,"children":3237},{"style":3182},[3238],{"type":49,"value":3185},{"type":44,"tag":802,"props":3240,"children":3241},{"style":3188},[3242],{"type":49,"value":3243},"Key primitives:",{"type":44,"tag":802,"props":3245,"children":3246},{"style":3182},[3247],{"type":49,"value":3196},{"type":44,"tag":802,"props":3249,"children":3250},{"style":892},[3251],{"type":49,"value":3201},{"type":44,"tag":802,"props":3253,"children":3255},{"class":804,"line":3254},13,[3256,3260,3264,3269,3273],{"type":44,"tag":802,"props":3257,"children":3258},{"style":831},[3259],{"type":49,"value":3179},{"type":44,"tag":802,"props":3261,"children":3262},{"style":3182},[3263],{"type":49,"value":3185},{"type":44,"tag":802,"props":3265,"children":3266},{"style":3188},[3267],{"type":49,"value":3268},"Authentication:",{"type":44,"tag":802,"props":3270,"children":3271},{"style":3182},[3272],{"type":49,"value":3196},{"type":44,"tag":802,"props":3274,"children":3275},{"style":892},[3276],{"type":49,"value":3201},{"type":44,"tag":802,"props":3278,"children":3280},{"class":804,"line":3279},14,[3281,3285,3289,3294,3298],{"type":44,"tag":802,"props":3282,"children":3283},{"style":831},[3284],{"type":49,"value":3179},{"type":44,"tag":802,"props":3286,"children":3287},{"style":3182},[3288],{"type":49,"value":3185},{"type":44,"tag":802,"props":3290,"children":3291},{"style":3188},[3292],{"type":49,"value":3293},"Forward secrecy:",{"type":44,"tag":802,"props":3295,"children":3296},{"style":3182},[3297],{"type":49,"value":3196},{"type":44,"tag":802,"props":3299,"children":3300},{"style":892},[3301],{"type":49,"value":3201},{"type":44,"tag":802,"props":3303,"children":3305},{"class":804,"line":3304},15,[3306,3310,3314,3319,3323],{"type":44,"tag":802,"props":3307,"children":3308},{"style":831},[3309],{"type":49,"value":3179},{"type":44,"tag":802,"props":3311,"children":3312},{"style":3182},[3313],{"type":49,"value":3185},{"type":44,"tag":802,"props":3315,"children":3316},{"style":3188},[3317],{"type":49,"value":3318},"Notable:",{"type":44,"tag":802,"props":3320,"children":3321},{"style":3182},[3322],{"type":49,"value":3196},{"type":44,"tag":802,"props":3324,"children":3325},{"style":892},[3326],{"type":49,"value":3327}," [spec deviations or security observations, or \"none\"]\n",{"type":44,"tag":52,"props":3329,"children":3330},{},[3331,3333,3338],{"type":49,"value":3332},"After writing the file, print an ",{"type":44,"tag":75,"props":3334,"children":3335},{},[3336],{"type":49,"value":3337},"ASCII sequence diagram",{"type":49,"value":3339}," inline in the\nresponse, followed by the Protocol Summary. State the output filename so the\nuser knows where to find the Mermaid source.",{"type":44,"tag":52,"props":3341,"children":3342},{},[3343,3345,3350],{"type":49,"value":3344},"Follow all drawing conventions in\n",{"type":44,"tag":1632,"props":3346,"children":3348},{"href":3347},"references\u002Fascii-sequence-diagram.md",[3349],{"type":49,"value":3347},{"type":49,"value":3351},",\nincluding the inline output format.",{"type":44,"tag":387,"props":3353,"children":3354},{},[],{"type":44,"tag":151,"props":3356,"children":3358},{"id":3357},"decision-tree",[3359],{"type":49,"value":3360},"Decision Tree",{"type":44,"tag":397,"props":3362,"children":3365},{"className":3363,"code":3364,"language":49},[400],"── Input is a spec document (not code)?\n│  └─ Step S1: identify format, read references\u002Fspec-parsing-patterns.md\n│\n── Input is source code (not a spec)?\n│  └─ Step 1: grep for handshake\u002Fround\u002Fsend\u002Frecv entry points\n│\n── Both spec and code provided?\n│  └─ Run Spec Workflow (S1–S5) first to build canonical diagram,\n│     then read code and annotate divergences with ⚠️\n│\n── Spec is a known protocol (TLS, Noise, Signal, X3DH, FROST)?\n│  └─ Read references\u002Fprotocol-patterns.md and use canonical flow as skeleton\n│\n── Spec is ProVerif (.pv) or Tamarin (.spthy)?\n│  └─ Read references\u002Fspec-parsing-patterns.md → Formal Models section\n│\n── Spec message ordering is ambiguous?\n│  └─ Infer from round\u002Fsection structure, annotate with ⚠️\n│\n── Can't identify parties from spec?\n│  └─ Check \"Parties\"\u002F\"Notation\" sections; for ProVerif read process names;\n│     for Tamarin read rule names and fact arguments\n│\n── Don't know which code files implement the protocol?\n│  └─ Step 1: grep for handshake\u002Fround\u002Fsend\u002Frecv entry points\n│\n── Can't identify parties from struct names?\n│  └─ Read test files — test setup reveals roles\n│\n── Protocol runs in-process (no network calls)?\n│  └─ Treat function argument passing at role boundaries as messages\n│\n── MPC \u002F threshold protocol with N parties?\n│  └─ Read references\u002Fprotocol-patterns.md → MPC section\n│\n── Mermaid syntax error?\n│  └─ Read references\u002Fmermaid-sequence-syntax.md → Common Pitfalls\n│\n└─ ASCII drawing conventions?\n   └─ Read references\u002Fascii-sequence-diagram.md\n",[3366],{"type":44,"tag":58,"props":3367,"children":3368},{"__ignoreMap":405},[3369],{"type":49,"value":3364},{"type":44,"tag":387,"props":3371,"children":3372},{},[],{"type":44,"tag":151,"props":3374,"children":3376},{"id":3375},"examples",[3377],{"type":49,"value":3378},"Examples",{"type":44,"tag":52,"props":3380,"children":3381},{},[3382,3387,3388,3394],{"type":44,"tag":75,"props":3383,"children":3384},{},[3385],{"type":49,"value":3386},"Code path",{"type":49,"value":2030},{"type":44,"tag":58,"props":3389,"children":3391},{"className":3390},[],[3392],{"type":49,"value":3393},"examples\u002Fsimple-handshake\u002F",{"type":49,"value":3395},":",{"type":44,"tag":67,"props":3397,"children":3398},{},[3399,3413],{"type":44,"tag":71,"props":3400,"children":3401},{},[3402,3411],{"type":44,"tag":75,"props":3403,"children":3404},{},[3405],{"type":44,"tag":58,"props":3406,"children":3408},{"className":3407},[],[3409],{"type":49,"value":3410},"protocol.py",{"type":49,"value":3412}," — two-party authenticated key exchange (X25519 DH +\nEd25519 signing + HKDF + ChaCha20-Poly1305)",{"type":44,"tag":71,"props":3414,"children":3415},{},[3416,3425],{"type":44,"tag":75,"props":3417,"children":3418},{},[3419],{"type":44,"tag":58,"props":3420,"children":3422},{"className":3421},[],[3423],{"type":49,"value":3424},"expected-output.md",{"type":49,"value":3426}," — exact ASCII diagram and Mermaid file the skill\nshould produce for that protocol",{"type":44,"tag":52,"props":3428,"children":3429},{},[3430,3435,3436,3442],{"type":44,"tag":75,"props":3431,"children":3432},{},[3433],{"type":49,"value":3434},"Spec path (ProVerif)",{"type":49,"value":2030},{"type":44,"tag":58,"props":3437,"children":3439},{"className":3438},[],[3440],{"type":49,"value":3441},"examples\u002Fsimple-proverif\u002F",{"type":49,"value":3395},{"type":44,"tag":67,"props":3444,"children":3445},{},[3446,3460],{"type":44,"tag":71,"props":3447,"children":3448},{},[3449,3458],{"type":44,"tag":75,"props":3450,"children":3451},{},[3452],{"type":44,"tag":58,"props":3453,"children":3455},{"className":3454},[],[3456],{"type":49,"value":3457},"model.pv",{"type":49,"value":3459}," — HMAC challenge-response authentication modeled in ProVerif",{"type":44,"tag":71,"props":3461,"children":3462},{},[3463,3471],{"type":44,"tag":75,"props":3464,"children":3465},{},[3466],{"type":44,"tag":58,"props":3467,"children":3469},{"className":3468},[],[3470],{"type":49,"value":3424},{"type":49,"value":3472}," — step-by-step extraction walkthrough (parties,\nmessage flow, crypto ops) and the exact ASCII diagram and Mermaid file the\nskill should produce",{"type":44,"tag":52,"props":3474,"children":3475},{},[3476],{"type":49,"value":3477},"Study the relevant example before working on an unfamiliar input.",{"type":44,"tag":387,"props":3479,"children":3480},{},[],{"type":44,"tag":151,"props":3482,"children":3484},{"id":3483},"supporting-documentation",[3485],{"type":49,"value":3486},"Supporting Documentation",{"type":44,"tag":67,"props":3488,"children":3489},{},[3490,3502,3514,3526],{"type":44,"tag":71,"props":3491,"children":3492},{},[3493,3500],{"type":44,"tag":75,"props":3494,"children":3495},{},[3496],{"type":44,"tag":1632,"props":3497,"children":3498},{"href":1634},[3499],{"type":49,"value":1634},{"type":49,"value":3501}," —\nExtraction rules for RFC, academic paper\u002Fpseudocode, informal prose, ProVerif,\nand Tamarin input formats; read during Step S1",{"type":44,"tag":71,"props":3503,"children":3504},{},[3505,3512],{"type":44,"tag":75,"props":3506,"children":3507},{},[3508],{"type":44,"tag":1632,"props":3509,"children":3510},{"href":2053},[3511],{"type":49,"value":2053},{"type":49,"value":3513}," —\nParticipant syntax, arrow types, activations, grouping blocks, escaping rules,\nand common rendering pitfalls",{"type":44,"tag":71,"props":3515,"children":3516},{},[3517,3524],{"type":44,"tag":75,"props":3518,"children":3519},{},[3520],{"type":44,"tag":1632,"props":3521,"children":3522},{"href":1875},[3523],{"type":49,"value":1875},{"type":49,"value":3525}," —\nCanonical message flows for TLS 1.3, Noise, X3DH, Double Ratchet, Shamir\nsecret sharing, commit-reveal, and generic MPC rounds; use as a reference\nwhen comparing implementation against spec",{"type":44,"tag":71,"props":3527,"children":3528},{},[3529,3536],{"type":44,"tag":75,"props":3530,"children":3531},{},[3532],{"type":44,"tag":1632,"props":3533,"children":3534},{"href":3347},[3535],{"type":49,"value":3347},{"type":49,"value":3537}," —\nColumn layout, arrow conventions, self-loops, phase labels, and inline\noutput format for the ASCII diagram",{"type":44,"tag":3539,"props":3540,"children":3541},"style",{},[3542],{"type":49,"value":3543},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3545,"total":3640},[3546,3562,3572,3592,3607,3618,3630],{"slug":3547,"name":3547,"fn":3548,"description":3549,"org":3550,"tags":3551,"stars":26,"repoUrl":27,"updatedAt":3561},"address-sanitizer","detect memory errors during fuzzing","AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C\u002FC++ code to find buffer overflows and use-after-free bugs.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3552,3554,3557,3558],{"name":3553,"slug":2871,"type":16},"C#",{"name":3555,"slug":3556,"type":16},"Debugging","debugging",{"name":14,"slug":15,"type":16},{"name":3559,"slug":3560,"type":16},"Testing","testing","2026-07-17T06:05:14.925095",{"slug":3563,"name":3563,"fn":3564,"description":3565,"org":3566,"tags":3567,"stars":26,"repoUrl":27,"updatedAt":3571},"aflpp","perform multi-core fuzzing of C\u002FC++ projects","AFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C\u002FC++ projects.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3568,3569,3570],{"name":3553,"slug":2871,"type":16},{"name":14,"slug":15,"type":16},{"name":3559,"slug":3560,"type":16},"2026-07-17T06:05:12.433192",{"slug":3573,"name":3573,"fn":3574,"description":3575,"org":3576,"tags":3577,"stars":26,"repoUrl":27,"updatedAt":3591},"agentic-actions-auditor","audit GitHub Actions for security vulnerabilities","Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI Inference. Detects attack vectors where attacker-controlled input reaches AI agents running in CI\u002FCD pipelines, including env var intermediary patterns, direct expression injection, dangerous sandbox configurations, and wildcard user allowlists. Use when reviewing workflow files that invoke AI coding agents, auditing CI\u002FCD pipeline security for prompt injection risks, or evaluating agentic action configurations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3578,3581,3584,3587,3590],{"name":3579,"slug":3580,"type":16},"Agents","agents",{"name":3582,"slug":3583,"type":16},"CI\u002FCD","ci-cd",{"name":3585,"slug":3586,"type":16},"Code Analysis","code-analysis",{"name":3588,"slug":3589,"type":16},"GitHub Actions","github-actions",{"name":14,"slug":15,"type":16},"2026-07-18T05:47:48.564744",{"slug":3593,"name":3593,"fn":3594,"description":3595,"org":3596,"tags":3597,"stars":26,"repoUrl":27,"updatedAt":3606},"algorand-vulnerability-scanner","scan Algorand smart contracts for vulnerabilities","Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL\u002FPyTeal).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3598,3601,3602,3603],{"name":3599,"slug":3600,"type":16},"Audit","audit",{"name":3585,"slug":3586,"type":16},{"name":14,"slug":15,"type":16},{"name":3604,"slug":3605,"type":16},"Smart Contracts","smart-contracts","2026-07-18T05:47:43.989063",{"slug":3608,"name":3608,"fn":3609,"description":3610,"org":3611,"tags":3612,"stars":26,"repoUrl":27,"updatedAt":3617},"ask-questions-if-underspecified","clarify requirements before implementation","Clarify requirements before implementing. Use when serious doubts arise.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3613,3614],{"name":21,"slug":22,"type":16},{"name":3615,"slug":3616,"type":16},"Productivity","productivity","2026-07-17T06:05:33.543262",{"slug":3619,"name":3619,"fn":3620,"description":3621,"org":3622,"tags":3623,"stars":26,"repoUrl":27,"updatedAt":3629},"atheris","fuzz Python code with Atheris","Atheris is a coverage-guided Python fuzzer based on libFuzzer. Use for fuzzing pure Python code and Python C extensions.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3624,3627,3628],{"name":3625,"slug":3626,"type":16},"Python","python",{"name":14,"slug":15,"type":16},{"name":3559,"slug":3560,"type":16},"2026-07-17T06:05:14.575191",{"slug":3631,"name":3631,"fn":3632,"description":3633,"org":3634,"tags":3635,"stars":26,"repoUrl":27,"updatedAt":3639},"audit-augmentation","augment code graphs with audit findings","Augments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x binary-analysis graph exports. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, importing binary graph findings, cross-referencing Semgrep, CodeQL, or binary-analysis findings with call graph data, or visualizing audit findings in the context of code structure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3636,3637,3638],{"name":3599,"slug":3600,"type":16},{"name":3585,"slug":3586,"type":16},{"name":14,"slug":15,"type":16},"2026-08-01T05:44:54.920542",77,{"items":3642,"total":3746},[3643,3650,3656,3664,3671,3676,3682,3688,3701,3712,3724,3735],{"slug":3547,"name":3547,"fn":3548,"description":3549,"org":3644,"tags":3645,"stars":26,"repoUrl":27,"updatedAt":3561},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3646,3647,3648,3649],{"name":3553,"slug":2871,"type":16},{"name":3555,"slug":3556,"type":16},{"name":14,"slug":15,"type":16},{"name":3559,"slug":3560,"type":16},{"slug":3563,"name":3563,"fn":3564,"description":3565,"org":3651,"tags":3652,"stars":26,"repoUrl":27,"updatedAt":3571},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3653,3654,3655],{"name":3553,"slug":2871,"type":16},{"name":14,"slug":15,"type":16},{"name":3559,"slug":3560,"type":16},{"slug":3573,"name":3573,"fn":3574,"description":3575,"org":3657,"tags":3658,"stars":26,"repoUrl":27,"updatedAt":3591},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3659,3660,3661,3662,3663],{"name":3579,"slug":3580,"type":16},{"name":3582,"slug":3583,"type":16},{"name":3585,"slug":3586,"type":16},{"name":3588,"slug":3589,"type":16},{"name":14,"slug":15,"type":16},{"slug":3593,"name":3593,"fn":3594,"description":3595,"org":3665,"tags":3666,"stars":26,"repoUrl":27,"updatedAt":3606},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3667,3668,3669,3670],{"name":3599,"slug":3600,"type":16},{"name":3585,"slug":3586,"type":16},{"name":14,"slug":15,"type":16},{"name":3604,"slug":3605,"type":16},{"slug":3608,"name":3608,"fn":3609,"description":3610,"org":3672,"tags":3673,"stars":26,"repoUrl":27,"updatedAt":3617},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3674,3675],{"name":21,"slug":22,"type":16},{"name":3615,"slug":3616,"type":16},{"slug":3619,"name":3619,"fn":3620,"description":3621,"org":3677,"tags":3678,"stars":26,"repoUrl":27,"updatedAt":3629},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3679,3680,3681],{"name":3625,"slug":3626,"type":16},{"name":14,"slug":15,"type":16},{"name":3559,"slug":3560,"type":16},{"slug":3631,"name":3631,"fn":3632,"description":3633,"org":3683,"tags":3684,"stars":26,"repoUrl":27,"updatedAt":3639},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3685,3686,3687],{"name":3599,"slug":3600,"type":16},{"name":3585,"slug":3586,"type":16},{"name":14,"slug":15,"type":16},{"slug":3689,"name":3689,"fn":3690,"description":3691,"org":3692,"tags":3693,"stars":26,"repoUrl":27,"updatedAt":3700},"audit-context-building","build architectural context for code analysis","Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3694,3697,3698,3699],{"name":3695,"slug":3696,"type":16},"Architecture","architecture",{"name":3599,"slug":3600,"type":16},{"name":3585,"slug":3586,"type":16},{"name":21,"slug":22,"type":16},"2026-07-18T05:47:40.122449",{"slug":3702,"name":3702,"fn":3703,"description":3704,"org":3705,"tags":3706,"stars":26,"repoUrl":27,"updatedAt":3711},"audit-prep-assistant","prepare codebases for security audits","Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3707,3708,3709,3710],{"name":3599,"slug":3600,"type":16},{"name":3585,"slug":3586,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},"2026-07-18T05:47:39.210985",{"slug":3713,"name":3713,"fn":3714,"description":3715,"org":3716,"tags":3717,"stars":26,"repoUrl":27,"updatedAt":3723},"burpsuite-project-parser","parse Burp Suite project files","Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3718,3719,3722],{"name":3599,"slug":3600,"type":16},{"name":3720,"slug":3721,"type":16},"CLI","cli",{"name":14,"slug":15,"type":16},"2026-07-17T06:05:33.198077",{"slug":3725,"name":3725,"fn":3726,"description":3727,"org":3728,"tags":3729,"stars":26,"repoUrl":27,"updatedAt":3734},"c-review","audit C and C++ code","Performs comprehensive C\u002FC++ security review for memory corruption, integer overflows, race conditions, and platform-specific vulnerabilities. Use when auditing native C\u002FC++ applications, reviewing daemons or services for memory safety, or hunting integer overflow \u002F use-after-free \u002F race conditions in userspace code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3730,3731,3732,3733],{"name":3599,"slug":3600,"type":16},{"name":3553,"slug":2871,"type":16},{"name":3585,"slug":3586,"type":16},{"name":14,"slug":15,"type":16},"2026-07-17T06:05:11.333374",{"slug":3736,"name":3736,"fn":3737,"description":3738,"org":3739,"tags":3740,"stars":26,"repoUrl":27,"updatedAt":3745},"cairo-vulnerability-scanner","scan Cairo and StarkNet contracts for vulnerabilities","Scans Cairo\u002FStarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, and signature replay. Use when auditing StarkNet projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3741,3742,3743,3744],{"name":3599,"slug":3600,"type":16},{"name":3585,"slug":3586,"type":16},{"name":14,"slug":15,"type":16},{"name":3604,"slug":3605,"type":16},"2026-07-18T05:47:42.84568",111]