Building a Privacy-First URL Shortener on Blockchain
说明与用途
构建了一个隐私优先的 URL 缩短器,使用客户端加密并将加密后的 URL 存储在 Cronos 区块链上,浏览器本地解密,服务器无法看到目标 URL,消除了集中式数据库风险。
问题
Traditional URL shorteners log user data, track browsing patterns, and sell data, creating privacy risks and a single point of failure.
结果
The system provides a privacy‑first URL shortener where the server never sees the destination URL, no centralized database exists, and data is stored immutably on a blockchain, reducing hacking and censorship risks.
工作流
- 1. User enters a URL in the client UI.
- 2. Client generates a random IV and AES‑GCM key using Web Crypto API.
- 3. Client encrypts the URL buffer with the key and IV.
- 4. Client sends the ciphertext to a Cloudflare Worker endpoint.
- 5. Worker writes the ciphertext to the Cronos blockchain via a transaction.
- 6. Worker returns a short code (hash of transaction or stored key).
- 7. User shares the short link (cryptly.workers.dev/
<code>). - 8. When the link is visited, the browser fetches the ciphertext from the blockchain via the Worker.
- 9. Browser decrypts the ciphertext locally with the stored key and IV.
- 10. Browser redirects to the original destination URL without exposing it to any server.
证据
Encrypted URL stored on Cronos blockchain
Server never sees destination
- 记录日期: 2026-09-05T18:45:35.084Z