Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
aimp — A serverless networking protocol designed for resilient state synchronization between autonomous agents in fragmented, low-bandwidth networks | Kitploit
Tools/GitHubGitHub/fabriziosalmi/aimp
Embedded Systems SecurityIoT SecurityNetwork SecurityCryptographyHardware SecurityThreat IntelligenceMachine LearningPapers & ResearchLearning & Education
GitHubfabriziosalmi/aimp

aimp

A serverless networking protocol designed for resilient state synchronization between autonomous agents in fragmented, low-bandwidth networks

51428 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View RepositoryWebsite

AIMP — AI Mesh Protocol

CI License: MIT Rust ResearchGate ResearchHub

An experimental, serverless networking protocol for resilient state synchronization between autonomous agents in fragmented, low-bandwidth networks. Built on Merkle-CRDTs and cryptographic identity — no central authority, no global DNS, always writeable.


Papers

#VersionTitleLink
1v0.1.0Merkle-CRDT Protocol (L1/L2)ResearchGate
2v0.2.0Epistemic Layer (L3)ResearchGate
3v0.3.0Correlation-Aware Aggregation (L3)ResearchGate
4v0.4.0Deterministic Semantic Topologies (L3)ResearchGate

Author profiles: ResearchGate · ResearchHub


Protocol Stack


What's New

v0.4.0 — Deterministic Semantic Topologies

L3 v0.3.0 required applications to manually construct the knowledge graph (Supports/Contradicts edges). v0.4.0 eliminates this bottleneck with autonomous edge generation:

  • Claims carry an optional QuantizedEmbedding([u64; 4]) — a 256-bit SimHash computed application-side from a canonical embedding model.
  • At each epoch boundary, the protocol computes pairwise Hamming distances (XOR + popcount, ~1 ns per pair) and emits Supports edges for close pairs (d <= 30 bits) and Contradicts edges for distant pairs (d >= 200 bits).
  • Edge strength scales linearly with distance in basis points (d=0 → 10000 bps, d=30 → 1000 bps).
  • A max_k_nearest cap bounds edge density to O(N), preventing trust propagation explosion.
  • embedding_version: u32 isolates disjoint latent spaces for protocol-level model upgrades.
  • Auto-edges are materialized via L2 gossip, surviving GC via Holographic Routing.
  • Dead zone (31-199 bits) orphans ambiguous claims — epistemologically correct isolation.
root@kitploit:~
// Autonomous truth discovery: 10,000 claims → 50 ms scan, O(N) edges
// No floats. No coordination. No central authority.
let edges = auto_edge_generator.generate_edges(&epoch_claims);

v0.3.0 — Correlation-Aware Belief Aggregation

L3 v0.2.0 assumes all evidence sources are statistically independent (Naive Bayes). This produces pathological hyper-confidence when physically correlated sensors (e.g., 100 IoT devices on the same rooftop) or semantically correlated agents (e.g., LLMs fine-tuned on the same dataset) report concordant observations.

v0.3.0 introduces Grid-Cell Correlation Discounting:

  • Each claim carries an optional CorrelationCell(u64) — a discrete coordinate for spatial, semantic, or temporal proximity.
  • Within each cell, evidence is ranked by strength and geometrically discounted: the strongest source retains 100% weight; each subsequent source receives discount_bps^rank / 10000^rank (default 30%).
  • With 30% discount, N correlated sensors converge to ~1.42x the evidence of a single sensor — regardless of N. The naive approach would produce Nx amplification.
  • The CRDT associativity challenge (geometric decay is non-associative across partial merges) is solved architecturally: epoch reduction buckets by (temporal_grid, fingerprint, correlation_cell), guaranteeing atomic computation on the complete set.
  • Claims with correlation_cell: None behave identically to v0.2.0 (zero regression).
  • All arithmetic is integer-only (i32/i64, basis points). No floats. ZK-ready.
root@kitploit:~
// 100 co-located sensors, 70% confidence each:
// v0.2.0 (naive):  100 × 847 = 84,700 milli-log-odds → ~100% (hyper-confident)
// v0.3.0 (30%):    847 × Σ(0.3^i) ≈ 1,207 milli-log-odds → ~77% (realistic)

Architecture

root@kitploit:~
aimp_node/          Rust reference implementation (Cargo workspace member)
  src/
    crdt/           Merkle-DAG engine, actor model, arena allocator, quorum consensus
    crypto/         Ed25519 identity, BLAKE3 hashing, zero-trust firewall
    network/        UDP gossip, Noise Protocol XX sessions, per-peer rate limiting
    protocol/       Wire format (MessagePack), typed payload enum
    epistemic.rs    L3 Epistemic Layer (v0.3.0): log-odds, trust propagation, correlation discounting
    semantic_topology.rs  L3 Semantic Topology (v0.4.0): SimHash embeddings, auto-edge generation
    decision_engine.rs  Pluggable deterministic decision engine (trait + rule engine + hot-reload)
    error.rs        Unified AimpError type hierarchy
    dashboard/      Ratatui TUI
    config.rs       Dynamic configuration with validation
    event/          Structured logging + Prometheus metrics (counters + histograms)
  tests/            Integration tests
  benches/          Criterion benchmarks
