crypto-protocol-diagram

Solid

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.

AI & Automation 5,673 stars 496 forks Updated today CC-BY-SA-4.0

Install

View on GitHub

Quality Score: 90/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Crypto Protocol Diagram Produces a Mermaid `sequenceDiagram` (written to file) and an ASCII sequence diagram (printed inline) from either: - **Source code** implementing a cryptographic protocol, or - **A specification** — RFC, academic paper, pseudocode, informal prose, ProVerif (`.pv`), or Tamarin (`.spthy`) model. **Tools used:** Read, Write, Grep, Glob, Bash, WebFetch (for URL specs). Unlike the `diagramming-code` skill (which visualizes code structure), this skill extracts **protocol semantics**: who sends what to whom, what cryptographic transformations occur at each step, and what protocol phases exist. For call graphs, class hierarchies, or module dependency maps, use the `diagramming-code` skill instead. ## When to Use - User asks to diagram, visualize, or extract a cryptographic protocol - Input is source code implementing a handshake, key exchange, or multi-party protocol - Input is an RFC, academic paper, pseudocode, or formal model (ProVerif/Tamarin) - User names a specific protocol (TLS, Noise, Signal, X3DH, FROST) ## When NOT to Use - User wants a call graph, class hierarchy, or module dependency map — use `diagramming-code` - User wants to formally verify a protocol — use `mermaid-to-proverif` (after generating the diagram) - Input has no cryptographic protocol semantics (no parties, no message exchange) ## Rationalizations to Reject | Rationalization | Why It's Wrong | Required Action | |-----------------|----------------|-----------------| | "...

Details

Author
trailofbits
Repository
trailofbits/skills
Created
4 months ago
Last Updated
today
Language
Python
License
CC-BY-SA-4.0

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

crypto-protocol-diagram

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.

1 Updated 1 weeks ago
kevinvwong
AI & Automation Listed

mermaid-to-proverif

Translates Mermaid sequenceDiagrams describing cryptographic protocols into ProVerif formal verification models (.pv files). Use when generating a ProVerif model, formally verifying a protocol, converting a Mermaid diagram to ProVerif, verifying protocol security properties (secrecy, authentication, forward secrecy), checking for replay attacks, or producing a .pv file from a sequence diagram.

1 Updated 1 weeks ago
kevinvwong
AI & Automation Solid

mermaid-to-proverif

Translates Mermaid sequenceDiagrams describing cryptographic protocols into ProVerif formal verification models (.pv files). Use when generating a ProVerif model, formally verifying a protocol, converting a Mermaid diagram to ProVerif, verifying protocol security properties (secrecy, authentication, forward secrecy), checking for replay attacks, or producing a .pv file from a sequence diagram.

5,673 Updated today
trailofbits