Building a Privacy-First URL Shortener on Blockchain
说明与用途
构建了一个隐私优先的 URL 缩短器,客户端加密后将数据存储在区块链上,服务器永远看不到目标 URL,消除了单点故障。
问题
Traditional URL shorteners log IPs, timestamps, user agents, track browsing patterns, and sell data, creating a privacy nightmare and a single point of failure if the database is hacked.
结果
The system achieves a privacy‑first URL shortener where the server never sees destination URLs, no tracking or analytics are performed, and data is stored on a censorship‑resistant blockchain, eliminating a single point of failure.
工作流
- Generate a random IV and AES‑GCM key in the browser.
- Encrypt the target URL with Web Crypto API using the key and IV.
- Send the encrypted payload to a Cloudflare Worker endpoint.
- The Worker writes the encrypted data to the Cronos blockchain via a smart contract.
- When a user visits the short link, the Worker fetches the encrypted payload from the blockchain.
- The browser decrypts the payload locally with the same key and IV.
- The browser redirects to the original URL without exposing it to any server.
证据
Encrypted URL stored on Cronos blockchain
Server never sees destination
- 记录日期: 2026-09-15T17:30:27.806Z