News for hackers. Stuff that matters.
Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @03:55PM (#13009117)
The Riot blog post is only half the story - all the juicy details for Matrix itself are over at https://matrix.org/blog/2016/11/21/matrixs-olm-end-to-end-en...

A critical thing is that the crypto library (olm) has had an independent security assessment from NCC Group: you can see their report at https://www.nccgroup.trust/us/our-research/matrix-olm-crypto...

Re:Riot releases end-to-end encryption: get ready to chat se... by CiPHPerCoder on Monday November 21, 2016 @04:25PM (#13009348)
This is a good move on their part.

From a quick scan of the PDF, it looks like their higher-level Matrix library mitigates attacks that Olm itself does not.

I'm not sure how I feel about that.

Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @05:18PM (#13009749)
yeah, this was a tricky one. Many of the problems NCC found are concerned with using the library correctly. For instance, if an app wants to turn off PFS for instance, it can. Technically this means that the library has a PFS vulnerability. However, sometimes this is a feature - e.g. if I want to be able to deliberately decrypt history to sync it to a new device.

We're looking at ways to try to better split the higher level crypto stuff into another library (which we'll then get NCC to audit) - but until then matrix-{js,ios,react}-sdk have implemented it separately.

Re:Riot releases end-to-end encryption: get ready to chat se... by maurusus on Tuesday November 22, 2016 @02:06PM (#13016563)
How does this compare to Threema (which uses NaCl)?
Re:Riot releases end-to-end encryption: get ready to chat se... by niftich on Tuesday November 22, 2016 @03:02PM (#13017131)
Threema does not provide individual message level forward secrecy. From their whitepaper [1]:

> "Due to the inherently asynchronous nature of mobile messengers, providing reliable Forward Secrecy on the end-to-end layer is difficult. Key negotiation for a new chat session would require the other party to be online before the first message can be sent. Experimental schemes like caching pre-generated temporary keys from the clients on the servers increase the server and protocol complexity, leading to lower reliability and more potential for mistakes that impact security. The user experience can also be diminished by events that are not under the control of the sender, for example when the recipient loses their phone's data, and along with it the ephemeral keys. Due to these and the following considerations, Threema has implemented Forward Secrecy on the transport layer only"

Moxie writing about forward secrecy and key derivation ratcheting in November 2003 [2]:

> "it's not clear why individual message level forward secrecy is necessary. Instant messaging sessions tend to be ephemeral, and the messages themselves tend to be in memory for the duration of the session, so it's not entirely obvious what immediate value a ratcheting forward secrecy protocol provides in that context. Simply doing an ephemeral Diffie-Hellman key exchange at the beginning of every session would probably be enough."

He then goes on to lay out why individual message level forward secrecy is nonetheless desirable; this is not quoted.

Moxie writing about forward secrecy and async messaging in August 2013 [3]:

> "On the other hand, iOS apps like Threema and the proposed Heml.is support asynchronous messaging, but do not provide forward secrecy. Users have static public keys that are maintained by a server, which anyone else can query and encrypt to without having to engage in a key exchange round trip to the user. This allows for the frictionless asynchronous experience that mobile users have come to expect, but unfortunately relies on an undesirable cryptographic protocol model (the PGP model) that is increasingly being seen as an architectural dead end.

[1] https://threema.ch/press-files/cryptography_whitepaper.pdf [2] https://whispersystems.org/blog/advanced-ratcheting/ [3] https://whispersystems.org/blog/asynchronous-security/

Re:Riot releases end-to-end encryption: get ready to chat se... by bnjms on Monday November 21, 2016 @01:53PM (#13008016)
For those who check comments before following through to the story Riot is the main web interface for the Matrix project, the opensouce IRC and slack alternative. And Riot was formerly named Vector.From the look of it the project is going great.
Re:Riot releases end-to-end encryption: get ready to chat se... by lockyc on Monday November 21, 2016 @02:30PM (#13008379)
Also, here's the link to the app https://riot.im/. Since it doesn't seem to be anywhere on the blogpost.
Re:Riot releases end-to-end encryption: get ready to chat se... by Pfhreak on Monday November 21, 2016 @01:43PM (#13007915)
I thought this was about League of Legends at first, and I was terrified that Riot was going to make it harder to chase down toxic chat in their game.
Re:Riot releases end-to-end encryption: get ready to chat se... by bpicolo on Monday November 21, 2016 @02:04PM (#13008130)
Doesn't help that the first 4 google search results for "riot chat" are League of Legends sites
Re:Riot releases end-to-end encryption: get ready to chat se... by aczerepinski on Monday November 21, 2016 @05:15PM (#13009726)
Same, especially since the gaming Riot has blogged about their very impressive chat infrastructure in the past.
Re:Riot releases end-to-end encryption: get ready to chat se... by ClassyJacket on Monday November 21, 2016 @07:08PM (#13010485)
And about making improvements to network architecture.

https://engineering.riotgames.com/news/fixing-internet-real-...

Honestly at this point, this Riot should probably give up and change their name. It didn't occur to me this could be about a different Riot.

Re:Riot releases end-to-end encryption: get ready to chat se... by detaro on Tuesday November 22, 2016 @08:32AM (#13013961)
They just recently changed their name to Riot... (from "Vector")
Re:Riot releases end-to-end encryption: get ready to chat se... by justaman on Monday November 21, 2016 @02:53PM (#13008560)
Because when someone is calling my mom a fag on the internet, I want that to be encrypted.
Re:Riot releases end-to-end encryption: get ready to chat se... by huangc10 on Monday November 21, 2016 @04:47PM (#13009527)
Same. It's tough when the name of your company/product has the same name as the producer of one of the largest and most successful multiplayer games ever built. 0_0
Re:Riot releases end-to-end encryption: get ready to chat se... by Eric_WVGG on Monday November 21, 2016 @04:34PM (#13009414)
Same. “Okay, so now hackers and the CIA won’t know that some teenage punk called me a ‘homersexual faglord’, that’s just terrific.”
Re:Riot releases end-to-end encryption: get ready to chat se... by duiker101 on Monday November 21, 2016 @01:59PM (#13008075)
they should get 2 factor authentication before worrying about having end to end encryption in their chat.
Re:Riot releases end-to-end encryption: get ready to chat se... by CiPHPerCoder on Monday November 21, 2016 @02:35PM (#13008412)
http://matrix.org/docs/guides/e2e_implementation.html

I need to tear into this later, but I really hope they're not implementing multi-party ECDH (which is perilous even if you're using X25519; if anyone thinks about going down this route, please hire a cryptographer).

Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @03:53PM (#13009101)
we're not. plus we hired cryptographers: https://www.nccgroup.trust/us/our-research/matrix-olm-crypto... :)
Re:Riot releases end-to-end encryption: get ready to chat se... by CiPHPerCoder on Monday November 21, 2016 @03:56PM (#13009127)
Excellent! This should go in a top-level comment so folks can review the audit and study its findings.
Re:Riot releases end-to-end encryption: get ready to chat se... by no_protocol on Monday November 21, 2016 @03:50PM (#13009078)
They say that their "Olm" library is an implementation of the "Double Ratchet" algorithm:

https://whispersystems.org/docs/specifications/doubleratchet...

Re:Riot releases end-to-end encryption: get ready to chat se... by godelski on Monday November 21, 2016 @03:19PM (#13008786)
For someone who knows very little about this subject, could you elaborate?
Re:Riot releases end-to-end encryption: get ready to chat se... by CiPHPerCoder on Monday November 21, 2016 @03:39PM (#13008982)
I'm working on publishing some research in this specific slice of cryptography in the next couple of weeks, but briefly.

Alice, Bob, and Charlie are chatting securely. Using the notation where lowercase indicates secret key and uppercase indicates public keys:

  s0 = aBC = bAC = cAB
Debora joins the conversation.

  s1 = aBCD = bACD = cABD = dABC
What does Debora see? In naive implementations, the output of the previous handshake (s0) is given to Debora to mix with her secret key. This isn't a good design (and you can't do this with the implementations of X25519 I've reviewed, e.g. libsodium's), but that's not obvious to someone who's never studied these kind of protocols before.

Now they decide to oust Charlie from the group. How do you handle revocation safely and efficiently?

If you combine the two issues above, you create a join-slurp-leave loop that gives you the secret keys of conversations that take place while you are absent. (This is an active attack, of course.)

Let's say Bob's laptop is stolen. Does mpECDH have forward security-baked in? No. (Protocols like Signal's do.)

So you add forward secrecy. Great, now how do you know the server isn't replacing public keys since they're changing frequently?

These are just a sample of the kind of challenges one faces when they venture down this road. If you ask almost any cryptographer, they'll have a somewhat reasonable answer for these challenges. But a non-crypto dev would, with all likelihood, not think to even ask.

Re:Riot releases end-to-end encryption: get ready to chat se... by godelski on Monday November 21, 2016 @09:11PM (#13011066)
That makes a lot more sense. Thank you for the reply.
Re:Riot releases end-to-end encryption: get ready to chat se... by hackuser on Monday November 21, 2016 @02:06PM (#13008143)
Would someone kindly explain what Riot and Matrix are, who is behind them, etc.?

It's great to see them implementing this. If you're company is not, please get busy - IMHO it should be the norm now.

https://www.eff.org/deeplinks/2016/11/tech-companies-fix-the...

Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @04:19PM (#13009313)
Matrix.org is a non-profit open source project that publishes an open standard for decentralised interoperable communications (IM, VoIP, etc), an example server implementation and a bunch of example client SDKs, bridges, bots, etc. 'Matrix' is the name of the resulting ecosystem on the 'net.

Riot.im is one of the various client apps for Matrix, supporting iOS & Android, and is probably the most advanced at this point.

EDIT: clarify org structure: Matrix.org is being set up as a non-profit UK company owned by the various individuals running it. The business model is to create a new ecosystem for interoperable comms that everyone can benefit from.

Riot is a for-profit company (technically called Vector Creations Ltd) which is a subsiduary of Amdocs (a big telco supplier company). The business model is to offer paid hosted services in future for users wanting commercial-grade hosting and hosting private bots/bridges/etc.

Re:Riot releases end-to-end encryption: get ready to chat se... by X4lldux on Monday November 21, 2016 @05:55PM (#13010031)
Since you are UK-based and Snooper's Charter is a thing now, how will that affect Riot/Matrix? Will you be moving the official base to some countries with greater respect for privacy?
Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @06:21PM (#13010234)
Well, you can always use Riot with a Matrix server in whatever country you like (or run by a company HQ'd in whatever country). And the code is all open, so you can always check for backdoors or build your own copy. For folks worried about the security of the default hosted service for Riot I guess we could set up a canary or something but I really hope we won't get to that :(

(Also, in practice Riot is half UK and half French - although France has its own fair share of crypto confusion).

Re:Riot releases end-to-end encryption: get ready to chat se... by mxuribe on Monday November 21, 2016 @04:21PM (#13009320)
I'll start right off the bat: I'm not affiliated with the riot chat or matrix crew, however, I am an enthusiastic user of both technologies. So any of the following is what I've learned, and not any official communications...

Matrix is a protocol for decentralized communication. Plenty more info can be gained from their FAQ: http://matrix.org/docs/guides/faq.html The gist: the protocol can theoretically be used for decentralized chat, WebRTC, and comms between internet of things...With decentralized chat so far appearing to be the most popular. As to your question on the "Who is behind" this? See: http://matrix.org/docs/guides/faq.html#who-is-funding-matrix...

Riot (aka Riot chat, formerly known as Vector.im) is one of a number of client applications for interacting with Matrix servers. More clients can be found here: http://matrix.org/docs/projects/try-matrix-now.html#clients

Also, the folks who created Riot/Vector, manage a public matrix homeserver that anyone can join. See https://riot.im Naturally, the point of this being a decentralized effort (and shying away from silos), you don't have to create an account on the riot.im homeserver, but in fact can setup/manage your own (matrix) homeserver! You know...like email used to be more decentralized ;-)

Cheers!

Re:Riot releases end-to-end encryption: get ready to chat se... by hackuser on Monday November 21, 2016 @06:22PM (#13010245)
Thank you! How mature is it? How usable is it - usable for the HN crowd? Power users? Typical end users?
Re:Riot releases end-to-end encryption: get ready to chat se... by philsnow on Monday November 21, 2016 @09:10PM (#13011057)
I have a private homeserver set up and I tell my (nontechnical) wife to fall back to using Riot on her phone to talk to me if / when hangouts doesn't seem to work.

We end up talking on Riot instead of hangouts roughly 1x / month, and I've had no troubles with it so far (except that the matrix server seems to want to use way more memory than I think it "should", so I have it running in a loop that restarts the server whenever the OOM killer kills it. It gets killed fairly regularly (>1x / hour) and I don't really notice it while using Riot).

edit: I don't use the e2e encryption stuff. I have an SSL cert and if chat messages are encrypted as far as the server (which I control), that's fine with me.

Re:Riot releases end-to-end encryption: get ready to chat se... by neutral16 on Tuesday November 22, 2016 @08:32AM (#13013960)
https://github.com/matrix-org/synapse#help-synapse-eats-all-...

I launch my instance like this: SYNAPSE_CACHE_FACTOR=0.01 synctl restart /etc/matrix-synapse/homeserver.yaml

I run synapse on a machine with 1.5GB of total RAM and have had zero memory issues since limiting the memory usage with the above command.

Re:Riot releases end-to-end encryption: get ready to chat se... by philsnow on Wednesday November 23, 2016 @11:33AM (#13023714)
thanks for trying to help out. just checked, this is how I'm running it:

    while : ; do SYNAPSE_CACHE_FACTOR=0.01 python -B -m synapse.app.homeserver -c homeserver.yaml  ; sleep 20 ; done
I'm not even using runit or anything; I set it up like this several months ago and haven't bothered touching it since because it's been relatively solid and reliable.

Even at a "cache factor" of 0.01, my tiny DO droplet is still swapping and eventually the homeserver gets OOM killed.

Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @06:48PM (#13010388)
IMO Riot is a late beta - pretty much all the features are there, but performance needs work and the UX needs work (this is next on the plate now E2E is done). HN and Powerusers are fine. Right now typical end users require a little handholding to get started.
Re:Riot releases end-to-end encryption: get ready to chat se... by qwertyuiop924 on Monday November 21, 2016 @03:03PM (#13008641)
Finally. It's been a long time coming. I'm very excited that it's finally here.
Re:Riot releases end-to-end encryption: get ready to chat se... by Animats on Monday November 21, 2016 @02:43PM (#13008478)
Turn encryption on by default. Otherwise, it won't be used.
Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @03:51PM (#13009084)
we're pretty confident that the folks we want betaing it (e.g. the HN community) will turn it on. Meanwhile joe public has the option to experiment, but we won't turn it on by default until we're sure we've got the nastiest bugs out.
Re:Riot releases end-to-end encryption: get ready to chat se... by jdmichal on Monday November 21, 2016 @02:44PM (#13008492)
That doesn't really work when encryption can't be turned off...
Re:Riot releases end-to-end encryption: get ready to chat se... by eganist on Monday November 21, 2016 @02:49PM (#13008530)
Hm. How'd they solve the trust-on-every-use problem over the web?
Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @03:38PM (#13008967)
Atm you have to verify every new device in turn if you care about proving who they are.
Re:Riot releases end-to-end encryption: get ready to chat se... by kasbah on Monday November 21, 2016 @03:31PM (#13008921)
Anyone know what's up with the versions? F-Droid is at 0.6.0 and Play Store on 0.6.1 and the linked blog post is talking about 0.9.0.
Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @03:39PM (#13008978)
0.9.0 is web, 0.6.1 is android. 0.6.0 is lagging (0.6.1 is a bugfix release made around 12:00 GMT) because fdroid takes ages to process builds.
Re:Riot releases end-to-end encryption: get ready to chat se... by detaro on Monday November 21, 2016 @01:54PM (#13008033)
Wait, it wasn't already? I never looked into it to closely, but their marketing always suggested encryption was part of it.
Re:Riot releases end-to-end encryption: get ready to chat se... by qwertyuiop924 on Monday November 21, 2016 @03:02PM (#13008636)
It had been implemented already but (and this was made quite clear in the docs and on the site) it hasn't been production quality (it took a while to implement, and then they were some cryptographers to check it over, IIRC). Several of the matrix devs are HN regulars, so they ought to show up soon-ish, and will hopefully let us know if I got that wrong.
Re:Riot releases end-to-end encryption: get ready to chat se... by Arathorn on Monday November 21, 2016 @04:16PM (#13009286)
You got it right :) It was on the web, but hadn't been audited yet (and lacked encrypted attachments and VoIP signalling and other good stuff). Now it's been audited (https://www.nccgroup.trust/us/our-research/matrix-olm-crypto...), is available on Android & iOS too, and we have encrypted VoIP & attachments too!
Re:Riot releases end-to-end encryption: get ready to chat se... by detaro on Tuesday November 22, 2016 @08:33AM (#13013965)
Thanks for the clarification!
Re:Riot releases end-to-end encryption: get ready to chat se... by x1798DE on Monday November 21, 2016 @02:15PM (#13008231)
I believe it has been implemented in the web interface for some time now, but now it's available in the mobile apps as well, so for mobile-to-web or mobile-to-mobile chats or other cross-device implementations you can use encrypted chat.