HNHacker News
TopNewBestAskShowJobs

jarrett

2,303 karma · joined October 13, 2010

submissionscomments
jarrett··on A Criticism of JavaScript Cryptography
> When you type 'apt-get install opensshd', how do you know if you're getting the package from an uncompromised server?

If you don't take any steps to verify the integrity, then you don't know.

The big difference, as I see it, is that the JS code gets served over and over again to the same clients. Every time you visit the website, it can load a new version of the JS.

jarrett··on A Criticism of JavaScript Cryptography
> Packaged in a signed browser extension is a good start. Or packaged in a signed desktop app that runs JS to drive the UI (xulrunner, node-webkit, ...).

Those are probably acceptable in principle. I should have been more specific: I was referring only to the scenario wherein the webserver provides the JS.

jarrett··on A Criticism of JavaScript Cryptography
> Is it like saying that a tank made of paper sheets is insecure

Yes, I'd say it's more like that one. The technology is insecure against threat models it is almost certain to face.

> or is it like saying that a heavily-armored tank is insecure (against a nuclear weapon)?

No, I don't think it's like that one. A tank could realistically participate in a nuclear conflict, but that's not necessarily what a tank is intended for. Whereas, JS crypto is presumably intended to protect users when the remote server can't be trusted. (What else would it be for?) It can't offer such protection.

jarrett··on A Criticism of JavaScript Cryptography
> so people can learn to use it properly.

That's the part to which I'm objecting. As I asked above, what is the proper use of JS crypto? What real-world application do you have in mind where JS crypto's level of security is adequate?

jarrett··on A Criticism of JavaScript Cryptography
> It still might protect you if you won't access server while it's compromised.

The end user can't know when that's the case.

> Also you might serve files that do the encryption from different server that's smaller, better protected, more stable, that less people have access to.

That doesn't provide any assurance to the end user that the JS isn't malicious.

Remember, "compromise" doesn't just refer to a drive-by hack. The site operators themselves may become compromised (or start that way), and deliberately serve malicious JS. Users can't know when that's the case. When it is the case, the strategy you suggested offers no protection, because the "more secure" JS server is still under the control of the bad actor.

jarrett··on A Criticism of JavaScript Cryptography
It's not clear to me if the author is endorsing the use of browser crypto in any particular scenario. Regardless, probably the most common reason for wanting browser crypto is to protect the data before it hits the server, thus protecting against a malicious or compromised server.

For example, consider a web-based mail client. You want to send an encrypted message, say via PGP, and you don't want the server to be able to read it, even if the server is evil. You'd like to be able to do the PGP encryption 100% in-browser, with no browser plugins or extensions necessary.

I think that's the most common category of use-case for browser crypto. Unfortunately, it's one where browser crypto plainly doesn't work. The whole point here is to defend against an evil server, but if the server is evil, it will send you evil crypto JS. TLS doesn't help you. Nobody's impersonating the server or altering the JS file in transit. You're getting an authentic copy of the JS file from the real server. It just happens to be an authentic copy of an evil JS file.

Given that, what can you do with browser crypto, practically speaking?

jarrett··on Freelance Inbox
I would love to hear from the founder of the service about this. I'd seriously consider paying for a high-quality lead-generation service. But if, as the above post asks, the same smallish pool of leads is being pursued by a bunch of freelancers, it's hard to consider those leads high-quality anymore.

Here's an interesting idea: Is there some way for this service to prevent unprofessional and scammy developers from spamming my leads? That kind of behavior is very common in the freelance market, and it effectively poisons potential clients for the good freelancers.

To some extent, the paywall will cut down on the number of low-quality freelancers. But in my experience, they're a plague even on some paid sites.

jarrett··on For Sale: 29,656.51306529 Bitcoins
Yes, that's what I was referring to. Instead of "money," perhaps I ought to have said "value." Analogously, if I had a pound of gold, and I gave it to a broker to sell for me, I'd be trusting that broker with my "value."
jarrett··on For Sale: 29,656.51306529 Bitcoins
I take that to mean cash in the sense of liquid assets, as opposed to something leveraged or what have you. Not cash in the sense of a briefcase full of cash.
jarrett··on For Sale: 29,656.51306529 Bitcoins
If you were the US Marshals, would you entrust the government's money[1] to an unregulated Bitcoin exchange?

[1] As to whether the government is morally, ethically, or legally entitled to the seized properties, I have no opinion. I don't know anything about the situation.

