# Unwrap

> A zero-knowledge Secret Santa web app, REST API, and dual MCP server built in Rust on Cloudflare Workers and D1, featuring WebAuthn passkeys and end-to-end encrypted anonymous chat.

Status: active

Technologies: Rust, Cloudflare Workers, Cloudflare D1, WebAuthn, WebCrypto, TypeScript, MCP, Terraform

GitHub: https://github.com/Amrithnath/Unwrap

Live: https://secret-santa.y4glory.com/

Project link: https://secret-santa.y4glory.com/

Write-ups: None linked

**Unwrap** (`v1.0.0-beta.1`) is a privacy-first Secret Santa web application, versioned REST API, and dual MCP server written in **Rust** (compiled to Wasm) and deployed on **Cloudflare Workers + D1**.

## Highlights

- **Zero-Knowledge Matching & Messaging:** Client-side P-256 ECDH ECIES and AES-256-GCM encryption (with fixed-length ciphertext padding and shuffled SQLite inserts) ensure neither the organizer nor the database operator can see who is gifting whom.
- **Per-Game Reveal Policy:** Games default to **Secret Forever** (no reveal manifest stored anywhere) or optional **Admin Reveal** verified via a salted SHA-256 commitment once every participant confirms shipping and unwrapping.
- **Pluggable Matching Algorithms:** Supports both **Single Cycle** (Hamiltonian cycle) and **Random Derangement** (multi-cycle of 3+) with pre-draw exclusions, audited redraws, and idempotent mutations.
- **Passwordless WebAuthn Passkeys:** Pure-Rust ES256 verification with WebAuthn PRF hardware-backed private key wrapping for 1-tap biometric sign-in and match decryption.
- **AI Agent & API Ready:** Versioned REST API (`/api/v1/*` + OpenAPI 3.1), hosted Remote Streamable HTTP MCP server (`/mcp`), and a native Rust local zero-knowledge stdio MCP binary (`santa-mcp`).
- **Consensus Passphrase Recovery:** Participant quorum polls can recover organizer access, while the real admin retains veto power.
- **Secure Participant Recovery:** Admin-initiated one-time reset links pair with self-service PIN rotation.
- **Hardened Retention:** 30-day and 60-day data-retention policies automatically reduce retained game and account data.
- **Operational Controls:** Cloudflare Workers Observability and feature flags provide runtime visibility and controlled rollouts.

## Screenshots

![Unwrap organizer console](/images/projects/unwrap-admin.webp)

![Unwrap locally decrypted match and encrypted two-way chat](/images/projects/unwrap-player-match.webp)

Live at [secret-santa.y4glory.com](https://secret-santa.y4glory.com/).

Canonical page: https://amrithnath.dev/project/webDev/unwrap/
