Live data from Hacker News

ProtonMail now the maintainer of OpenPGPjs email encryption library

protonmail.com

11–20 of 30 posts

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#11
post #4

Earlier quoted context omitted.

I'm building a chat platform with js and https crypto. It's better than nothing in my opinion.

A false sense of security is worse than nothing at all.

True - and it's complex - but you need to keep the capability of your adversary in mind.

This will thwart your nosy flatmate/little-brother.

This is reasonably likely to keep curious or nosy corporate IT or HR staff at bay if you use it at work. It's not going to keep a properly authorised and resourced corporate IT investigation/surveillance out - at least not for any hardware that's got corporate ssl roots installed (or device management that allows installation of those).

It'll likely keep local cops out. It's less likely to keep feds out if they're determined. It 100% will not help against people who've got browser trusted ssl signing roots and the ability to run QUANTUM on exploited backbone routers to deliver their own versions of the javascript appropriately ssl encrypted to you before the actual site has a chance to respond.

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#12
post #11

Earlier quoted context omitted.

A false sense of security is worse than nothing at all.

True - and it's complex - but you need to keep the capability of your adversary in mind. This will thwart your nosy flatmate/little-brother. This is reasonably likely to keep curious or nosy corporate IT or HR staff at bay if you use it at work. It's not going to keep a properly authorised and resourced corporate IT investigation/surveillance out - at least not for any hardware that's got corporate ssl roots installe…

Another vector is I won't really be able to respond to requests from law enforcement because as soon as the chat is over (or on request of the creator of the chat) I wipe the key from memory. Leaving only encrypted blobs in the database that are then purged themselves at a later time. The key is never written to the disk to prevent forensic analysis there as well. As a bonus, I can handle a decent number of users with a small amount of hardware as most of the hard work is done client side.

Lastly, I'm planning on implementing all of the best protections we have against man in the middle attacks currently like subresource integrity and HSTS. If the browser committees give me something better (maybe some sort of resource signing that can be verified on a secondary secure channel?) I'll implement it. So it may protect against more in the future.

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#13

Earlier quoted context omitted.

So you'd prefer not to have any crypto at all? Because 99% of people are going to use their browsers anyways. Btw for example https://blockchain.info/wallet/#/ (in-browser bitcoin wallet) I think has never been hacked - you might say it's a huge outlier but it is possible to do well.

The issue is like this. I load https://webmail.example.com . I see my email. My ISP doesn't see my email. The NSA (or anyone else who can MITM https, such as my workplace, college, etc.) can effectively turn it into http, and see the content. We need to fix that. So I write an encryption library in JS, loaded from https://webmail.example.com . It loads the email through an AJAX call from https://webmail.example.com ,…

> The NSA (or anyone else who can MITM https, such as my workplace, college, etc.) can effectively turn it into http, and see the content.

To be clear, unless NSA has some massive capabilities we haven't dreamed off, properly implemented HTTPS cannot be MITM'ed (via SSL stripping, or other means) by anyone who lacks access to your local machine. Specifically, by properly-implemented SSL, I mean:

1. Serving https only, no http

2. HSTS

3. Certificate pinning

The situation you mention regarding workplace computers is a little different from the NSA, since they have the explicit authority and ability to install root certificates on your local work computer. Without those root certs (like if you use a personal computer at work), they lack the ability to MITM your connection, assuming the above.

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#14
post #13

Earlier quoted context omitted.

The issue is like this. I load https://webmail.example.com . I see my email. My ISP doesn't see my email. The NSA (or anyone else who can MITM https, such as my workplace, college, etc.) can effectively turn it into http, and see the content. We need to fix that. So I write an encryption library in JS, loaded from https://webmail.example.com . It loads the email through an AJAX call from https://webmail.example.com ,…

> The NSA (or anyone else who can MITM https, such as my workplace, college, etc.) can effectively turn it into http, and see the content. To be clear, unless NSA has some massive capabilities we haven't dreamed off, properly implemented HTTPS cannot be MITM'ed (via SSL stripping, or other means) by anyone who lacks access to your local machine. Specifically, by properly-implemented SSL, I mean: 1. Serving https only…

If I'm the NSA, I'd already have stolen Protonmail's HSTS pinned cert's private key (possibly by burning a zero day getting into one of their web servers, possibly by "asking nicely" to some tech employee there for whom I had appropriate leverage).

