mermaid-to-proverif

Converts annotated Mermaid sequence diagrams into ProVerif .pv models for cryptographic protocol verification.

Updated May 2, 2026
One-click install
npx skills add https://github.com/ayehiaa/my-travel-assistant --skill mermaid-to-proverif-ayehiaa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid-to-proverif
Source: https://github.com/ayehiaa/my-travel-assistant/tree/main/.agents/skills/mermaid-to-proverif
Command: npx skills add https://github.com/ayehiaa/my-travel-assistant --skill mermaid-to-proverif-ayehiaa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you take a cryptographic protocol described as a Mermaid sequence diagram and turn it into a ProVerif (.pv) model that you can verify formally.

Core Features & Use Cases

  • Translate Mermaid to ProVerif: Generates the full ProVerif skeleton (channels, types, functions, events, queries, and processes) from a sequenceDiagram.
  • Support common crypto primitives: Handles annotated operations like Sign/Verify, DH/HKDF, Enc/Dec, HMAC/MAC, hashing, and commitment-style flows.
  • Guide verification setup: Promotes reachability checks, correct event placement, and appropriate security-property queries (secrecy, authentication, forward secrecy).

Quick Start

Use the mermaid-to-proverif skill on the Mermaid sequenceDiagram produced by the crypto-protocol-diagram skill to generate a ready-to-run ProVerif .pv model.

Frequently Asked Questions about mermaid-to-proverif

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a Mermaid sequence diagram into a ProVerif model?

To convert a Mermaid sequence diagram into a ProVerif model, you extract participants and channels from the diagram, map cryptographic annotations to ProVerif functions, declare events, and emit a syntactically correct .pv file.

Can I check forward secrecy and authentication using ProVerif generated from a protocol diagram?

Yes, you can check forward secrecy and authentication by translating cryptographic annotations from your sequence diagram into ProVerif events and security queries, which are then emitted into the formal verification model.

What cryptographic primitives are supported when translating Mermaid diagrams to ProVerif?

Supported cryptographic primitives include signing and verification, Diffie-Hellman and HKDF, encryption and decryption, HMAC and MAC, hashing, and commitment-style flows mapped to ProVerif functions and equations.

How do I generate a ProVerif file for replay-attack checks from an annotated protocol diagram?

To generate a ProVerif file for replay-attack checks, the conversion process extracts participants and channels from the annotated protocol diagram, maps the operations to ProVerif functions, and declares the necessary reachability and security queries.

Does formal verification of cryptographic protocols require manually writing ProVerif processes?

Formal verification of cryptographic protocols does not require manually writing ProVerif processes if you use a converter to translate a Mermaid sequence diagram directly into a full ProVerif skeleton with correct syntax.

What limitations exist when mapping sequence diagram annotations to ProVerif events?

Limitations arise when sequence diagram annotations lack sufficient detail for correct event placement, which is required to generate appropriate security-property queries and reachability checks in the final ProVerif file.