News for hackers. Stuff that matters.
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by tptacek on Wednesday June 03, 2009 @08:57AM (#639669)
Hm. I wrote this for our normal blog readers, who live and breathe security stuff, so I don't know how well it'll carry here.
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by dhimes on Wednesday June 03, 2009 @09:31AM (#639713)
It's a fun read. Makes me realize there's a HELLUVA lot more to security than meets the eye, even the eye of someone who's pored over some authentication code. Good submission for HN.
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by _pius on Wednesday June 03, 2009 @10:01AM (#639759)
You blogged the shit outta that post!

Definitely an interesting read even for crypto dilettantes. Perhaps, especially for crypto dilettantes.

I took Rivest's Computer and Network Security class in college and the most important takeaway for me, far outstripping all of the interesting technical content, was "Don't implement crypto."

Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by tptacek on Wednesday June 03, 2009 @10:06AM (#639769)
Man, you had "don't implement crypto" and I was all, that kicks ass. Then you edited it to say "in general", and now I'm sad.
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by _pius on Wednesday June 03, 2009 @10:08AM (#639779)
Ha! Good point. Edit undone. :)
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by access_denied on Wednesday June 03, 2009 @02:19PM (#640142)
"Perhaps, especially for crypto dilettantes." Yes, that's what I thought in the middle of it: he wrote it to educate his clients in an entertaining way to not have to explain this tricky thing for a millionths time. Good read, BTW.
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by Semiapies on Wednesday June 03, 2009 @02:24PM (#640152)
The chorus of "You just made me aware of how vastly unaware I was on the subject!" (which I'll join in on right now) indicates the value found here, I think. :)
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by tom_b on Wednesday June 03, 2009 @10:07AM (#639774)
I enjoyed it, even if it makes my head spin. I'm several years from my last reading of 'Applied Cryptography' and have never really gone into the deep end of that pool. So what, it [edit: meaning the blog article] is a fun read of hacking away in the security code world.

[edit: Thomas, thanks for the book recommendation below, I'll definitely grab a copy]

Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by tptacek on Wednesday June 03, 2009 @10:14AM (#639786)
Throw that book away, and buy Ferguson and Schneier's "Practical Cryptography", which Schneier contributed to in penance for writing "Applied Cryptography". Portions of the proceeds of "Practical Cryptography" are donated to a fund that helps the people who wrote crypto based on "Applied Cryptography".
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by dschobel on Wednesday June 03, 2009 @12:44PM (#639996)
What in particular is wrong with "Applied Cryptography" ?
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by tptacek on Wednesday June 03, 2009 @01:15PM (#640030)
Lots of random facts about crypto trivia. Not a lot of context. Even less information about how to actually safely use crypto primitives. You'll come out of it knowing how to get CAST or IDEA into your code --- two ciphers nobody uses anymore --- but not how to properly choose an IV for CBC mode.

Everything that is wrong with "Applied" is right with "Practical". "Here are 4 modern block ciphers. We wrote one of them. Don't use it. You should use AES, but if you're a paranoid, use Serpent. But really use AES." It's great stuff, especially because if you really read it, you're going to end up not implementing crypto directly at all.

Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by gchpaco on Wednesday June 03, 2009 @02:09PM (#640128)
Nothing, if you know exactly what you're doing. But it's not very good about explaining why e.g. throwing error messages is bad. It's sort of like a toolbox full of really sharp, pointy things with the implicit understanding that sticking your hand in blindly will hurt, and then being surprised when there's a rash of hand injuries.
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by djahng on Thursday June 04, 2009 @01:56AM (#641015)
So, in the context of the SSO cookie, could tampering with the encrypted data be prevented by signing the ciphertext (please excuse the terminology if it's not correct)? What I mean by that is, encrypt the cookie's plaintext (e.g. "user=username, role=admin, etc."), and then sign it, so the value stored in cookie is something like <ciphertext>:<signature>?
Re:Typing The Letters A-E-S Into Your Code? You’re Doing It ... by tptacek on Thursday June 04, 2009 @05:42PM (#642306)
In the context of SSO, you could probably get away with not even encrypting it. Just take HMAC-SHA256 of the cookie contents and tack it on.