by eganist · 8y ago · 0 comments
There was a project I was involved in rather heavily (cyph // resulted in a pair of neat conference talks) where we'd accounted for the risks of apps being banned by making the entire application operate exclusively in a web context. To at least somewhat mitigate the related risks stemming from having to trust the cryptographic logic delivered by a web server every time you use the service, trust-on-first-use was achieved by mangling the living daylights out of HPKP in tandem with service workers in order to persist barebones codesigning logic used for validating cryptographic packages delivered from the web service. Alas...
All of this is to say that there have been multiple parties involved in addressing this challenge, each one thinking from novel angles in an effort to mitigate the risks posed by the threat of sanctions against secure messaging. As it stands, it appears there's now a rather glaring weakness: if a nation-state decides as much, they can just twist the arms of the walled gardens supporting your secure messaging client in order to:
1) deny access generally, reducing or eliminating the growth of the target space and improving target acquisition,
2) persist known vulnerabilities just long enough to exploit against a target.
Telegram has been criticized again and again for their security hygiene and for their architectural decisions. Signal's seen some of that heat quite recently, and I raise both of these because they speak pretty strongly to the bullets above: there's a chance we're seeing a live demonstration by a preeminent world power against one of the few tools dissidents are using to literally stay alive.
If this demonstration succeeds without any sort of significant blowback (in the form of corporate or popular resistance or some other subversion or mitigation of the attack), there's nothing to stop any other major party from trying it, regardless of whether they're a nation-state.
---
Anyway, I'm keen on a deeper discussion here. Maybe the tinfoil hat's been a bit corrosive to my brain; counter-arguments are welcomed.
But of course, this would break Apple's "we are the only app source, because you can only trust us" security model. Or maybe it's "... because we can only trust us, and we don't want increased support load".
Alternatively on my phone when I try to install an app, it'll allow me to change that setting just for that single installation and then turn it off again.
I never though of that before but the current situation might be a very good reason for making that library available.
I'm working for a startup that has had to pivot to web-only applications specifically because of Apple and their frustrating nervousness around anything involving applied blockchains.
If it is "applied blockchain", you don't have to tell everybody it's blockchain. App should look like natural (or, sometimes, magic) to non technical users. They couldn't care less.
Just show them what your app can do.
The specific device we put into production (and patented because of its criticality to Cyph) worked through the use of localized denial of service to pin signature validation logic into the local store of the browser to verify payloads received from other endpoints; in our case, we pin bad keys for the maximum permitted duration. That said, there are many different ways to use HPKP suicide that don't have to do with adding signature validation for client-side application logic, and they still come fairly close to achieving the goal of reducing how often you have to trust the server. The pattern described in this paragraph allows for Cyph to deploy new builds of the full messaging application whenever by just signing new builds such that they're validated by the pinned service worker, but if that flexibility is not a necessity, keep reading.
Since you can effectively pin any code into the browser through HPKP suicide, one different approach might be to pin a key for a more reasonable amount of time, such as two weeks, in order to stick e.g. critical application logic in the browser and rest assured that each user will use a certain build for at least two weeks time. This has the effect of reducing the exposure of an application's userbase in the event of a service compromise—at the expense of possibly committing some users to a bad build (or possibly even a compromised build) unless they manually clear pins. If you're writing a light application, this'll serve you pretty well. If you're writing a heavier application, you can outsource most of the heavier dependencies through SRI (the code pinned as the service worker would use SRI to validate the supporting libraries). The nuance here is that you're not implementing signature validation; you're just relying on that local DoS to ensure that certain code stays in the browser for as long as the bad keys are pinned and just confirming that any separate resources hash as what you'd expect them to. You're still certain to see that code--and any hashes you bake into it for SRI, should you choose to go this route--persist for as long as the invalid pins are live in your users' browsers.
HPKP still works in Firefox, so we intend to continue to research this pattern and related implementations of it. However, considering the browser with the largest market share just deprecated it while publicly mentioning the risk of footgunning via the standard, I'm not sure how much you stand to gain by implementing anything like the pattern we fleshed out two years ago. I'd love to build support to keep/fix the protocol rather than bin it, but the team that created is the team that gave up on it.
If you're curious, the private reason I've heard voiced to others by a person closely connected to the standard is that the protocol was not anticipated to be used in any manner other than what was documented, hence why termination of support for HPKP was preferred in Chrome over revision of the standard. I'm deliberately delicate with my words here because 1) it's hear-say, 2) it was expressed both off the record and in confidence to someone other than myself, and therefore 3) I can't be certain that it was expressed at all. However, key pinning--or any other TLS DoS--should always support what I described above as long as the DoS doesn't interrupt local code from executing in-browser, a behavior I doubt will change for the foreseeable future. You wouldn't want a TLS error to forcibly refresh an offline Google Docs instance just to show you said TLS error (resulting in loss of data from that offline GDocs instance), would you?
TL;DR: you can research alternatives based on the general pattern we described, but using HPKP specifically might be a dead-end for you.
But if you're keen on talking about it in more depth, I'm on keybase.io/bryant
Russia is applying pressure to Apple (what pressure?) that prevents Apple App Stores in all countries from accepting a new update of Telegram
I don't get this - why is Telegram not releasing updates in a UK or Japanese region? What pressure (besides the local russian court system) is being applied here
---
In general yes I expect that app stores are the / a weak point in mobile encryption messaging, but it is only at the level of major player threat model. These things are good enough for use against all but a State level actor targeting you specifically (at which point leaving the country is probably good, if tardy, advice)
I presume earlier Apple just gave in a bit to the pressure and stopped updates to help them censor the app.
I mean we presumably do have Russian court Records from April, records that the Roskomnadzor went to court for encryption keys, and that there have been "shutting down entire segments of the Russian internet. Many small organizations, including language schools and museums, have been blocked as collateral damage." And evidence there was a demonstration with paper aeroplanes?
I am happy to accept that Durov has an axe to grind but Russia does look like a good suspect to start looking at first.
What we don't have any evidence for is that these are in any way related to Telegram's inability to get updates approved by Apple. This is speculation based on the above claims which do have evidence.
There are reasonable explanations between "Telegram is directly responsible for the delay" and "Russia made Apple hold up the app worldwide."
> Russia does look like a good suspect to start looking at first
Start. The discussion I'm seeing treats this as a foregone conclusion. That's all I'm cautioning in respect of.
To drastically simplify it:
- Internal threats are usually motivated by finance/challenge/spite.
- State actors are usually motivated to counter perceived national security threats regardless of whether they're short-term or long-term. The result is a preparedness to spend resources orthogonally as compared to the potential impact of the threat to anyone other than the state but which may be directly correlated to the perceived risk to the state itself.
In simpler terms: risks exploitable by internal threats versus state actors do not assuredly overlap, and a lot of it is because risks exploitable by possessing knowledge might not be the same as risks exploitable with gobs of money.