Friends don’t let friends do crypto

Jeff Atwood has this post about the dangers of copying code from the internet and writing your own crypto routines. He includes this very funny play from Thomas Ptacek about writing crypto which also touches on one of my favorite topics, web SSO.

I do question Jeff’s comment about “thoroughly reviewing code”. These kinds of issues are very seldom found in code reviews from what I have seen in 20 years of doing them. It is very difficult to review someone else’s code and catch all the subtle land mines that might exist. You get lucky once in a while and find something, but all that does is reinforce a false sense of confidence that your review process is preventing these sorts of errors.

That’s not to say you shouldn’t do code reviews, but be realistic about it. Code reviews are useful to find obvious stuff and to share knowledge about the code across team members, but you aren’t going to find the subtle errors.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s