aimp_testbed/       Python SDK (aimp-client) + CLI tool + chaos testing
deploy/             Systemd service, Firecracker microVM, install script
formal/             TLA+ convergence + quorum safety + belief convergence specification
docs/               Paper 1 (Typst source + PDF)
v0.2.0/             Paper 2: Epistemic Layer (Typst source + PDF)
v0.3.0/             Paper 3: Correlation-Aware Aggregation (Typst source + PDF)

Strategic Advantages


Key Features

Core Engine (v0.1.0)

  • Actor Model with zero-shared-state CRDT via tokio::mpsc
  • Slab/Arena allocation with O(1) insertion and SoA layout
  • Durable persistence via redb with ChaCha20Poly1305 encryption at rest
  • HKDF-SHA256 key derivation with domain separation
  • Cached merkle root with invalidation-on-write
  • Real mark-and-sweep GC with slab memory reclamation
  • Epoch-based GC tracking integrated into the CRDT actor

Epistemic Layer (v0.2.0 — v0.4.0)

  • Integer log-odds arithmetic (i32, milli-log-odds) — no floats, 100% deterministic
  • Two-pass Markovian trust propagation (Supports → Contradictions, no oscillation)
  • Sybil-resistant reputation: new nodes start at 0, delegation required, reputation spending
  • Grid-aligned epoch reduction with materialized compaction (Summaries survive GC)
  • Cycle detection (sorted DFS) prevents confidence inflation loops
  • v0.3.0: Correlation-aware aggregation — geometric discounting for co-located sensors / LLMs
  • v0.3.0: Atomic cell reduction — bucketing by (epoch, fingerprint, cell) for CRDT safety
  • v0.4.0: Deterministic semantic topologies — SimHash embeddings, autonomous edge generation
  • 98-142x faster than Subjective Logic / Dempster-Shafer (bit-identical across architectures)

Networking & Security

  • Noise Protocol XX encrypted sessions (default on)
  • Per-peer token bucket rate limiting (integer arithmetic)
  • O(1) gossip deduplication via HashSet + VecDeque
  • TTL replay attack detection with circuit breaker
  • Session LRU eviction (TTL + max count)
  • Protocol version range negotiation for rolling upgrades

Decision Engine & Consensus

  • Pluggable DecisionEngine trait with RuleEngine implementation
  • Hot-reload rules from aimp_rules.json (no restart needed)
  • BFT quorum voting with persistent verified decisions
  • Typed Payload enum per opcode (compile-time safety)

Observability

  • Prometheus counters, gauges, and latency histograms
  • Composite /health endpoint with sub-checks and HTTP status codes
  • Structured SystemEvent logging with TUI dashboard

Operations

  • Unified AimpError type hierarchy (no more Box<dyn Error>)
  • Config validation (rejects invalid parameter combinations)
  • Graceful shutdown with 5-second timeout
  • Systemd hardened service file
  • CI/CD: lint, test, security audit, docs, cross-compiled releases

Benchmarks

Measured with Criterion on Apple Silicon (M-series), single-threaded, fast-crypto mode:

System-Level

Simulated 5-node cluster with anti-entropy sync (in-process, Apple Silicon):

Network Impairment (netem simulation)

Convergence under simulated packet loss, latency, and partitions (5 nodes, 50 mutations/node):

AIMP converges up to ~80% packet loss within a few anti-entropy rounds, degrading gracefully.

Cross-Platform (ARM64 resource-constrained)

Docker ARM64 Linux with RPi-class resource limits:

Even on RPi Zero class hardware, throughput is 3 orders of magnitude above the rate limit.

Comparison with Automerge v0.7

Same hardware, same operations, single-threaded, target-cpu=native:

AIMP with ring outperforms Automerge by 1.37x on mutations (with Ed25519 per write) and 2.4x on merge. Yrs is fastest on mutation (no crypto) but AIMP merge is within 26% of Yrs.

root@kitploit:~
# Enable ring backend for maximum throughput
RUSTFLAGS="-C target-cpu=native" cargo run --release --features fast-crypto,fast-alloc

Run benchmarks locally:

root@kitploit:~
cargo bench --manifest-path aimp_node/Cargo.toml             # Micro-benchmarks
cargo run --release -p aimp_node --example bench_convergence  # System benchmarks
cargo run --release -p aimp_node --example bench_netem        # Network impairment
docker build -f Dockerfile.bench -t aimp-bench . && \
  docker run --rm --memory=1g --cpus=1 aimp-bench             # ARM64 constrained

