Inspiration
Most security dashboards trust whoever is already inside the network, and the keys that protect sensitive data usually sit in one place. We wanted to build a platform where no single user, node or key is trusted by default. We combined NIST SP 800-207 Zero-Trust principles with the mathematics from this hackathon: finite-field arithmetic, polynomial interpolation and threshold cryptography.
What it does
SecureMesh is a full-stack Zero-Trust security platform with two tracks.
Track 1: Advanced Cryptography (MPC & Secret Sharing)
- Finite-field arithmetic over a 256-bit prime field, p = 2^256 − 189.
- (k, n) Shamir's Secret Sharing, with the polynomial evaluated by Horner's method.
- Lagrange interpolation to rebuild the secret f(0) from any k shares.
- Per-share commitment hashes so nodes can check shares before reconstruction.
- Collaborative threshold signing, where nodes contribute partial signatures and the full key is never assembled.
- An interactive "MPC Secret Sharing Studio" in the UI to split, select shares and reconstruct live.
Track 2: Secure Autonomous AI Agent (MeshGuard-01)
- The agent ingests threat telemetry: anomaly score A, identity risk I and severity S.
- It computes a trust score: T = 100 − (0.4A + 0.4I + 0.2S).
- If T < 40 or severity is HIGH/CRITICAL, it runs AUTONOMOUS_LOCKDOWN_AND_ENCRYPT. It encrypts the data with AES-256-GCM and splits the key into (3, 5) Shamir shares across mesh nodes.
- Every decision gets a SHA-256 attestation proof that binds the agent ID, timestamp, input digest and resulting state.
Platform features
- Weighted risk engine: R = 100·(w_I·I + w_A·A + w_C·C + w_P·P).
- Zero-Trust policy decisions: ALLOW / STEP_UP / DENY, with role-based access (admin, analyst, viewer).
- Rule-based threat detection (for example, repeated failed logins) that raises alerts and incidents with notes.
- AES-256-GCM file encryption, decryption and integrity verification.
- Tamper-evident audit log, built as a SHA-256 hash chain with a verify endpoint.
- Asset network graph, incident management, CSV/report export and a React dashboard with 12 pages.
How we built it
- Backend: Python, FastAPI, SQLAlchemy (SQLite), Pydantic, JWT auth (python-jose) with bcrypt password hashing, the
cryptographylibrary for AES-256-GCM, and NetworkX for the asset graph. - Frontend: React 19, TypeScript, Vite, Recharts, Axios and Lucide icons.
- Math core: our own Shamir Secret Sharing in plain Python big integers, with no external MPC library. We used Horner evaluation, Lagrange interpolation, and modular inverse by Fermat's little theorem.
- Deployment: frontend on Vercel, backend on Hugging Face Spaces (Docker).
- Testing: 35 automated pytest tests plus an end-to-end verification script.
Challenges we ran into
- Making the secret sharing correct for 256-bit values. Every step needs the same prime modulus, and secrets must fit inside the field.
- Keeping the agent explainable. Every autonomous decision has to be reproducible from its inputs and carry a verifiable proof.
- Designing the tamper-evident audit chain so that changing any past record is detected.
- Deploying the frontend and backend separately, and getting auth and CORS to work across them.
Accomplishments that we're proud of
- A complete, working Shamir + Lagrange implementation with an interactive visual studio.
- An autonomous agent that detects a threat, encrypts the data, splits the key across nodes and attests to the whole action.
- A hash-chained audit trail, role-based access control and a full Zero-Trust decision engine in one platform.
- 35 passing automated tests and a live public deployment.
What we learned
- How Shamir's scheme gives information-theoretic security: any k−1 shares reveal nothing about the secret.
- How to turn security policy into measurable math, using weighted risk scores and trust formulas.
- Why verifiable, attested automation matters when an AI agent is allowed to act on its own.
- How to design a full-stack system around Zero-Trust from the start rather than bolting it on.
What's next for SecureMesh
- Full Feldman VSS with discrete-log commitments, so share verification is based on g^(a_j) mod p.
- Real distributed validator nodes instead of simulated ones.
- Persistent production database, MFA, and signed attestation proofs.
Built With
- aes-256-gcm
- bcrypt
- docker
- fastapi
- hugging-face
- jwt
- multi-party-computation
- networkx
- python
- react
- recharts
- shamir-secret-sharing
- sqlalchemy
- sqlite
- typescript
- vercel
- vite
- zero-trust