jarrett··on After Announcing Plans To Destroy Microsoft Windows, HP CEO Pulls A Gutsy Move
I care if it runs a Unix-like operating system. As an engineer, my life is made so much easier when standard Unix stuff is available. And I'm rather miserable when I have to rewrite something to account for the absence of standard Unix stuff.

For end-users, a Unix-like system can be perfectly usable. OS X runs on Darwin, which has slightly less Unix support than I'd prefer, but still waaaay more so than Windows. Ubuntu is, in my opinion, just as easy for the non-technical to learn as Windows or OS X.

Given the benefits to developers, and the absence of a downside for end-users, I see no reason not to root for Unix on The Machine.

Now, it doesn't have to use the Linux kernel, GNU utilities, or any of the other familiar building blocks. It just has to act like systems that do.

jarrett··on A Year of Functional Programming
No, you shouldn't give up mutability or in-place algorithms. As you said, performance concerns demand them at times.

Haskell has a nice approach to that problem. Data is immutable by default, but mutable primitives are available. The type system forces you to be explicit about when you're using mutability, so that mutable data can never accidentally creep into logic where you relied on immutability for correctness.

Broadly speaking, most mutable data types fall into two categories: Those that are some flavor of "IO," and those that are some flavor of "ST." In brief, the IO type is Haskell's way of dealing with operations that logically must be performed in the right order. (In-place operations require as much.) You can think of IO as one continuous chain of operations that begins and ends with the lifetime of the program. In other words, you can't just drop in and out of IO at will; the chain must be unbroken.

ST is an interesting variant on the same idea, except it does allow you to drop in and out at will. That is, I can enter ST at any point in my program, including the functionally pure parts. How is this possible? Because it imposes a restriction that's not present with IO: You must not touch the outside world from within ST. In any ST function, you get your own little mutable sandbox, but as with any pure function, you can only see that which is passed to you, and all you can do to the outside world is return a value. So you can, e.g., take an immutable list, create a copy that you sort in-place, then return the sorted list as an immutable value.

IO and ST are each flexible in their own ways. With IO, you can do almost anything, including mutating something that's passed in by reference. That can be important for some programs' performance. ST is flexible in a different way: You can sneak it into pure functions.

jarrett··on The security hole I found on Amazon.com
It appears we're each partially right: If you generated a new Rails app after August 2012, you get the header by default. If you generated the app before August 2012, you do not get the header by default.

So PSA: Updating Rails in an existing app does not cause this header to be added. You must add it yourself in application.rb if it's not already there. See garethadams' footnote #2 above.

jarrett··on Harry Eng – Master Bottle Filler
I'd prefer to try to riddle it out without resorting to cutting the bottle open. That would take all the fun out of it. If you had a reliable way to cut bottles and reassemble them with no telltale marks, then a single trick would explain all the different bottles. Much less interesting than if each bottle required a unique, clever solution.

Ignoring the wood for a moment, I'm focused on the padlock. Suppose it's not a real padlock. There are stripes on it which, to my eye, look like they might be corrugation. Perhaps it's hollow and can collapse like an accordion.

Edit: Or, per the description of the second-to-last bottle, the lock is broken down into parts and reassembled in the bottle.

jarrett··on The security hole I found on Amazon.com
Clickjacking is especially scary because most web apps are probably vulnerable. The default httpd.conf that ships with most package managers doesn't include the X-Frame-Options header. (Perhaps it should.)

Based on my testing, it appears Rails does not add that header either. Do any other frameworks?

jarrett··on Metal – Apple’s new graphics API
I'm pretty sure they didn't. My concern though is that OpenGL will fade away.

OpenGL isn't exactly a product. There's no company that "writes" the OpenGL software. Rather, it's a specification published by a consortium. "Writing" the OpenGL libraries is a task that each GPU maker does independently. So you have a bunch of different implementations of the same API.

For a long time, GPU makers have focused their attention on DirectX and done a lackluster job with their OpenGL implementations. If APIs like DirectX and Metal continue to proliferate, there will be less and less time and less incentive to maintain a good OpenGL implementation.

jarrett··on Metal – Apple’s new graphics API
OpenGL 2.1 has VBOS and shaders. I've never used immediate mode with 2.1.
jarrett··on Metal – Apple’s new graphics API
True, but as with advanced rendering techniques, not everyone wants to use off-the-shelf engines. In a simple application, there's something to be said for writing your own, simple graphics code.
jarrett··on Metal – Apple’s new graphics API
I'm all for deprecating old OpenGL features. Old apps won't fail to run for a while yet. When they do, the community will no doubt create a compatibility layer like they did with DosBox.
jarrett··on Metal – Apple’s new graphics API
Very happy indeed!
jarrett··on Metal – Apple’s new graphics API
It's somewhat scary to see new graphics APIs being introduced.

