Skip to content

Repository files navigation

🛡️ Project Netra: The Quantum-Secure Agent-to-Agent Security Protocol

Shield: Post-Quantum Shield: OPA Shield: Rust

Project Netra is a high-performance security sidecar designed for the next generation of the autonomous web. It solves the "Silent Hijack" problem in Agent-to-Agent (A2A) ecosystems by providing a zero-trust, post-quantum secure intermediary layer that intercepts, analyzes, and governs all inter-agent traffic.


🚀 Why Netra? (The Need for A2A Security)

As autonomous agents begin to handle financial transactions, private data, and critical infrastructure, standard web security (OAuth/JWT) is no longer enough.

  • The Hijack Problem: If an agent's logic is compromised, it can be used as a "Trojan Horse" to attack other agents.
  • The Trust Gap: How does Agent B know that the request from Agent A is actually intended by the owner and not a result of a prompt injection attack?
  • Quantum Threat: Current encryption will fail against quantum computers. Netra uses Dilithium (ML-DSA) to future-proof agent identities.

🏗️ Project Architecture

Netra operates as a Security Sidecar. It intercepts traffic at Port 8080, applies governance, and only forwards "Clean" requests to the target agent at Port 4000.

[ Agent A ] --(8080)--> [ Netra Proxy ] --(4000)--> [ Agent B ]
   (Client)           (Security Sidecar)         (Target Server)

Key Components:

  • Identity Manager: Uses PQC Dilithium to verify sender DIDs.
  • Policy Engine: Powered by Regorus (OPA) to enforce behavioral rules in real-time.
  • Audit Trail: Generates cryptographically signed logs of every blocked/allowed action.

📂 File Structure

Netra is built as a highly modular Rust workspace:

netra-protocol/
├── crates/
│   ├── netra-proxy/    # The Main Sidecar (Traffic Interceptor)
│   ├── netra-sim/      # Simulation Suite (Agent A & Agent B)
│   ├── netra-identity/ # DID & Wallet Management
│   ├── netra-policy/   # OPA/Regorus Policy Implementation
│   ├── netra-crypto/   # PQC (Dilithium & Kyber) implementations
│   └── netra-attest/   # Hardware-bound Hardware Attestation
└── Cargo.toml          # Workspace Configuration

🛠️ Installation & Setup

Prerequisites

  • Rust & Cargo (Installed on Ubuntu/WSL for best performance)
  • pkg-config, libssl-dev (for Linux/WSL users)

Setup

  1. Clone the repository:
    git clone https://github.com/DextroByt/Netra.git
    cd netra-protocol
  2. Build the workspace:
    cargo build

🧪 Testing & Execution (Use Case Scenarios)

To see Netra in action, you need three separate terminal sessions.

Step 1: Start the Target (Agent B)

This represents the backend server or the agent receiving data. It hosts a mock database of sensor and financial records.

export CARGO_INCREMENTAL=0
cargo run --bin agent_b

Step 2: Start the Sidecar (Netra Proxy)

This is the security guard. It intercepts and analyzes every request.

export CARGO_INCREMENTAL=0
cargo run --bin netra-proxy

Step 3: Start the Traffic Generator (Agent A)

This agent will try to access data from Agent B.

export CARGO_INCREMENTAL=0
cargo run --bin agent_a

🎮 Industry Scenarios to Test:

  1. Normal Traffic: In Agent A terminal, press Enter. You will see Netra log a [ALLOW] and Agent B returning the requested data.
  2. Malicious Hijack: In Agent A terminal, press 'H'. Netra will detect the MALICIOUS intent, block the request, and print the Offending Payload (e.g., rm -rf /) in its logs.
  3. Identity Theft: In Agent A terminal, press 'U'. Netra will block the request because it lacks a verified PQC signature (DID).

📜 Detailed Logging

Netra provides forensic-level details in every log:

  • Timestamps: RFC3339 standard for auditability.
  • Context: Origin Location, Purpose (e.g., Financial Audit), and TTL.
  • Forensics: The exact payload and command are printed on every blocked event.

👥 Developers

Project Netra is built with passion and precision by:

  • Akash Chakresh
  • Aashish Gupta

© 2026 Project Netra Protocol. Secure. Autonomous. Quantum-Ready.

About

Agent2Agent Security Platform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages