$ show schollz/e2ecp
This repository implements an end-to-end encrypted file transfer system called e2ecp. It consists of a Go-based relay server, a CLI client, and a React web frontend. The system allows users to transfer files or text between peers with zero-knowledge encryption: the relay server never sees plaintext data or metadata. It also supports user accounts with encrypted cloud storage, file sharing via links, device authentication, and email verification. The architecture is a monolith with a WebSocket relay, HTTP API, PostgreSQL database, and separate client implementations. Key entry points are the CLI (main.go), the relay server (src/relay/relay.go), and the React app (web/src/App.jsx). The codebase is well-structured with comprehensive testing, CI/CD, and Docker support. However, there are some maintenance risks such as duplicated protobuf schemas between Go and JavaScript, and the use of a future Go version (1.25) in go.mod, which may indicate dependency drift.
The LLM identified 4 files worth highlighting for reuse:
Provides core cryptographic primitives: ECDH P-256 key pair generation, shared secret derivation, AES-GCM encryption/decryption, PBKDF2 key derivation, and SHA256 hashing. This package is self-contained (no internal imports) and could be extracted as a standalone Go crypto library for any project requiring similar operations.
Implements zip archive creation from a directory and extraction to a directory with security measures: zip-slip path traversal protection and bomb detection (file size limits). The functions are self-contained and reusable for any Go project needing safe zip operations.
Generates QR codes in the terminal using half-block Unicode characters. It takes a string and renders a QR code as ASCII art. This is a self-contained utility that can be reused in any Go CLI application that needs to display QR codes without external dependencies.
Implements browser-side encryption using the Web Crypto API: ECDH key generation, shared secret derivation, AES-GCM encrypt/decrypt, and PBKDF2 key derivation. This module is self-contained and can be reused in any web application requiring client-side encryption compatible with the Go crypto package.