← Explore all skills

SECURITY REVIEW / Trail of Bits

Mermaid to ProVerif

Reads a Mermaid sequence diagram of a cryptographic protocol and writes a ProVerif .pv model, with queries for secrecy, authentication and forward secrecy, that can be passed to the ProVerif verifier.

“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.”

01 / THE REASONING

Why this made the selection.

  • Translates a Mermaid sequenceDiagram, typically the output of crypto-protocol-diagram, into a ProVerif .pv model with queries for secrecy, authentication and forward secrecy.
  • It adds reachability queries first and explains how to read them: ProVerif's `RESULT not event(endR(...)) is false` means the event is reachable, and `is true` means a structural bug.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • plugins/trailmark/skills/mermaid-to-proverif/SKILL.md
  • plugins/trailmark/README.md (prerequisites and version notes)
  • plugins/trailmark/agents/code-slice-worker.md (host note)
  • README.md (installation and licence sections)
  • LICENSE

Our findings

  • Mermaid to ProVerif's SKILL.md frontmatter declares no allowed-tools; its body states the tools used are Read, Write, Grep and Glob.
  • The forward-secrecy test leaks both long-term secret keys after the sessions, in phase 1, and checks that a past session key stays secret.
  • The decision tree adds a noselect directive when verification does not terminate after several minutes.
  • The model is written to a .pv file named from the protocol, followed by a summary of its queries and assumptions.

Not established by this review

  • Not executed: it was not installed or run.
  • The Mermaid to ProVerif skill and any bundled scripts were not run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Add a skill to your workflow.

Upstream setup instructions ↗
  1. `/plugin marketplace add trailofbits/skills` (repository README) adds the whole Trail of Bits marketplace, not one skill.
  2. Install the `trailmark` plugin from `/plugin menu`; it bundles the Mermaid to ProVerif skill with the other trailmark skills listed in the trailmark plugin README.
  3. Run the generated model yourself with `proverif model.pv`; the skill's stated tools include no Bash.

Before you start

  • A Mermaid sequenceDiagram of the protocol, for example from crypto-protocol-diagram
  • ProVerif, to run the generated model (`proverif model.pv`) outside this skill

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/skills/mermaid-to-proverif/SKILL.md

    Supports: upstreamDescription, summary, whySelected, bestFor, limitations, access, review.findings

  2. trailmark plugin README ↗Checked

    https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/README.md

    Supports: install.prerequisites, install.steps

  3. https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/agents/code-slice-worker.md

    Supports: compatibility

  4. https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/README.md

    Supports: install.steps, license

  5. https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/LICENSE

    Supports: license

Evidence & Ask