secubox-openwrt/package/secubox/luci-app-zkp
CyberMind-FR 1bbd345cee refactor(luci): Mass KissTheme UI rework across all LuCI apps
Convert 90+ LuCI view files from legacy cbi-button-* classes to
KissTheme kiss-btn-* classes for consistent dark theme styling.

Pattern conversions applied:
- cbi-button-positive → kiss-btn-green
- cbi-button-negative/remove → kiss-btn-red
- cbi-button-apply → kiss-btn-cyan
- cbi-button-action → kiss-btn-blue
- cbi-button (plain) → kiss-btn

Also replaced hardcoded colors (#080, #c00, #888, etc.) with
CSS variables (--kiss-green, --kiss-red, --kiss-muted, etc.)
for proper dark theme compatibility.

Apps updated include: ai-gateway, auth-guardian, bandwidth-manager,
cloner, config-advisor, crowdsec-dashboard, dns-provider, exposure,
glances, haproxy, hexojs, iot-guard, jellyfin, ksm-manager,
mac-guardian, magicmirror2, master-link, meshname-dns, metablogizer,
metabolizer, mqtt-bridge, netdata-dashboard, picobrew, routes-status,
secubox-admin, secubox-mirror, secubox-p2p, secubox-security-threats,
service-registry, simplex, streamlit, system-hub, tor-shield,
traffic-shaper, vhost-manager, vortex-dns, vortex-firewall,
webradio, wireguard-dashboard, zigbee2mqtt, zkp, and more.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-12 11:09:34 +01:00
..
htdocs/luci-static/resources/view/zkp refactor(luci): Mass KissTheme UI rework across all LuCI apps 2026-03-12 11:09:34 +01:00
root/usr fix(zkp-hamiltonian): ARM64 build fixes and RPCD CLI flag corrections 2026-02-24 10:50:25 +01:00
Makefile
README.md docs(luci-app-zkp): Add README with usage and protocol docs 2026-02-24 10:33:12 +01:00

LuCI ZKP Hamiltonian Dashboard

Web interface for Zero-Knowledge Proof cryptography based on the Hamiltonian Cycle problem (Blum 1986).

Features

  • Key Generation - Create graph + Hamiltonian cycle pairs
  • Proof Creation - Generate NIZK proofs using Fiat-Shamir heuristic
  • Verification - Validate proofs with ACCEPT/REJECT result
  • Key Management - List, view, and delete saved keys

Screenshot

┌─────────────────────────────────────────────────────┐
│  ZKP Hamiltonian Cryptography          [v1.0.0]    │
├─────────────────────────────────────────────────────┤
│  Saved Keys: 3    Max Nodes: 50    Hash: SHA3-256  │
├─────────────────────────────────────────────────────┤
│  🔑 Generate New Key                                │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐            │
│  │ Name     │ │ Nodes    │ │ Density  │ [Generate] │
│  │ my_key   │ │ 20       │ │ 0.8      │            │
│  └──────────┘ └──────────┘ └──────────┘            │
├─────────────────────────────────────────────────────┤
│  🗂️ Saved Keys                                      │
│  ┌─────────┬───────┬────────┬─────────┬──────────┐ │
│  │ Name    │ Nodes │ Graph  │ Created │ Actions  │ │
│  ├─────────┼───────┼────────┼─────────┼──────────┤ │
│  │ test_1  │ 20    │ 1.2 KB │ 10:15   │ P  V  X  │ │
│  │ demo    │ 30    │ 2.1 KB │ 09:30   │ P  V  X  │ │
│  └─────────┴───────┴────────┴─────────┴──────────┘ │
└─────────────────────────────────────────────────────┘

Menu Location

Status > ZKP Cryptography

Dependencies

  • zkp-hamiltonian - CLI tools (zkp_keygen, zkp_prover, zkp_verifier)
  • OpenSSL (for SHA3-256)

RPCD Methods

Method Parameters Description
status - Library version, key count, paths
keygen nodes, density, name Generate graph + cycle
prove name Create NIZK proof
verify name Verify proof → ACCEPT/REJECT
list_keys - List all saved keys
delete_key name Delete key and files
get_graph name Get graph metadata

Usage

Generate a Key

  1. Enter a name for the key (e.g., my_secret)
  2. Select node count (4-50, default 20)
  3. Choose edge density (0.5-1.0, default 0.8)
  4. Click Generate

Create and Verify Proof

  1. Click Prove on a saved key
  2. Wait for proof generation
  3. Click Verify to validate
  4. Result shows ACCEPT or REJECT

File Storage

/var/lib/zkp/
├── graphs/     # Binary graph files (.graph)
├── keys/       # Hamiltonian cycle files (.key)
└── proofs/     # Generated proofs (.proof)

Protocol

The ZKP protocol proves knowledge of a Hamiltonian cycle in a graph without revealing the cycle:

  1. Prover has graph G and secret Hamiltonian cycle H
  2. Prover creates random permutation π, computes G' = π(G)
  3. Prover commits to G' edges using SHA3-256
  4. Challenge derived via Fiat-Shamir (hash of G, G', commits)
  5. Response reveals either:
    • Challenge=0: Permutation π (proves G ≅ G')
    • Challenge=1: Cycle in G' (proves H exists)
  6. Verifier checks commitments and response

Security: ~2^-128 soundness error with SHA3-256.

Building

# In OpenWrt buildroot
make package/luci-app-zkp/compile V=s

# Install
opkg install luci-app-zkp_*.ipk

Quick Deploy (Development)

# Deploy to router
scp htdocs/luci-static/resources/view/zkp/overview.js root@192.168.255.1:/www/luci-static/resources/view/zkp/
scp root/usr/libexec/rpcd/luci.zkp root@192.168.255.1:/usr/libexec/rpcd/
ssh root@192.168.255.1 'killall rpcd; /etc/init.d/rpcd start'

License

GPL-2.0-or-later

Author

SecuBox / CyberMind.FR