Formal Verification (TLA+)

L2 — CRDT Convergence

PropertyDescriptionStatus

TLC explored 46,063 states (9,558 distinct) to depth 16 in <1 second with 10 parallel workers and zero violations. Bugs found: 2 correctness bugs (out-of-order heads, quorum double-voting). Both fixed.

L3 — Belief Convergence

PropertyDescriptionStatus

Exhaustive bounded verification: 199,902 configurations (5 properties, up to N=6 nodes). Bugs found: 1 trust propagation formula bug (t_{k+1} = t_k + At_k vs correct t_{k+1} = t_0 + At_k). Fixed.


Quick Start

1. Run the Node

root@kitploit:~
cargo run -- --port 1337 --name node1

2. Python CLI

root@kitploit:~
cd aimp_testbed
pip install -e .
aimp-cli health --target 127.0.0.1 --metrics-port 9090
aimp-cli infer "Check valve pressure in sector north"

3. Run Tests & Benchmarks

root@kitploit:~
make test                     # Property-based + integration tests
make bench                    # Criterion benchmarks
make lint                     # Format + clippy
make docs                     # Generate rustdoc

Edge Deployment

AIMP is designed to run as a single static binary with zero runtime dependencies. No Docker, no container runtime, no JVM.

Quick Deploy (bare metal)

root@kitploit:~
# Download the binary for your architecture
curl -LO https://github.com/fabriziosalmi/aimp/releases/latest/download/aimp_node-aarch64-linux
chmod +x aimp_node-aarch64-linux

# Install as systemd service
sudo deploy/install.sh ./aimp_node-aarch64-linux

# Start
sudo systemctl start aimp-node
curl localhost:9090/health

Cross-Compile from Source

root@kitploit:~
make install-cross-targets   # One-time: install musl targets
make edge-arm64              # ARM64 (RPi 4/5, Jetson, Graviton)
make edge-armv7              # ARMv7 (RPi 2/3, industrial PLCs)
make edge-x86                # x86_64 (edge gateways)
make edge-all                # All three

Firecracker MicroVM (multi-tenant isolation)

For edge gateways running multiple untrusted workloads:

root@kitploit:~
sudo make microvm-rootfs     # Builds ~15MB Alpine rootfs with AIMP
firecracker --no-api --config-file deploy/firecracker/vm-config.json

Boot time: ~125ms. Memory: 64MB. vCPU: 1.

Systemd Service

The included service file (deploy/systemd/aimp-node.service) provides:


Configuration

Configuration is loaded from (highest priority first):

  1. CLI arguments (--port, --name)
  2. Environment variables (AIMP_PORT, AIMP_NOISE_REQUIRED, AIMP_PEER_RATE_LIMIT, ...)
  3. aimp.toml file (optional)
  4. Hardcoded defaults

Data Flow

root@kitploit:~
graph TD
    UDP[UDP Socket] -->|Envelope| RL[Rate Limiter]
    RL -->|Allowed| NP[Noise Protocol]
    NP -->|Decrypt| FW[Security Firewall]
    FW -->|Valid| BP[Backpressure Semaphore]
    BP -->|Permit| Parser[Protocol Parser]
    Parser -->|AimpData| CRDT[CRDT Actor]
    CRDT -->|Mutation| DAG[Merkle-DAG + redb]
    DAG -->|Prune| GC[Epoch GC]
    CRDT -->|Evaluation Req| DE[Decision Engine]
    DE -->|Decision + Evidence| CRDT
    CRDT -->|Quorum Vote| QM[QuorumManager]

Related Work

AIMP builds on concepts from the following areas of distributed systems research:

  • CRDTs — Shapiro et al., "A Comprehensive Study of Convergent and Commutative Replicated Data Types" (INRIA, 2011)
  • Merkle-CRDTs — Kleppmann & Howard, "Byzantine Eventual Consistency and the Fundamental Limits of Peer-to-Peer Databases" (2022)
  • BFT Consensus — Castro & Liskov, "Practical Byzantine Fault Tolerance" (OSDI, 1999)
  • Bayesian Aggregation — Jaynes, "Probability Theory: The Logic of Science" (2003); log-odds arithmetic for belief fusion
  • Trust Networks — Kamvar et al., "The EigenTrust Algorithm for Reputation Management in P2P Networks" (WWW, 2003)
  • Subjective Logic — Jøsang, "Subjective Logic: A Formalism for Reasoning Under Uncertainty" (Springer, 2016)
  • Copulas — Nelsen, "An Introduction to Copulas" (Springer, 2006); correlation modeling for dependent evidence
  • Noise Protocol — Perrin, "The Noise Protocol Framework" (2018); used via the snow crate for XX handshake pattern
  • Gossip Protocols — Demers et al., "Epidemic Algorithms for Replicated Database Maintenance" (1987)
  • Merkle Trees — Merkle, "A Digital Signature Based on a Conventional Encryption Function" (CRYPTO, 1987)
  • Vector Clocks — Mattern, "Virtual Time and Global States of Distributed Systems" (1988)

