News for hackers. Stuff that matters.
Re:Basic Cryptography Concepts for Developers by jkingsman on Tuesday October 06, 2015 @08:25PM (#10343388)
Great article for a basic primer, but anyone who is actually developing cryptography needs to hit a few more books - short articles like this are great because they make it simple, but that can often lead to the perception that a dev understands everything they need to, which leads to broken crypto in production and tears.
Re:Basic Cryptography Concepts for Developers by sohkamyung on Tuesday October 06, 2015 @10:15PM (#10343825)
Reading Ross Anderson's "Security Engineering" is probably a good idea. It covers security as a system, instead of concentrating just on encryption.

PDF of the first and second editions available at [ https://www.cl.cam.ac.uk/~rja14/book.html ]

Re:Basic Cryptography Concepts for Developers by jeff_marshall on Wednesday October 07, 2015 @12:42AM (#10344215)
Security engineering is a great book. I learned a lot about systems (as opposed to software) from the first edition. Definitely worth a read for getting the 'security mindset'. Techniques can be picked up according to the needs of the job (and should be!)
Re:Basic Cryptography Concepts for Developers by sarciszewski on Wednesday October 07, 2015 @12:59AM (#10344254)
Whoa, awesome! And it's online for free too.

I've looked at the first chapter so far and I'm hooked.

I'm adding this to https://github.com/paragonie/awesome-appsec :D

Re:Basic Cryptography Concepts for Developers by paragon_init on Tuesday October 06, 2015 @08:39PM (#10343440)
This is an excellent point. Cryptography is not a trivial field to master.

(I've updated the title to read "Basic Cryptography for Developers" instead of "Cryptography for Developers" so as to not accidentally make someone think they know it all.)

Re:Basic Cryptography Concepts for Developers by jeff_marshall on Tuesday October 06, 2015 @09:11PM (#10343555)
This is very true. I've been involved in building systems involving cryptography for about a decade now, and having transitioned from the weeds (side channels, physical security) to the forest (secure systems architectures), I think I could have spent the whole time in one fairly narrow field and still not know half of it. At best, I can say that I've gained an appreciation for where the demons lie. At worst, I can say that I'm educated enough to be dangerous ;)

It's a pity that very few customers are willing to pay for the effort to exorcising all (or at least most) of those demons in the systems I've seen deployed. The product differentiator (and hence the ROI) is almost always somewhere else. The science & engineering is vastly better than it was when I enterted the field, but it still has a long way to go.

Re:Basic Cryptography Concepts for Developers by sarciszewski on Tuesday October 06, 2015 @09:18PM (#10343585)
What I find frustrating, personally, about cryptography (or security in general) is that a lot of knowledge seems to be concentrated in a very specialized area, but it doesn't diffuse very far outside of there.

For example: https://twitter.com/voodooKobra/status/651554578719227904

To try to combat this, I've been trying to help make basic security and cryptography knowledge accessible to web and mobile app developers, to hopefully result in an overall net gain for the security of many companies the world over.

Obviously I can't teach everyone everything there is to know about these areas. (For starters, I myself probably don't even know half of it. Lattice-based timing attacks? Not a clue!) But realistically if I can make a dent in the propensity for bad habits and worse design choices, it's something.

Re:Basic Cryptography Concepts for Developers by jeff_marshall on Tuesday October 06, 2015 @09:33PM (#10343643)
Agreed. I've started poking into security for http-based things (web sites, REST api's, etc), and it's got a mostly different knowledge base from the one I've studied. Compare, for example, the CHES[1] proceedings (a good source of interesting side-channel attacks and mitigations back when I was doing that) with something like the hackers playbook. Once you get down into the details, these fields have a lot of unique concerns. Some implementation principles (least privilege, reference monitors, etc.) may have value in both domains, but the domain specific knowledge is completely siloed as you have observed.

That said, my biggest lamentation is that most people don't seem to apply solid implementation principles to the systems they build. Witness vulnerabilities like heartbleed. It would have easily been avoided if the common buffer reuse guidelines in pretty much every implementation guide for security would have been used.

[1] http://www.chesworkshop.org/

Re:Basic Cryptography Concepts for Developers by sarciszewski on Tuesday October 06, 2015 @09:37PM (#10343667)
> Some implementation principles (least privilege, reference monitors, etc.) may have value in both domains, but the domain specific knowledge is completely siloed as you have observed.

Some what conversely, I've proposed a model for classifying various forms of security vulnerabilities that might be easier for developers to conceptualize:

https://paragonie.com/blog/2015/08/gentle-introduction-appli...

The idea is treat it like a taxonomic model: You have general security mistakes (data-instruction confusion), which can be drilled down into vulnerability classes and then specific bugs that, either stand-alone or chained together, result in specific vulnerabilities in specific implementations.

Or maybe I'm way off base here. The feedback I've gotten has largely been positive, though.

Re:Basic Cryptography Concepts for Developers by jeff_marshall on Tuesday October 06, 2015 @09:58PM (#10343751)
I think we're in violent agreement. I'm a fan of the high-level approach taken by the common criteria[1], which emphasizes cataloging threats, security objectives, environmental concerns & vulnerability mitigations when designing secure systems. This seems to overlap more than a bit with your thought process based on your blog post.

The challenge is to get people with good critical thinking skills (like the kind you advocate, and embodied in proceses like the CC) and domain knowledge involved in building things. For example, I think I have a good ability to reason (I started my career in formal methods) but at present I know very little about how a browser actually treats it's inputs. So, it's quite difficult for me to reason about the application operating environment presented by a web browser running some javascript. I wouldn't trust myself to start coding a secure web site today. Hopefully the industry will foster both of these skills (a critical mindset & good domain knowledge) and put them to good use.

[1] http://www.commoncriteriaportal.org/

Re:Basic Cryptography Concepts for Developers by dfc on Wednesday October 07, 2015 @01:01AM (#10344259)
> The idea is treat it like a taxonomic model..

You are aware of Mitre's Common Weakness Enumeration, right?

https://cwe.mitre.org/

Re:Basic Cryptography Concepts for Developers by voltagex_ on Tuesday October 06, 2015 @09:36PM (#10343660)
How does https://www.crypto101.io/ compare?
Re:Basic Cryptography Concepts for Developers by paragon_init on Tuesday October 06, 2015 @09:40PM (#10343683)
Crypto 101 is a ~200 page book that is far richer in detail and examples. It also covers a lot of primitives (one-time pads, hash trees, etc.) that we eschewed for the sake of brevity.

This blog post is digestible in a few minutes. Crypto 101 can occupy a novice for a few hours. Given the hard choice of one of the two, we would encourage anyone interested to read Crypto 101 over our blog post, as they'll walk away with a much more detailed understanding .