Re:Show HN: So.ciety, an end-to-end encrypted social network
by tptacek on Wednesday December 03, 2014 @11:05AM
(#8694419)
As drily as I can, given the rules of Show HN, but it's not end-to-end if the crypto is delivered over browser Javascript. Every time a user's browser touches your server for any reason, the server has the option to fatally compromise security. End-to-end means you don't have to trust the server; that's real privacy.
So, given that this is a proof-of-concept, my advice is to back off on the web app part of this, and develop an installable client.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by onion2k on Wednesday December 03, 2014 @11:59AM
(#8694823)
In the same way that we trust bcrypt when we get the source from somewhere we know, it would be possible to make an encryption module in JS that gets imported from a trusted location eg https://github.com/shaneGirish/bcrypt-nodejs/blob/master/bCr.... So long as the web app imports that version, and checks it against a hash from another trusted location then it would be possible to get true end-to-end encrpytion entirely in a browser without trusting some random server. You'd 'just' have to trust Github (or any other trustworthy server) instead.
[1] That's specifically for Node, but it could be tweaked to work in browsers.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by tptacek on Wednesday December 03, 2014 @12:02PM
(#8694844)
No, you can't do that, because browser Javascript lacks a mechanism to segregate one "module" from another. In fact, any page that merely populates the DOM can override any security decision made by any Javascript file.
This idea comes up a lot, and nobody's ever explained to me a workable method for doing an integrity check of the entire Javascript runtime associated with a specific site. It's not as easy to do as it sounds.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by evv on Wednesday December 03, 2014 @01:46PM
(#8695573)
You're right, but these sorts of browser apps will continue to be made because of the convenience.
The cheapest browser-app integrity check that I know of is shipping the dev code, complete with source maps. Allow anyone to read and debug what is going on inside your app.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by tptacek on Wednesday December 03, 2014 @02:38PM
(#8695869)
That doesn't work either, because the app users read can be totally different than the app that ends up running the next time the DOM updates itself in the background.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by gprasanth on Wednesday December 03, 2014 @12:33PM
(#8695063)
How about this:
I install git server, I add a person's public key to authorized_keys to allow him to git checkout/clone, and I keep committing with my own username and push whenever I want to update.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by rubbingalcohol on Wednesday December 03, 2014 @11:11AM
(#8694458)
tptacek is right. In order to trust your crypto we have to trust that your server isn't compromising your crypto via malicious JavaScript, so when you claim that we don't have to trust the server, you're asking us to both trust and not trust the server.
You could do a Chrome extension with all the frontend code baked into the extension's static JavaScript. Firefox still has no sandboxing for add-ons, so you wouldn't have luck there.
Desktop / installed apps would be the way to go. See https://turtl.it for an example of this (shameless plug)
Re:Show HN: So.ciety, an end-to-end encrypted social network
by handsomeransoms on Wednesday December 03, 2014 @03:09PM
(#8696060)
I think it's theoretically possible to use Service Workers to do this, giving you a TOFU trust guarantee, although I think there are some issues due to the spec-mandated auto-updating of Service Workers every 24 hours.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by dutchbrit on Wednesday December 03, 2014 @11:51AM
(#8694758)
Indeed. Protonmail has the same issue. However, I'm wanting to release a desktop & mobile app as soon as possible, to phase out the browser version. This is just a proof of concept for now.
Edit: This article describes a solution that uses an appcache manifest with a far-future max-age that stops the browser from refetching the application code. It then uses an alternative mechanism to load updates presumably with a future option capable of verifying the legitimacy of the code with some sort of public key infrastructure ala Microsoft's Authenticode.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by palakchokshi on Wednesday December 03, 2014 @01:00PM
(#8695261)
Some feedback on the landing page. Please don't hijack my browser's Back button so clicking back just stays on your site. Please provide more visuals before signup especially if you claim my account might get deleted while you develop this thing. Did not sign up, did not understand exactly how you plan to keep the information secure and private from that short blurb on the landing page. Wouldn't trust you with my data.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by matthuggins on Wednesday December 03, 2014 @11:56AM
(#8694801)
All I see is a page that says "Do you like this concept? Please donate via Bitcoin and help me build this further: 1CietyCHJi42RR1xb1nxVkdrdsRu3PbD5s". Am I missing something?
Re:Show HN: So.ciety, an end-to-end encrypted social network
by dutchbrit on Wednesday December 03, 2014 @12:01PM
(#8694836)
Do you mean after signing up? You can post a message - when you sign up, you don't have any friends or posts, so what you're essentially seeing is the footer. I will make this more clear - thanks for bringing it up.
If you can't even see the login/register part, may I ask which browser you are using?
Re:Show HN: So.ciety, an end-to-end encrypted social network
by oneeyedpigeon on Wednesday December 03, 2014 @03:24PM
(#8696123)
I get the same, on mobile (nexus 5, kitkat). This behaviour also occurs if javascript is disabled. I'm guessing, because of the back-button-breaking, that you've implemented the redirect using javascript - correct?
Re:Show HN: So.ciety, an end-to-end encrypted social network
by oneeyedpigeon on Wednesday December 03, 2014 @05:21PM
(#8696704)
Well, I've checked again and now, to be honest, it looks fine. I'm certain it didn't process the redirect earlier, and I know this isn't the most helpful bug report in the world - sorry! I'll let you know if it happens again.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by inovica on Wednesday December 03, 2014 @10:31AM
(#8694201)
Looks quite interesting. What did you create this with? I think you should have a better intro and maybe some video or something to outline what it is without people needing to log in
Re:Show HN: So.ciety, an end-to-end encrypted social network
by Xeoncross on Wednesday December 03, 2014 @02:17PM
(#8695759)
If it's a single server then PostgreSQL would certainly give the best performance considering how invasive MongoDB is. However, I'm sure you'll soon grow to multiple servers so that wouldn't be as big of a problem.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by eclipse31 on Wednesday December 03, 2014 @12:32PM
(#8695060)
I agree, a better intro, or a link to/picture of a sample profile would be nice. I hate having to sign up for things before I can see what I'm getting myself into.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by Xeoncross on Wednesday December 03, 2014 @01:57PM
(#8695639)
Building a social network takes a lot of work. If you open source this codebase you will have people to help you build it and you will get the product launched faster.
As long as we can trust you to share your code, we don't mind helping you build this and using your server as the network hub. If the server was ever taken over, only a couple days (or hours) worth of posts would be compromised before someone noticed.
That is no comparison to google plus, facebook, or hacker news - even with nasty in-browser encryption.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by dutchbrit on Wednesday December 03, 2014 @02:07PM
(#8695701)
The more help, the better! I will be open sourcing this ASAP, just want to iron out the biggest bugs and clean up the source (just a little) before putting it on Github.
Giving access to my server however isn't something I'd really consider, without physically being next to the person.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by Xeoncross on Wednesday December 03, 2014 @02:15PM
(#8695750)
Oh, I wasn't suggesting that you give access to your server. Just that I wouldn't mind using a site hosted on your server (it has to be hosted somewhere).
Re:Show HN: So.ciety, an end-to-end encrypted social network
by GrinningFool on Wednesday December 03, 2014 @02:17PM
(#8695760)
Interesting POC, I'll be keeping an e ye on it.
I wanted to thank you for meaningful text right there on the landing page that tells me exactly what the project is (and isn't). No needless scrolling, no giant-sized pictures that convey nothing. Just a concise description and a login box.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by subpixel on Wednesday December 03, 2014 @03:54PM
(#8696283)
Wow - I thought you had dropped six figures on the .ciety TLD at first glance. I couldn't figure out whether that was genius or stupid. Thankfully you didn't do that, so I don't have to figure that out.
Re:Show HN: So.ciety, an end-to-end encrypted social network
by AdmiralAsshat on Wednesday December 03, 2014 @11:05AM
(#8694409)
Might be cool for some technical discussion forms between other security-conscious, although as far as practical value goes, I'd probably have about as much luck getting my friends to use it as using PGP...
Re:Show HN: So.ciety, an end-to-end encrypted social network
by shazow on Wednesday December 03, 2014 @02:41PM
(#8695881)
Any reason why it makes sense to ask for two different passwords? If we're going to trust the Javascript, then does it make sense to derive the server-side password from the same client-side password?
So, given that this is a proof-of-concept, my advice is to back off on the web app part of this, and develop an installable client.
[1] That's specifically for Node, but it could be tweaked to work in browsers.
This idea comes up a lot, and nobody's ever explained to me a workable method for doing an integrity check of the entire Javascript runtime associated with a specific site. It's not as easy to do as it sounds.
The cheapest browser-app integrity check that I know of is shipping the dev code, complete with source maps. Allow anyone to read and debug what is going on inside your app.
See? "Fun" problem.
It will speed up the whole encryption/decryption progress too.
I install git server, I add a person's public key to authorized_keys to allow him to git checkout/clone, and I keep committing with my own username and push whenever I want to update.
Is this similar to what you are trying to do?
You could do a Chrome extension with all the frontend code baked into the extension's static JavaScript. Firefox still has no sandboxing for add-ons, so you wouldn't have luck there.
Desktop / installed apps would be the way to go. See https://turtl.it for an example of this (shameless plug)
http://matasano.com/articles/javascript-cryptography/
http://substack.net/offline_decentralized_single_sign_on_in_...
Edit: This article describes a solution that uses an appcache manifest with a far-future max-age that stops the browser from refetching the application code. It then uses an alternative mechanism to load updates presumably with a future option capable of verifying the legitimacy of the code with some sort of public key infrastructure ala Microsoft's Authenticode.
Will make the homepage a bit more informative too.
If you can't even see the login/register part, may I ask which browser you are using?
JavaScript needs to be turned on, otherwise it will indeed show nothing content wise (angularjs)
Encryption wise, I'm using CryptoJS for AES256 and OpenPGP.js for PGP.
All messages get encrypted in AES256 with a randomly created passphrase. The passphrase is then distributed to the recipients using PGP.
Keep MongoDB on it's own server.
Other than that, nice idea.
As long as we can trust you to share your code, we don't mind helping you build this and using your server as the network hub. If the server was ever taken over, only a couple days (or hours) worth of posts would be compromised before someone noticed.
That is no comparison to google plus, facebook, or hacker news - even with nasty in-browser encryption.
Giving access to my server however isn't something I'd really consider, without physically being next to the person.
I wanted to thank you for meaningful text right there on the landing page that tells me exactly what the project is (and isn't). No needless scrolling, no giant-sized pictures that convey nothing. Just a concise description and a login box.