The fragmentation of OpenGL is enough of a headache, but at least it offers some semblance of "write once, run anywhere." The introduction of Mantle and Metal, plus the longstanding existence of Direct3d, makes me worry that OpenGL will get no love. And then we'll have to write our graphics code, three, four, or goodness knows how many times.

I know: It's not realistic to expect "write once, run anywhere" for any app that pushes the capabilities of the GPU. But what about devs like me (of whom there are many) that aren't trying to achieve AAA graphics, but just want the very basics? For us, "write once, run anywhere" is very attractive and should be possible. I can do everything I want with GL 2.1, I don't need to push a massive number of polys, I don't need a huge textures, and I don't need advanced lighting.

jarrett··on Runnable – jsfiddle for everything
Even if the code is sandboxed, it's possible to run outgoing attacks from something like this. The same is of course true of traditional server rentals, EC2, and any other service that gives you an OS instance of your own. The difference, though, is those are (ostensibly) less anonymous.
jarrett··on I quit my job. Today is Day #2.
In addition to changing hosts, there are a few ways to dramatically increase the traffic a blog can handle:

- Caching aggressively to static files. - Using a static site compiler. - An HTTP caching layer, like Varnish or CloudFlare.

All of the above eliminate the need for a database connection per pageview.

jarrett··on Amazon’s Illegal Drugs: Steroids, Muscle Relaxants, Prescription Antibiotics
There are legitimate concerns with unrestricted access to antibiotics. If you misuse them, you're possibly not just hurting yourself. You might be hurting everyone, because you might be breeding resistance bacteria.
jarrett··on Combatting illegal abuses of ngrok
If each user created their own key for a .ngrok.com subdomain, could ngrok then sign those, rather than giving out the private key? Would user agents consider the subdomain's signed cert sufficient in that case? This is an odd little corner of SSL logic that I'm not as clear on.
jarrett··on Combatting illegal abuses of ngrok
Yeah, I'm just thinking one could relax that policy--if there were actually a viable strategy for flagging sites, which there may not be.

Unless you're tunneling SSL, you can't know that ngrok doesn't inspect your traffic. Promises of privacy that are based on the honor system aren't worth much, at least to me. I'm not at all attacking the honesty of the ngrok operator; I'm just stating a generality about security--one that applies regardless of how much you think you trust any particular actor. For two main reasons: 1) The actor may not be as good as you think, and 2) even a truly good actor can be compromised in a variety of ways.

Therefore, to me at least, a promise not to inspect traffic has little or no value. And if that promise has no value to users of ngrok, perhaps it could be relaxed in favor of protecting the long-term viability of the service.

That being said, the caveat stated above still applies. There's no point in relaxing the promise unless there exists a viable flagging strategy. And such a strategy may not exist, owing to the problems I described in my previous post.

jarrett··on Combatting illegal abuses of ngrok
I wonder if it would be possible to automatically flag ngrok sites for manual review based on certain criteria. E.g. if the phrase "citibank" appeared on the site, it would appear in a moderation queue.

Though there may be bulletproof ways for criminals to bypass such automatic scanning. For example, I've heard of criminals creating two versions of their site: One, a harmless site, that you get if you type in the domain name cold, and then a criminal one, that you only get if you have the right referrer header or query string. Which makes it difficult or impossible for an outside entity to see the illegal content without access to the spam email, referring site, or what have you.

I don't know much about ngrok, but I take it you can tunnel SSL over it such that it's impossible for ngrok to inspect the contents of your traffic. Which would rule another viable strategy: Monitor traffic for suspicious keywords, thus bypassing the cloaking techniques described above.

Any other techniques for automated flagging that I might be missing? Maybe some kind of content-agnostic traffic analysis that spots a likely spam fingerprint, e.g. certain chronological traffic patterns?

jarrett··on We picked the wrong lawyers for our first startup
You've convinced me. This seems true for all companies.
jarrett··on We picked the wrong lawyers for our first startup
On the flip side: Is there ever a situation in which cofounders legitimately want to make it impossible to oust a cofounder without his/her consent? Or should that always be possible for any sane company?
jarrett··on Leo The Homeless Coder Is Still Homeless
What definition of mental illness do you use for serious mental illness? Substance abuse is formally classified as a mental illness in the DSM.
← PreviousPage 2 of 21Next →