-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Feature: Visual tool for MPIR operator lineage and security logic
Objective
Develop a visualization tool to clearly display the lineage of operators in MPIR (Multi-Party Intermediate Representation), including which party performed each computation step, how data is transferred between parties, and how security logic is enforced to prevent privacy leaks.
Main requirements
- Lineage tracking: Graphically show each operator, data source, destination, and workflow.
- Security logic display: Each node should indicate security attributes, such as TEE (Trusted Execution Environment) execution, key distribution/verification, encrypted transmission, etc.
- Risk indication: If lineage/logic poses potential privacy risks, highlight those steps.
- Multi-party support: Distinguish roles such as Driver, data providers, TEE, etc., to reflect real MPC workflows.
- Auditability: Support visualization and auditing of MPIR security validation processes, including signatures, hashes, session nonces, etc.
Additional requirements
- Should be implemented as a single-page HTML/JS tool, placed at
./mplang/tools/visualizer
, and able to load compiler/runtime dump results for one-click visualization. - Support local file loading and URL parameter loading; no backend required, suitable for local and CI/audit environments.
- Output format should be JSON, including operators, data nodes, edges, roles, execution environments, security states, risk flags, timeline, etc.
- Visualization framework is not limited to Mermaid; recommend Cytoscape.js + elkjs (or G6, React Flow, D3), with Mermaid for static export/documentation.
- Graph view should support multiple security attributes (e.g., encrypted state, TEE state, risk highlighting, edge types), extensible for filtering, replay, audit diff, etc.
- Support one-click export: PNG/SVG/JSON/Mermaid subgraph; future extensions for risk rules, diff, timeline replay.
- Implementation details/tech stack can be adjusted flexibly, prioritizing clear lineage and security logic, and visible risk indication.
Expected benefits
- Lower MPC usage barrier, helping developers and auditors discover logical errors and privacy risks.
- Facilitates security compliance audit and improves system trustworthiness.
Relevant code and documentation references
- design/tee_design.md#High-Level Flow
- design/tee_design.md#Conceptual Execution Flow
- tutorials/5_ir_dump.py#MPIR Dump
- mplang/core/mpir.py#MPIR module
- design/tee_design.md#Trust & Verification Logic
- design/tee_design.md#Security Analysis
- mplang/simp/smpc.py#SPU reveal
- README.md#Millionaires Example
- tutorials/8_phe.py#Three-party PHE Sum
If you need further details or want to specify implementation approaches, please comment.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request