87 points · by mariuz · 14y ago · 39 comments
It's just that the key exchange for symmetric keys is inherently unsafe online. But if you share the keys in a safe manner (ie, physically, secret location, no camera, etc.), its all good.
A long time ago, well, not so long in fact, before public key cryptography was invented, symmetric crypto was used by businesses. They had people carrying those keys and delivering them. That was a pain.
it also worked that way for a couple of thousand years, with weaker algorithms, but the same concept.
Things can also be problematic if there are conditions under which you will encrypt data provided by you adversary as they could trick you into decoding the message for them.
Finally opponents may be able to tamper with the message even if they can't decode it unless there is a MAC to protect it.
This is true for RSA based schemes, but keep in mind that elliptic curve based asymmetric schemes are believed to be secure even with much shorter key lengths.
I don't understand what you mean. There are plenty of ways to exchange symmetric keys online, for instance by Diffie-Hellman scheme, or even using public key cryptography. I even recall that SSL/TLS uses symmetric key for encryption and asymmetric crypto is used only for key exchange.
SSL/TLS relies on trusting a number of certificate authorities to verify that, yes, the other end is Bob. Note that for this to work securely you must already have their public key info. There are problems with this also but it's the best we have got right now.
But it's impossible to identify someone out of nowhere. Even in physical life we need external information of a person or an organization we don't know to identify him.
So, we will always need some leads with which to cross-check the other party's identity. And given that, there are plenty of protocols to exchange symmetric keys securely.
Answer: Bob puts the item in a box with a lock and sends to Alice. Alice receives the box, places her lock on it and sends it back to Bob. Bob removes his lock and sends the box back to Alice. Now Alice removes her lock and obtains the package contents.
The flaw is, you can basically just have the same scenario but replace Alice with the post office:
Bob puts the item in a box with a lock and sends to Alice. Post office intercepts the box, places their lock on it and sends it back to Bob. Bob removes his lock and sends the box back to Alice. Now the post office removes their lock and obtains the package contents.
The only way around this is to have some truly trusted third party. Even in RSA, if you aren't absolutely certain of the other user's public key, it won't work, which is why web-of-trust and other techniques are used.
Udacity also has a crypto course: http://www.udacity.com/overview/Course/cs387/CourseRev/apr20... I haven't tried it yet, but it looks a bit more in-depth in some places than the Coursera course.
I can condone running through the math behind various primitives, to wet someone's whistle and give them a bit of an appreciation. To someone unfamiliar with the concept of one-way functions, seeing a run through of Diffie-Hellman is pretty neat. "What do you mean I can't figure out the secret, the numbers are right here in front of me..."
But one of the major things that makes crypto so damn hard is that the devil is in the details, and this article misleads much more than it informs. Linear analogies like paint-mixing and XOR (!?) are anti-enlightening to the feat that DH actually accomplishes. Never mind the blatantly incorrect summaries of the properties of each primitive, which were clearly driven more by the limited understanding of the author than any kind of real-world usage.
Somehow found myself watching it a few weeks ago. In it the biggest realisation I had was that I would have been just as likely as the developers at flickr, vimeo etc at punching in `sha1(secret_key + 'foobarbarbaz')` for computing a MAC. Thus began my foray into cryptography. My reading list is a little backlogged but 'Cryptography Engineering' is bubbling its way to the top.
My biggest takeaway so far is to just stay the hell away from crypto, but I work with other developers on big codebases, so I need the knowledge firepower to convince them to stay the hell away from crypto.
That being the case, there wasn't much I wasn't familiar with in the article, but since I'm a crypto newbie it was nice to go over those concepts again.
EDIT: Please correct me if you didn't mean to come across that way, it's just the last comment on the blog:
> this post is just terrible. i don't understand why people feel the need to learn a tiny bit about a subject, and regurgitate their misunderstandings through blogging. please take it down, you are making the world a worse place.
has made me wary.
In general, I'm a fan of having the average developer know something, and in general I want that "something" to be:
1. Here's some basics on how crypto works
2. Here's some basics on how it gets broken
3. Here's how you can screw up even with well-designed systems
4. Here are some solid things that will see you through if you use them correctly (plus how to use them correctly)
This article doesn't really do any of that.
> When disagreeing, please reply to the argument instead of calling names.
You're implying the article is useless, and that it shouldn't be here. Justify that, if you're going to go through the trouble of making a post.
Encryption topics were the big wake-up call for me regarding not relying on Wikipedia for math/tech info. When I started the above blog posts, I dug around for background info from a variety of sources until I got my head around the math, and found Wikipedia's entries on encryption topics to be basically unfixable without doing a large enough rewrite to guarantee an immediate revert.
Anyway, I wish this rosedu post had come a few months earlier; it would have saved me quite a wild goose chase.