Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why not end to end encrypt notifications with a public key?

Both iOS and Android can run a completionHandler to decrypt them using a private key that can be stolen if the app is disassembled.

But you can generate a private key per user, after install, and each mailbox publisjes a public key.

The thing I find ironic is that the actual encryption is done in JS, which is served by a webserver so anyway you have to trust the webserver. Same as you trust WhatsApp to not send your text to Facebook.

Is there a way around this having to trust an app? Seems the only way to do that would be to have a browser extension or several, that you trust not to collude with a website.



Ultimately there's no way around having the trust the client. The state of the art on that front right now is open source code with reproducible builds[1] and binary transparency[2].

Unfortunately none of that is currently implementable on the web for the reason you cited; the web server can just replace the entire application with any code it wants when you refresh the page. One possible path to fixing that is web packaging[3], but those standards are still in their infancy and don't yet have a mechanism for enforcing binary transparency.

[1]: https://reproducible-builds.org/

[2]: https://developers.google.com/android/binary_transparency

[3]: https://wicg.github.io/webpackage/draft-yasskin-wpack-use-ca...


You can enable content security policy then hash all the javascripts and assets so only prebuilt and hashed stuff is allowed to be loaded in the web browser. There is no way to easily check that some one you trust did the hashing, but it is doable with an extension in the web browser.


"Enable content security policy" is something done by the web server (via a header in the response), so that doesn't solve the problem.

In theory yes, you could probably create an extension that leverages Content Security Policy as a means of enforcing binary transparency. But at that point you'd basically just be implementing a slightly worse version of web packaging via an extension.


For me CSP is enough because the apps I need to trust only have one hash. So I do it manually. I will try to switch over to SXG trusting a signer is easier than having a list of trusted hashes, do you know if there some way to require/verify it that is visible on mobile?

Web Packaging seems to be vaporware to some extent, and I need something that works now.


Could the app not take a copy of the per-user private key when it's generated? (I know nothing about mobile security models).


Or when you paste in a key to the app to use for decrypt.

Not specific to mobile. Give an app data and it can do what it wants.


I thought maybe mobile OSes might have a decryption sandbox, so apps could manipulate keys without having full access to them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: