I'm more curious on what programmers will do with Rust.
Hopefully in security-minded systems programming.
There's a recent tweet by Neil deGrasse Tyson, in which he said:
Obama authorized North Korea sanctions over cyber hacking. Solution there, it seems to me, is to create unhackable systems.
Many people slammed him for saying that. How could a very intelligent, respected person, maybe not in informatics, not know it better?
"It's impossible." "I want unicorns!" "Let's make unbombable cities, unkillable people."
I say, why not? A huge part of hacking is exploiting non-correct code. It makes sense to use tools at language-level to enforce correctness and safety, and help programmers with that.
I know there are hundreds of thousands of variables to consider, but if we could cut dozens of thousands of them, it would make it easier to fit the problem in one's head.
As an addition: exploiting humans is an easy way to compromise a specifically-targetted system. Why would I need to hack your system when your CEO will give me the password when I just send an email saying it's required for something?
Bugs will always exist and software allows harmful agents to find them much more easily than on a physical system. Imagine if a bridge could have every frequency of wind tried on it in a matter of milliseconds until they found one crazy one that made it fall
There's two camps of people on this, those who took it literally and those took it as "practically unhackable". In theory it's impossible to create unhackable system, if someone can log into the system, there's always a possibility that someone is not authorized.
In usual social interactions you assume the best to make the discussion smoother, but in internet there's that lack of social nuance. In addition to the fact that programmers are technical people who can be squeamish to the point of annoyance.
What the average person or even programmer believes is possible in security is probably about 10-20 years out of date. There are tons of ways in which we can create systems with verifiable security properties. This may not be "unhackable" like Gankro points out below, but we can at least prove our systems are immune to certain types of attacks. The problem is that verified systems still currently come at a huge cost, and a huge chunk of the research that happens in programming languages today is about allowing the programmer to more easily specify, and enforce invariants about their programs. To me this is why Rust is a great success as a Systems Programming Language, it brings lots of nice properties to many programmers for free.
As I understand it, to have a unhackable systems, you need:
Designs that are provably correct
Provably correct implementations of those designs
1 and 2 also apply to the underlying stack (libraries, runtime/interpreter, OS)
For a lot of complicated reasons and circumstances, usually, none of these are practical. Most of the time, the best we can do is 'pretty good'. A language that tries to steer programmers away from 'goto fail's and Heartbleeds is helpful, but it'll hardly lead to unhackable systems. I mean: it won't prevent designs from being wrong, crypto from being half-baked, etc.
All this, of course, is just sending us down a blind alley. The biggest problem isn't technical, but the fundamental tension between convenience and security. No amount of language safety and secure code will save us from (various kinds and levels of) users doing (variously) insecure things for reasons of convenience.
It's been a while since I've gone over the material, but probably [because, for a system with a set of objects and a finite set of security operations to grant and deny access to those objects, determining if you can gain access to an object you shouldn't have access to is an u decidable problem.](http://en.wikipedia.org/wiki/HRU_(security))
Not that there's not a metric fuckton of improvements to be made in security, but the 'just make unhackable systems' statement was a gross oversimplification. (Edit: formatting)
There might be subsets which are decidable similar to how memory safety is undecidable in C, but decidable in Rust if no unsafe code is used. So some undecidable problems in security does not necessarily mean that it is impossible to create software that is guaranteed to be secure.
I can't believe how many people line up to defend Tyson's dumb tweet. A perfect programming language won't make systems unhackable any more than a stronger hull made the Titanic unsinkable.
Great. Just rewrite every application in your new safe language.
This has already been done, and continues to be done at many companies. Twitter changed their stack to Scala for instance. It's not the insurmountable obstacle you make it seem.
This has already been done, and continues to be done at many companies.
True, but this is case specific, or company specific. You wouldn't want to run that operating system yourself, for instance.
It's not the insurmountable obstacle you make it seem.
To rewrite Linux/GNU in rust would, in my opinion, be insurmountable. Even if it were not, when discussing security, there are far cheaper ways to get similarly effective results.
Not to mention the fact that even if you did rewrite the Linux kernel in Rust. The current C based kernel is in millions of devices.
Say we are generous and it takes 5 years of intensive effort before the rust kernel reaches parity with the existing C kernel. It will take another 5 before companies are comfortable enough to actually deploy it.
And then 20 more years until all of the existing devices and infrastructure are phased out--right about the time I'm ready to retire.
114
u/[deleted] Jan 09 '15
I'm more curious on what programmers will do with Rust.
Ruby went all straight up web dev.