News for hackers. Stuff that matters.
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.

See? "Fun" problem.

Re:Show HN: So.ciety, an end-to-end encrypted social network by dutchbrit on Wednesday December 03, 2014 @11:25AM (#8694562)
I agree 100%, and yes, this is a proof of concept. I want to get a desktop version completed asap & app for iOS/Android/Windows.

It will speed up the whole encryption/decryption progress too.

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.

Is this similar to what you are trying to do?

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 nhayden on Wednesday December 03, 2014 @11:32AM (#8694618)
I wonder if it'd be possible to sign the JS a site serves you, so you know it's unchanged from when you originally got it?
Re:Show HN: So.ciety, an end-to-end encrypted social network by nunyabuizness on Wednesday December 03, 2014 @11:47AM (#8694732)
You can sign it, but then your clients would have to install an extension to verify it.
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 scarmig on Wednesday December 03, 2014 @11:47AM (#8694726)
There's an FAQ about this that some kind, unknown soul from the ether of the Internet wrote awhile back:

http://matasano.com/articles/javascript-cryptography/

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.
Re:Show HN: So.ciety, an end-to-end encrypted social network by williamcotton on Wednesday December 03, 2014 @11:18AM (#8694505)
What about something like this?

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.

Re:Show HN: So.ciety, an end-to-end encrypted social network by fiatjaf on Thursday December 04, 2014 @07:44AM (#8698961)
Instead of focusing on an installable client you should use these new techniques: http://substack.net/offline_decentralized_single_sign_on_in_...
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 dutchbrit on Wednesday December 03, 2014 @01:02PM (#8695278)
Sorry about that, a redirect occurs to /login when you aren't authenticated, I will get this solved asap.

Will make the homepage a bit more informative too.

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 dutchbrit on Wednesday December 03, 2014 @05:02PM (#8696588)
Strange, I haven't encountered any real issues on android yet, will try tomorrow on a virtual machine.

JavaScript needs to be turned on, otherwise it will indeed show nothing content wise (angularjs)

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 dutchbrit on Wednesday December 03, 2014 @05:30PM (#8696760)
I'll keep an eye out, maybe it was due to high traffic or something, but I can understand how confusing it must of been! Thanks for checking it out :)
Re:Show HN: So.ciety, an end-to-end encrypted social network by matthuggins on Thursday December 04, 2014 @02:18PM (#8701063)
No, I mean I clicked on the HN link, and that's all I was presented with. Chrome for Android.
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 dutchbrit on Wednesday December 03, 2014 @10:33AM (#8694210)
AngularJS, Express, Socket.io & MongoDB. However, I'm considering switching over to Postgres.

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.

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.

Keep MongoDB on it's own server.

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.

Other than that, nice idea.

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?
Re:Show HN: So.ciety, an end-to-end encrypted social network by dutchbrit on Wednesday December 03, 2014 @10:25AM (#8694163)
Quick note, this is currently a proof-of-concept (work in progress).
Re:Show HN: So.ciety, an end-to-end encrypted social network by nhayden on Wednesday December 03, 2014 @11:33AM (#8694630)
I've always thought this was a good idea, glad to see someone doing it.
Re:Show HN: So.ciety, an end-to-end encrypted social network by dutchbrit on Wednesday December 03, 2014 @11:38AM (#8694671)
Thanks!
Re:Show HN: So.ciety, an end-to-end encrypted social network by djb_hackernews on Wednesday December 03, 2014 @11:29AM (#8694591)
Your bitcoin plea breaks the back button. Not cool.
Re:Show HN: So.ciety, an end-to-end encrypted social network by dutchbrit on Wednesday December 03, 2014 @11:38AM (#8694670)
Yikes, I didn't know that (will remove the link on it)
Re:Show HN: So.ciety, an end-to-end encrypted social network by walshie4 on Wednesday December 03, 2014 @12:26PM (#8695018)
Any chance on open-sourcing this?
Re:Show HN: So.ciety, an end-to-end encrypted social network by dutchbrit on Wednesday December 03, 2014 @12:41PM (#8695114)
I probably will yes