News for hackers. Stuff that matters.
Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @12:53PM (#7581868)
I am not a fan of this book. I wrote a review of the book as an HN comment. I dislike this book so much that for the first time in the history of my use of HN, my comment overflowed the bounds for HN comments. So, here it is:

http://pastebin.com/raw.php?i=NXgU30xK

(as a Github gist:

https://gist.githubusercontent.com/anonymous/3cc34251e501c2c...)

Re:Practical Cryptography With Go by napoleond on Sunday April 13, 2014 @02:15PM (#7582229)
This is fantastic, thanks for taking the time to write that out. (And my condolences to the author... I know very well how hard it is to have your work so thoroughly slammed but in this case it's important.)

One minor nit; I believe there is a typo in the review which caused parsing problems on my end:

The contact forward secrecy provides a design is...

s/contact/contract ?

Re:Practical Cryptography With Go by Sprint on Sunday April 13, 2014 @01:07PM (#7581920)
As my browser displayed it with very long lines by default I wrapped it to 72 for better readability: http://pastebin.com/raw.php?i=NXgU30xK
Re:Practical Cryptography With Go by stevekemp on Sunday April 13, 2014 @02:05PM (#7582176)
Dammit - The perfect time for me to pimp http://markdownshare.com/ ;)
Re:Practical Cryptography With Go by Sprint on Sunday April 13, 2014 @02:14PM (#7582219)
Nice! http://markdownshare.com/view/b311d9a1-76a8-4007-bda3-ff9a9b...

I'd recommend adding some more metadata (when was it posted, maybe a nick/Anonymous) and a clear distinction between "frame" and "content".

Re:Practical Cryptography With Go by stevekemp on Monday April 14, 2014 @04:18AM (#7585049)
I was planning a new view, which is just the user-submitted text, and that will be live within the day. (Similar to how on imgur.com you can link to the image directly, or the image with adverts.)

But extra meta-data I've been loathe to add so far because I see it as a barrier. I'm open to persuasion though.

Re:Practical Cryptography With Go by StavrosK on Wednesday April 16, 2014 @07:56AM (#7597181)
Is there a way to make this non-browser-width? Maybe an option? My screen is too long to read comfortably on.
Re:Practical Cryptography With Go by jwcrux on Sunday April 13, 2014 @06:37PM (#7583420)
Just curious - what does this have that Gist doesn't, with the exception of creating an account?
Re:Practical Cryptography With Go by stevekemp on Monday April 14, 2014 @03:38AM (#7584936)
Biggest thing for me is that it is self-hosted..
Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @01:13PM (#7581935)
Thanks! I just shrank my browser window to get that effect. :)
Re:Practical Cryptography With Go by cryptonoob on Sunday April 13, 2014 @12:57PM (#7581885)
Do you have any books that you can recommend as an alternative for learning cryptography (for people with some exposure/programming experience but not experts in crypto)?
Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @12:59PM (#7581892)
http://sockpuppet.org/blog/2013/07/22/applied-practical-cryp...

The more important recommendation, which this book misses, is NaCl (or its repackaging in libsodium). If you can use NaCl, use NaCl, and nothing else.

Re:Practical Cryptography With Go by dchest on Sunday April 13, 2014 @04:12PM (#7582784)
Speaking of Go, the official go.crypto repository comes with NaCl port:

https://godoc.org/code.google.com/p/go.crypto/nacl

Re:Practical Cryptography With Go by yeukhon on Sunday April 13, 2014 @04:14PM (#7582795)
How about Practical Cryptography (http://www.amazon.com/Practical-Cryptography-Niels-Ferguson/...) as a quick-guide over the more verbose Applied Cryptography which is much older than the former?
Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @04:33PM (#7582876)
They are effectively the same book. If I had "Practical", I wouldn't shell out extra money for "Cryptography Engineering".
Re:Practical Cryptography With Go by anaphor on Sunday April 13, 2014 @02:15PM (#7582228)
Re:Practical Cryptography With Go by j2kun on Sunday April 13, 2014 @06:02PM (#7583279)
> The randomness requirement for DSA is such a huge problem for DSA that it forms the centerpiece of Daniel Bernstein's critique of the NIST standards process. This is the bug that broke the PS3.

I've been reading about this recently, but I'm confused. Wasn't the PS3 issue that the key was static? That's not the opposite of randomized, because there could be a deterministic, yet message-specific scheme for generating the secret key. Or is that known to be unacceptable?

> there is concern that the NIST curves are backdoored and should be disfavored and replaced with Curve25519 and curves of similar construction.

I've heard the opposite, that the curves are not the problem but the choice of basepoint. E.g. [1] states: "...the vulnerabilities in Dual-EC have precisely nothing to do with the specifics of the NIST standard elliptic curves themselves. The 'back door' in Dual-EC comes exclusively from the relationship between P and Q -- the latter of which is published only in the Dual-EC specification."

Is it still a matter of dispute whether the curves themselves are suspect? Or is the referenced blog post outdated?

[1]: http://blog.cryptographyengineering.com/2013/09/the-many-fla...

Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @06:46PM (#7583453)
No, the PS3 problem was that the per-message DSA nonce ("k") was repeated (and thus not random). I'm not sure about the rest of your paragraph; if you're referring to deterministic alternatives to standard DSA, yes, they exist. Again, see Bernstein.

Dual_EC isn't a curve standard, it's a random number generator standard. The NIST P- curves are thought to possibly be backdoored. Dual_EC is all but certainly a backdoored.

Re:Practical Cryptography With Go by j2kun on Monday April 14, 2014 @07:07PM (#7589426)
So you're saying that there is something inherently insecure about the constants defining the curves themselves. I've read some of Bernstein's stuff on 25519, and everything there is about selling curve25519 as making the engineering challenges easier by avoiding common pitfalls of the Weierstrass normal form.

And I can't find anyone anywhere giving evidence of mathematical insecurity of any NIST standard curves. Evidence might come in the form of a (significantly more than state of the art)-subexponential but still superpolynomial time algorithm. Dual_EC has something even better: a proof of insecurity.

Re:Practical Cryptography With Go by tptacek on Monday April 14, 2014 @07:19PM (#7589470)
Re:Practical Cryptography With Go by j2kun on Friday April 18, 2014 @10:10AM (#7609177)
And I quote, "So what's the problem? Answer: If you implement the NIST curves, chances are you're doing it wrong"

This is just reinforcing my point. There is nothing known to be mathematically wrong with the standard curves. Bernstein just warns against all the (admittedly many) pitfalls in implementations, and that the Weierstrass normal form makes it easier to run into problems than the normal form he proposes. This is the only reason he says NIST doesn't guarantee security, and of course they don't guarantee against engineering errors.

But that's extremely different from saying NSA planted backdoored curves intentionally. The only thing in Bernstein's analysis that I could possibly construe as suggesting malicious behavior is that the NIST curves are outdated (the suggestion being that they are intentionally left outdated).

Re:Practical Cryptography With Go by ninguem2 on Sunday April 13, 2014 @08:36PM (#7583863)
If secp256k1 is backdoored, why hasn't someone stolen a shit ton of bitcoins?
Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @08:52PM (#7583928)
First, SECP256K1 isn't (IIRC) a NIST curve.

Second, if NSA backdoored a curve standard, they probably did it in a fashion that only allows them privileges. Google [NOBUS NSA]. Dual_EC is a NOBUS backdoor, unless you can efficiently solve the ECDLP, in which case the backdoor doesn't matter anyways.

Finally, even if you stipulate for argument that a curve was backdoored in such a way that a researcher might find the backdoor, who's to say that curve researchers care that much about Bitcoin?

Re:Practical Cryptography With Go by damian2000 on Sunday April 13, 2014 @09:50PM (#7584084)
Wow, thanks for your comprehensive review! I only got a chance to skip the first couple of chapters, and initially thought it was just a set of examples of how to use go's crypto library. Seems like the whole thing should be taken with a grain of salt.
Re:Practical Cryptography With Go by bachback on Sunday April 13, 2014 @04:41PM (#7582914)
thanks. but why has crypto to be equivalent to "heart surgery"? if I would describe the state of the art of Internet security I wouldn't apply that term.
Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @04:42PM (#7582920)
The point isn't about life and death so much as it is about the likelihood of success for someone just starting out with only a book as a guide.
Re:Practical Cryptography With Go by Sir_Cmpwn on Monday April 14, 2014 @01:14AM (#7584643)
The biggest problem with crypto is navigating the vast and dangerous sea of misinformation.
Re:Practical Cryptography With Go by jimktrains2 on Sunday April 13, 2014 @06:12PM (#7583319)
"It's nuanced and detail oriented" would be my answer. I'm not a cryptographer, but in my dealings and exploration I've found lots of issues that just aren't obvious, e.g. timing attacks and length extension attacks. There are also many things that are obvious, but require care to do, e.g. single-use nonces and authentication.

A mistake in crypto can invalidate your entire system, not just make it unreliable or crash, and those mistakes don't have to be something obvious, there are many insidious little things that can happen as well. That's my take on it.

That said, I believe that software engineers should learn basic crypto and fiddle around with their own ideas, _with the understanding that there is always someone smarter than them_ in order to understand some of the problems they'll be facing.

Re:Practical Cryptography With Go by higherpurpose on Sunday April 13, 2014 @04:29PM (#7582855)
Please, tell us how you really feel about it.
Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @04:32PM (#7582872)
I also feel very strongly that the inverse of [[1,2],[2,3]] is [[-3, 2],[2,-1]], if you'd like to personalize that somehow too.
Re:Practical Cryptography With Go by anaphor on Sunday April 13, 2014 @05:53PM (#7583233)
How do you feel about ordering complex numbers?
Re:Practical Cryptography With Go by tptacek on Sunday April 13, 2014 @05:57PM (#7583253)
I'LL KILL YOU AND YOUR WHOLE FAMILY