License

MIT — Fabrizio Salmi, 2026.

Download Tool
LayerVersionPurpose
L1/L2v0.1.0Merkle-DAG CRDT, Ed25519 signing, Noise Protocol transport, BFT quorum
L3v0.2.0Epistemic Layer: integer log-odds, two-pass trust propagation, Sybil-resistant reputation
L3v0.3.0Correlation-Aware Aggregation: geometric discounting for correlated sensors/LLMs
L3v0.4.0Deterministic Semantic Topologies: autonomous edge generation via 256-bit SimHash
FeatureAIMP (Merkle-CRDT)Traditional (Raft/Paxos)
TopologyP2P Mesh / DecentralizedLeader / Quorum
AvailabilityAP (Always Writeable)CP (Requires Majority)
OrderingCausal (Vector Clocks)Total (Sequential)
IntegrityCryptographic (Merkle-DAG)Log-based
HardwareEdge/IoT OptimizedData Center Grade
OperationTimeThroughput
append_mutation (100 ops)41.8 µs~2.4M mutations/sec
get_merkle_root (cached)4.8 nsO(1)
BLAKE3 hash (1 KB)925 ns~1.08 GB/s
MessagePack ser / de204 / 210 ns—
Ed25519 sign (ring)9.3 µs~108K ops/sec
Ed25519 verify25.0 µs~40K ops/sec
ScenarioResult
Throughput (5 nodes x 1000 mutations, with Ed25519 sign)96,289 mutations/sec
Convergence (5 divergent nodes, 250 DAG each)0.68 ms (1 sync round)
Partition/Merge (2 groups, 30 mutations/group, full merge)0.21 ms
Crypto hot-path (sign + verify per message)45.0 µs → 22K msg/sec max
Crypto budget at rate_limit=50/sec0.23% utilization
ConditionConvergedRounds
Baseline (0% loss)YES1
10% packet lossYES2
30% packet lossYES2
50% packet lossYES2
20% loss + 100ms latency + 30ms jitterYES2
Partition (10 rounds) then mergeYES1
Partition (50 rounds) then merge with 20% lossYES1
80% packet loss (stress)YES4
MetricmacOS ARM64Linux 1C/1GB (RPi 4)Linux 1C/256MB (RPi Zero)
Throughput96,289 mut/s24,802 mut/s29,709 mut/s
Convergence0.68 ms3.06 ms1.30 ms
Ed25519 sign8.7 µs16.2 µs15.1 µs
Ed25519 verify20.5 µs34.6 µs45.2 µs
Max msg/sec34,32919,69516,573
Crypto budget @50/s0.15%0.25%0.30%
BenchmarkAIMP (ring)AutomergeYrs (Yjs)
Mutation (1000 ops)129K ops/s94K ops/s632K ops/s
2-replica merge0.48 ms1.17 ms0.38 ms
5-replica merge2.16 ms3.89 ms—
State size (1000 ops)~18 KB4 KB—
ConvergenceIf two nodes possess the same store, they compute the same Merkle headsVerified
QuorumSafetyIf quorum is reached for a prompt, the decision is unique (no conflicting decisions)Verified
QuorumLivenessIf all nodes vote for the same decision, the quorum threshold is eventually reachedVerified
BeliefDeterminismSame claims + graph → identical BeliefState on all nodesVerified
NoOscillationTrust values converge monotonically (no Pass 2 → Pass 1 feedback)Verified
ContradictionSafetySingle contradiction cannot flip Accepted → Rejected in one stepVerified
HardeningValue
User isolationDedicated aimp user, no login shell
FilesystemProtectSystem=strict, ProtectHome=yes
Memory limitMemoryMax=128M
CPU limitCPUQuota=80%
PrivilegeNoNewPrivileges=yes, MemoryDenyWriteExecute=yes
Syscall filter@system-service whitelist
RestartOn failure with exponential backoff
ShutdownSIGTERM → 10s grace → SIGKILL
ParameterDefaultDescription
port1337UDP listen port
metrics_port9090Prometheus HTTP port
noise_requiredtrueEnforce Noise Protocol encryption
peer_rate_limit50Max messages/sec per peer
peer_rate_burst100Token bucket burst capacity
gc_mutation_threshold1000Mutations before GC sweep
quorum_threshold2Nodes required for BFT consensus
dag_history_depth100Max DAG depth retained after GC