News for hackers. Stuff that matters.
Re:JavaScript Cryptography Considered Harmful by flavor8 on Tuesday June 17, 2014 @08:02AM (#7903874)
Browser cryptography has its place - the simple fact is that PGP is too hard for everyday users in its current guise (your parents are not going to go to key exchange parties). And, requiring users to install binaries on their computer (which can feasibly come with auto-update) to use encryption has just as high a risk of being subverted by somebody with malicious intent who is trying to target the communications of a particular individual. (Which is harder: acting as MITM in a company's internet traffic, or breaking into the target's Windows desktop?)

Mass market encryption is a worthy goal, and browsers are a reasonable platform to achieve that goal. Educating users about not installing extensions that can filter pages in their browsers, recommending incognito mode, etc are good steps. And of course TLS should be considered a minimum requirement for transport. Browser encryption is never going to be military grade, but it's a step up over unencrypted communication.

Re:JavaScript Cryptography Considered Harmful by tptacek on Tuesday June 17, 2014 @09:25AM (#7904246)
PGP being "too hard" doesn't mean that browser crypto "has its place". As I said upthread: if there's a "#1 most common fallacious reasoning strategy" for browser crypto experts, it's this one: "we really need browser crypto to work, therefore it works". No.
Re:JavaScript Cryptography Considered Harmful by Joeboy on Tuesday June 17, 2014 @09:42AM (#7904334)
How about the argument that although browser crypto won't render your communications reliably secure, widespread adoption could make it significantly harder to transparently implement mass surveillance?

I'm not sure if this argument is actually flawed, or just anathema to grown up cryptographers who prefer hard maths to wishy washy politics/economics?

Re:JavaScript Cryptography Considered Harmful by marcosdumay on Tuesday June 17, 2014 @11:32AM (#7904978)
Please, cite any gain that gives over TSL.

And if you plan to implement it over unencrypted connections, no, nobody will notice if the NSA does mass interception of those. There is no way to notice it.

Re:JavaScript Cryptography Considered Harmful by Joeboy on Tuesday June 17, 2014 @11:49AM (#7905098)
> Please, cite any gain that gives over TSL.

Over TLS? The gain would be that the server doesn't have to see the plaintext. Or at least in order to see a lot of people's plaintext, it will have to get away with sending bad crypto code to a lot of people, some of whom are likely to notice.

> if you plan to implement it over unencrypted connections

I'm not particularly planning to do anything, but if I was I imagine I would be doing it over TLS.

Re:JavaScript Cryptography Considered Harmful by crpatino on Tuesday June 17, 2014 @01:57PM (#7905862)
> ... in order to see a lot of people's plaintext, it will have to get away with sending bad crypto code to a lot of people, some of whom are likely to notice.

I would say that the overlap between the people that are likely to notice (or, for the matter, that are likely to read the reports from those who notice) and the people that benefit the most from transparent, client-side crypto is close to negligible.

Re:JavaScript Cryptography Considered Harmful by stevejones on Tuesday June 17, 2014 @10:45AM (#7904695)
The NSA is routinely MITMing connections. How will browser side crypto help if they get to decide what code your browser runs?
Re:JavaScript Cryptography Considered Harmful by flavor8 on Tuesday June 17, 2014 @11:37AM (#7905010)
The NSA is routinely intruding on desktop installs. How will client side crypto help if they get to patch binaries on target computers?
Re:JavaScript Cryptography Considered Harmful by stevejones on Wednesday June 25, 2014 @06:55AM (#7943200)
It's harder to intrude on desktop installs. Any anti-NSA strategy should be predicated on a cost basis.
Re:JavaScript Cryptography Considered Harmful by personZ on Tuesday June 17, 2014 @09:50AM (#7904369)
PGP being "too hard" doesn't mean that browser crypto "has its place".

While I've always enormously respected your opinion, you seem to have a very black/white perspective, aggressively attacking and/or belittling anything that isn't an infallible solution, even if it's a significant improvement for many or most scenarios.

You don't seem terribly pragmatic in many cases. I realized that long ago in a discussion on passwords and the browser - https://news.ycombinator.com/item?id=2000833

So many password incidents since would have been a complete non-incident with such a solution (or anything similar), so I've always remembered your raw negativity because it wasn't a perfect solution: That because it didn't solve every possible issue, it's better to solve no issues.

Re:JavaScript Cryptography Considered Harmful by derefr on Tuesday June 17, 2014 @11:20AM (#7904909)
What's the point of a fallible solution? The only people who actually need cryptography need infallible solutions. Everyone else can rely on security by obscurity--rot13ing their text will be good enough for them.
Re:JavaScript Cryptography Considered Harmful by personZ on Tuesday June 17, 2014 @12:12PM (#7905223)
What's the point of a fallible solution? The only people who actually need cryptography need infallible solutions.

There is no such thing as an infallible solution. Start with that. When you're talking about actors who are exploiting RNG weaknesses, broaden your horizons a little.

PGP needs a key file. You need to (optionally) enter a passphrase. All someone needs to do is steal your key file and circumvent your passphrase (either of which there are countless mechnanisms to achieve. They aren't trivial, but if we're talking about organizations that are taking advantage of imperfect RNG generators...) and boom, PGP has been rendered a false sense of security over the history of your communications. I mean, if we're talking about rogue actors taking over servers and injecting false script, such a situation is just as viable.

Everything is on a gradient. Any simplification (such as "fallible versus infallible") is just garbage time.

Again, and I realize Ptacek is a bit of a hero around here, his words above question, but I go back to his response to that password thing, which was the moment I understood the disconnect between big security talk, and actual security. When the alternative is (and continues to be) nothing -- which is exactly the case in the password discussion -- discarding options because they don't cover every scenario is absurd. It is grossly destructive, just as it's destructive to discredit PGP because it requires access to a keyfile.

Re:JavaScript Cryptography Considered Harmful by derefr on Tuesday June 17, 2014 @12:46PM (#7905450)
I think the difference is between attacks that are currently well-known, and are automatable (attacks that are, effectively, on the cryptosystem itself)--and attacks that boil down to social-engineering/rubber-hose cryptanalysis (attacks that are, effectively, on you.)

Or, to quote cperciva's talk (https://news.ycombinator.com/item?id=7883707), "the purpose of cryptography is to force the US government to torture you." If a cryptosystem makes torturing you for the required information easier than attacking the cryptosystem itself, the cryptosystem is "strong enough." Any system for which this isn't true isn't doing its job.

Re:JavaScript Cryptography Considered Harmful by marcosdumay on Tuesday June 17, 2014 @11:14AM (#7904870)
Broken crypto is not an improvement over no crypto.

Javascript crypto solves no problem at all, and can break better encryption implementations if you use both. At best, it's useless.

Re:JavaScript Cryptography Considered Harmful by count on Tuesday June 17, 2014 @10:57AM (#7904769)
Giving users a false sense of security is absolutely worse than making sure they know there is no security.
Re:JavaScript Cryptography Considered Harmful by personZ on Tuesday June 17, 2014 @11:04AM (#7904823)
EDIT: I remain convinced that it is impossible to have any credible security discussion on HN. Everyone just clucks and spouts rhetoric, the Ptacek fan club in full effect.

No security solution is absolute, but instead every security approach is a "false sense of security" from some perspective, and every solution is steps on a gradient. Anyone who thinks otherwise is simply naive.

Do we eschew SSL rather than give users a "false sense of security"? There are many potential vulnerabilities to SSL, from stealing private keys, to co-opting or compromising root authorities, to more esoteric mathematical vulnerabilities.

Yet we still use SSL. We find a pragmatic medium where we achieve the greatest security possible within realistic confines and restrictions, understanding that there are (and always will be) potential weaknesses, and improve as we go. Simply tut-tuting and rote repeating the "false sense of security" nonsense does literally nothing for anyone. It is pseudo-enlightened babble.

Re:JavaScript Cryptography Considered Harmful by hluska on Tuesday June 17, 2014 @01:10PM (#7905591)
Though I don't agree with all of it, I like this comment. Your SSL example is excellent. In the context of online shopping, SSL may protect your credit card number in transit, but it can't protect you from keystroke loggers that intercept the information before it is ever encrypted. Yet, the industry still uses it and people are consistently compromised by malicious software.

On the other hand, I'm still learning about crypto, so I find these conversations illuminating. Thinking about ways to attack security, or trying to understand how other people approach attacks has given me a far deeper understanding than merely reading about it.

However, that's a personal bias because being critical of what I learn is how I learn. Needless to say, I used to routinely drive teachers crazy...

Re:JavaScript Cryptography Considered Harmful by danielweber on Tuesday June 17, 2014 @02:42PM (#7906159)
People tsk-tsk'ing security systems as "that won't be perfect, so it will just give users a false sense of security" has been going on for over 20 years.

Sometimes it's right, sometimes it's not. I remember being yelled at that anti-spam products were stupid because "I can't stand losing even 1 mail out of 10,000!!" (In reality, email is a lossy system that doesn't have four 9's of reliability anyway.) I heard the same thing about all sorts of products from people in both industry and academia only to watch them become significant parts of the IT world.[1] Nerds like black/white answers, especially about areas where they aren't experts. It makes the world much easier to understand.

(And I think it was a stroke of marketing genius for Zimmerman to call his product "Pretty Good Privacy" instead of anything implying perfection.)

So I have sympathy for your position here.

Still -- the JavaScript runtime is a hell of a place to try to encrypt anything. If your only hope is to add an obfuscation layer, call it that explicitly, and expect support to fall off. Adding more pieces to a system can make it less secure.

[1] and I still regret not following up with Dave Mann about his attempts to create a numbering system for attacks because someone else at the table said the AV vendors would never go along

Re:JavaScript Cryptography Considered Harmful by tptacek on Tuesday June 17, 2014 @03:54PM (#7906597)
This is a terribly flawed argument because we do not in fact accept "many potential vulnerabilities to SSL". On the contrary, we declare vulnerabilities in SSL that require gigabytes worth of observations for a single target to be "hair on fire" emergencies.

On the flip side, we accept staggeringly obvious flaws in the security model of "server-proof" Javascript crypto --- flaws like, "despite what the server operators claim, they can at any time steal secrets from their users --- flaws that have in the past been exploited by law enforcement. Not only we do accept them, but people like you get pissy when people like the "Ptacek fan club" on this thread point them out.

Re:JavaScript Cryptography Considered Harmful by count on Tuesday June 17, 2014 @07:34PM (#7907692)
So, now that there's a fan club, do you have a mailing list or get togethers?!
Re:JavaScript Cryptography Considered Harmful by count on Tuesday June 17, 2014 @07:37PM (#7907702)
When SSL gets broken, there are built in mechanisms that generally demonstrate 'something' is being screwed with.

With JS crypto, that goes away - if the JS is shipped over the wire, it can just be silently replaced.

If you're relying on SSL to protect the JS crypto, why bother with the JS crypto in the first place?

When vendors ship some kind of client-side pre-built verification capability (i.e. code that DOES NOT come over the wire), much like the existing SSL stack, things will change dramatically.

Re:JavaScript Cryptography Considered Harmful by flavor8 on Tuesday June 17, 2014 @09:52AM (#7904386)
I don't agree. By "has its place" I don't mean "appropriate for all" - I mean a step up for general security of communications.

For mainstream users (who shouldn't even be exposed to the concept of keypairs, since it blows their minds), you can give them a binary client and trust that their desktop isn't compromised, or you can give them a TLS connection and manage your server security.

Re:JavaScript Cryptography Considered Harmful by hnha on Tuesday June 17, 2014 @09:36AM (#7904308)
your parents don't have to use key signing. they can just mail each other their public keys or upload them to a key server. that covers the encryption aspect of pgp. they can verify their identities by sharing secrets but I would expected them to easily notice right away if they are talking with the wrong person...
Re:JavaScript Cryptography Considered Harmful by flavor8 on Tuesday June 17, 2014 @09:53AM (#7904391)
Parents / mainstream users don't even understand the concept of keys. Keypairs are a technical detail that everyday (/non-apologist) users should not be exposed to.
Re:JavaScript Cryptography Considered Harmful by stevejones on Tuesday June 17, 2014 @10:47AM (#7904710)
Bollocks. Users can be educated. Throwing our hands up and saying that users are too stupid to understand crypto so we have to implement it in ways that don't work is advocating wasting everyone's time. Imagine if the car industry had decided that users wouldn't be able to understand car keys?
Re:JavaScript Cryptography Considered Harmful by derefr on Tuesday June 17, 2014 @11:24AM (#7904937)
You can't teach people to do something less convenient than what they're already doing. Car keys are more convenient than never letting your car out of your sight outside of your own garage (which is what people were doing before car keys.)

PKI, as currently imagined, is less convenient than just speaking freely and feeling a nagging sensation that someone might be listening (which is what people are doing now.)

Re:JavaScript Cryptography Considered Harmful by stevejones on Wednesday June 25, 2014 @06:59AM (#7943219)
The difficulties in PKI are not that hard. Most of the problems are social, such as the belief that any implementation of PKI must be absolutely 100% bulletproof. Corporate deployments of PGP with no passphrase make the difficulty of executing spear phishing attacks considerably higher (especially when you consider that these are the usual way of getting initial access to corporate systems).
Re:JavaScript Cryptography Considered Harmful by flavor8 on Tuesday June 17, 2014 @11:49AM (#7905102)
Not bollocks at all. Non-technical people shouldn't be expected to understand implementation details in order to use a system. Key exchange can be done without exposing users to the details of the system.
Re:JavaScript Cryptography Considered Harmful by boomlinde on Tuesday June 17, 2014 @01:52PM (#7905837)
While I think it's best left assumed that they won't, I definitely think that non-technical users should make an effort to understand things like the basics of a key exchange, for their own sake. After all, they are relying on these systems to exchange sensitive information. In general I think people should be more careful about handing out personal information.
Re:JavaScript Cryptography Considered Harmful by flavor8 on Tuesday June 17, 2014 @02:40PM (#7906137)
People use SSL every day and I bet most of the population, software engineers included, don't understand it. In fact most of the population probably don't even know that they're using SSL.
Re:JavaScript Cryptography Considered Harmful by stevejones on Wednesday June 25, 2014 @06:54AM (#7943196)
Email addresses are an implementation detail.
Re:JavaScript Cryptography Considered Harmful by maxerickson on Tuesday June 17, 2014 @01:11PM (#7905600)
Re:JavaScript Cryptography Considered Harmful by flavor8 on Tuesday June 17, 2014 @01:36PM (#7905750)
This is good -- choosing the right language is important. Cryptographers seem to be worse than average software engineers when it comes to designing interaction that is usable by mainstream users.