But yeah - short of nation-state or very high level LEO (who're just piggybacking on their local NSA equivalent), HSTS with pinned certs is as close to "secure" as we have right now.

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#16
post #11

Earlier quoted context omitted.

True - and it's complex - but you need to keep the capability of your adversary in mind. This will thwart your nosy flatmate/little-brother. This is reasonably likely to keep curious or nosy corporate IT or HR staff at bay if you use it at work. It's not going to keep a properly authorised and resourced corporate IT investigation/surveillance out - at least not for any hardware that's got corporate ssl roots installe…

Another vector is I won't really be able to respond to requests from law enforcement because as soon as the chat is over (or on request of the creator of the chat) I wipe the key from memory. Leaving only encrypted blobs in the database that are then purged themselves at a later time. The key is never written to the disk to prevent forensic analysis there as well. As a bonus, I can handle a decent number of users wit…

That kind of policy didn't work out so well for Ladar Levison at Lavabit when they wanted to subvert the entire userbase's security just to get access to Snowden's email account...

If you piss off important enough people - law enforcement won't just go away when you say "the system isn't capable of doing that", they'll say "so re-write the system so it is, and if you tell anybody we'll put you in jail forever".

The FBI have seized and continued to run a child porn website before to gather evidence - do you _really_ think they'd hesitate before taking over your encrypted chat servers if they thought it'd get them a career-advancing prosecution? Do you think you'd fight as hard as Ladar did when the guys with guns come knocking at your door? (I have no doubt I'd cave pretty quickly - I've got a lot of respect for Ladar's resistance to selling out his users...)

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#17
post #16

Earlier quoted context omitted.

Another vector is I won't really be able to respond to requests from law enforcement because as soon as the chat is over (or on request of the creator of the chat) I wipe the key from memory. Leaving only encrypted blobs in the database that are then purged themselves at a later time. The key is never written to the disk to prevent forensic analysis there as well. As a bonus, I can handle a decent number of users wit…

That kind of policy didn't work out so well for Ladar Levison at Lavabit when they wanted to subvert the entire userbase's security just to get access to Snowden's email account... If you piss off important enough people - law enforcement won't just go away when you say "the system isn't capable of doing that", they'll say "so re-write the system so it is, and if you tell anybody we'll put you in jail forever". The F…

I thought of that, the project will be FOSS and I'm going to encourage people to run their own servers. The primary server will mostly be a reference implementation and for casual chatting.

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#18
post #14
post #13

Earlier quoted context omitted.

> The NSA (or anyone else who can MITM https, such as my workplace, college, etc.) can effectively turn it into http, and see the content. To be clear, unless NSA has some massive capabilities we haven't dreamed off, properly implemented HTTPS cannot be MITM'ed (via SSL stripping, or other means) by anyone who lacks access to your local machine. Specifically, by properly-implemented SSL, I mean: 1. Serving https only…

If I'm the NSA, I'd already have stolen Protonmail's HSTS pinned cert's private key (possibly by burning a zero day getting into one of their web servers, possibly by "asking nicely" to some tech employee there for whom I had appropriate leverage). But yeah - short of nation-state or very high level LEO (who're just piggybacking on their local NSA equivalent), HSTS with pinned certs is as close to "secure" as we have…

This is why we have HSMs.

It can in fact be "impossible" to steal ones crypto keys.

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#19
post #18
post #14

Earlier quoted context omitted.

If I'm the NSA, I'd already have stolen Protonmail's HSTS pinned cert's private key (possibly by burning a zero day getting into one of their web servers, possibly by "asking nicely" to some tech employee there for whom I had appropriate leverage). But yeah - short of nation-state or very high level LEO (who're just piggybacking on their local NSA equivalent), HSTS with pinned certs is as close to "secure" as we have…

This is why we have HSMs. It can in fact be "impossible" to steal ones crypto keys.

Yeah, but "stealing" them isn;t the NSA's only avenue to acquire them. With Lavabit they just said "give us the keys so we can snoop all we want" - I suspect very few of us would be able to resist like Levinson did (as in, shut your company and livelihood down, and hope they don't throw you in jail for doing so). (Fortunately, most of us won't have users with as much heat coming down on them as Snowden, but if you're building _anything_ privacy related you owe it to yourself to consider how far you'd go to protect your users if one of them turned out to be another Snowden...)

Re: ProtonMail now the maintainer of OpenPGPjs email encryption library

#20
post #13

Earlier quoted context omitted.

The issue is like this. I load https://webmail.example.com . I see my email. My ISP doesn't see my email. The NSA (or anyone else who can MITM https, such as my workplace, college, etc.) can effectively turn it into http, and see the content. We need to fix that. So I write an encryption library in JS, loaded from https://webmail.example.com . It loads the email through an AJAX call from https://webmail.example.com ,…

> The NSA (or anyone else who can MITM https, such as my workplace, college, etc.) can effectively turn it into http, and see the content. To be clear, unless NSA has some massive capabilities we haven't dreamed off, properly implemented HTTPS cannot be MITM'ed (via SSL stripping, or other means) by anyone who lacks access to your local machine. Specifically, by properly-implemented SSL, I mean: 1. Serving https only…

Another thing in the security tool chest is SubResource Integrity. If your JS is hosted on a CD you can put a hash of the expected JavaScript within the HTML script declaration. When the browser downloads it, it'll verify the hash before executing it.

https://developer.mozilla.org/en-US/docs/Web/Security/Subres...

Post reply on HN