TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Cryptob.in – A snippet share tool with client-side encryption

19 pointsby viktorelofssonover 7 years ago

3 comments

tptacekover 7 years ago
1. Nothing like this is ever safe; the server can surreptitiously feed you JS that will fatally compromise your encryption.<p>2. This one is even worse, because it loads scripts from CDNs, all of which can compromise the encryption on the page.<p>3. If you&#x27;re going to put Google Analytics on a page that purports to encrypt data clientside, you might as well just build a front-end to Google Docs, because you&#x27;ve given Google access to the content of the pages anyways. (I think a simplified Google Docs front-end is a fine thing to build, more useful for security than &quot;clientside&quot; encryption).<p>4. You&#x27;re encrypting with unauthenticated CBC mode, which is obviously insecure.<p>5. It&#x27;s unsafe to compress before encrypting; doing so creates traffic-analytic side channels. There&#x27;s a whole thread of TLS vulnerabilities stemming from compression occurring at various points of the web stack.<p>If you really want to build something like this, my recommendation is:<p>1. Switch from a web page to a web extension, which will obvious most of the serverside dependency problem.<p>2. Stop using CryptoJS, which is extraordinarily difficult to use &quot;properly&quot;, and use a Javascript NaCL implementation instead.
评论 #15725871 未加载
评论 #15727697 未加载
评论 #15725923 未加载
viktorelofssonover 7 years ago
I&#x27;ve implemented all points that @tptacek mentioned (except the web extension, that will be a future update), and will also activate HSTS when I feel comfortable with the server setup.<p>I switched from CryptoJS to TweetNaCl which seemed fit to purpose, and also moved all CDN depencencies locally as well as removed Google Analytics :)
评论 #15727674 未加载
cpachover 7 years ago
Snyggt! I really like the UX and layout. Clean, simple and at the same time really fresh and modern. Would love to see any other projects you’ve made!
评论 #15729677 未加载