Building a Privacy-First URL Shortener on Blockchain
说明与用途
构建了一个隐私优先的 URL 缩短器,客户端加密链接后将密文存储在 Cronos 区块链上,服务器无法看到目标地址,提升了隐私和抗攻击能力。
问题
Traditional URL shorteners log IPs, timestamps, user agents, track browsing patterns, and sell data, creating a privacy nightmare and a single point of failure.
结果
The system provides a privacy‑first URL shortener where the server never sees the destination URL, eliminating tracking and reducing the risk of data breaches, while leveraging blockchain for censorship‑resistant storage.
工作流
- Generate a random IV and AES‑GCM key in the browser.
- Encrypt the destination URL with Web Crypto API.
- Send the ciphertext to a Cloudflare Worker.
- The Worker writes the ciphertext to the Cronos blockchain via an API call.
- When a user visits the short link, the Worker fetches the ciphertext from the blockchain.
- The browser decrypts the ciphertext locally using 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-21T06:45:46.427Z