6 ms·
Everything you need to know about cryptography in 1 hour
- cperciva 17y agoOn Thursday afternoon I gave my talk 'Everything you need to know about cryptography in 1 hour' at BSDCan'10. Two HNers (as far as I know -- there might be more?) came to hear me speak, but several other people here have said that they would like to see talk but couldn't attend; so here's my talk slides. I understand that a recording will go online somewhere at some point, but I'm not entirely sure of the details about that.
- rs 17y agoThanks Colin. Very informative.
- johkra 17y agoSince I've only the slides, I have a question about the following point: > DON’T: Put FreeBSD-8.0-RELEASE-amd64-disc1.iso and CHECKSUM.SHA256 onto the same FTP server and think that you’ve done something useful. I take it the FTP got compromised and people simply regenerated the checksum for a modified image? Wouldn't signing the checksum file solve the problem? Using different FTP servers for distributing the image and the checksums makes mirroring probably difficult.
- cperciva 17y agoI take it the FTP got compromised and people simply regenerated the checksum for a modified image? I'm not aware of any problems with FreeBSD FTP mirrors being compromised recently. I wanted an example of data-adjacent-to-hash and most of the audience was FreeBSD people, so I figured that I'd go with an example close to home. Wouldn't signing the checksum file solve the problem? Yes. Or just relying on the FreeBSD release announcements, which contain SHA256 hashes and are signed.
- lkujhygfhjk 17y agoIf you then change the advice to, DON’T: Put FreeBSD-8.0-RELEASE-amd64-disc1.iso and your private key on the same server
- va_coder 17y agoWhy did you choose to publish your slides in PDF when PDF documents are a main tool for security attacks? Update: If PDFs are a major source of security attacks, and author cares about security, and author publishes document in PDF form, then why would you downvote this question?
- jodrellblank 17y agoBecause it's a completely nonsensical question. If balaclavas are used in bank robberies, and you care about the safety of your money, why would you wear a balaclava on a mountain climbing expedition? PDFs are not a tool for security attacks because they are PDFs, they are a tool for security attacks because of vulnerabilities in Adobe Reader. Any given PDF is not a danger, only PDFs with exploits are dangerous. And including a buffer overflow exploit, rootkit and phone-home code isn't something you're going to do accidentally while publishing your talk slides, is it?
- Xurinos 17y agoI do not have the power to downvote, and I hate when people downvote because of disagreement but do not explain their stance -- I learn nothing from it; I can give you my perspective on your comment. (It would be nice to have a personal downvote message feature or something; the anonymity helps us avoid embarrassment, I guess.) First, your point is irrelevant. Whatever the medium, this discussion is about cryptography. There is not a real case of hypocrisy here. Cryptography is certainly related to security, but as far as I can tell, that is not the thrust of this discussion. Second, while the technology can be abused, as you point out, that is a far cry from this particular author abusing it and using it as a security attack. The author's PDF is fine. I am not agreeing or disagreeing with you, btw. In other words, I can see that this comment was downvoted because it did not meaningfully add to the discussion. I usually see downvotes on posts that include offtopic personal axe grinding. I may receive the same, myself, for this post, but I just wanted to help you avoid it in the future.
- JoachimSchipper 17y agoCould you expand a bit on your comments about Poly1305 ("too difficult to implement" - but Bernstein has a library, right?) and Blowfish ("DON'T use")?
- cperciva 17y agoYes, Bernstein has written code for Poly1305; but bus factors are bad. If you decide to use Poly1305, at some point you're going to want to use it on a new CPU or in a different language, and you'll find that DJB's code won't work for you. You should avoid blowfish because it has a 64-bit block size.
- JoachimSchipper 17y agoOkay, I can see that. Most of Bernstein's crypto work falls in that category, probably. Forgive my ignorance, but why is having a short block size especially bad? You don't want to subject 64 bits to a birthday attack, but something like CTR mode should work, right? (I still wouldn't recommend Blowfish - AES is used more widely and works perfectly well - I'd just like to understand your reasoning).
- cperciva 17y agoWith a 128-bit block, you can send 2^64 messages of up to 2^64 blocks each; that's not going to cause problems. With a 64-bit block, you're limited to 2^32 messages of up to 2^32 blocks before you overflow.
- agl 17y agoPoly1305 is a fundamentally different class of authenticator than HMAC-SHA256: the addition of an nonce into the function makes it unsuitable for some environments. But given Intel's new instructions, GCM is looking like a more attractive polynomial MAC these days.
- tptacek 17y agoWhy would you take GCM over OCB (apart from patents)? Or, for that matter, OMAC/EAX?
- gduffy 17y agoI don't suppose you're planning to tie these recommendations up into an open source C99 library with an NaCl-like crypto_box interface? Oh, and can I have a pony too? :)
- NateLawson 17y agoBetter, add AES and SHA-256 support to NaCl. With your insight into preventing side channel attacks, it would be a great combo.
- gduffy 17y agoI could be wrong, but I don't think NaCl is portable anywhere but x86 or x86_64. ARM needs good crypto too. Though I suppose we could ask for ARM support in NaCl too since we're asking for ponies :) Also, does NaCl support signing? I think crypto_box offers "authentication" which is a slightly different promise.
- NateLawson 17y agoNo signatures yet. See this summary I wrote a while back for more info. http://rdist.root.org/2009/07/14/nacl-djbs-new-crypto-library/ http://rdist.root.org/2009/07/14/nacl-djbs-new-crypto-librar...
- beloch 17y agoOne point I think crypto-people need to hammer home to non-crypto audiences is that they should not encrypt and transmit anything that will remain sensitive for more than 5-10 years via any form of encryption relying on factoring, one-way hashes, etc.. (Pretty much everything classical short of one-time-pads exchanged in person.) Credit card transactions? Fine. Affairs? State secrets? Not fine. If you're interesting enough, your coded messages will be archived and cracked within a decade or two (or less). A lot of crypto algorithm's are theoretically secure for thousands of years (or longer) assuming an eavesdropper has access to existing algorithms and classical hardware with Moore's law scaling. Unfortunately, it's currently non-existing attack algorithms you really need to worry about. Advances are relentless. Then there are things on the horizon like quantum computing...
- cperciva 17y agoQuantum computing is overrated. So far all it has told us is that 15 = 3 * 5 with high probability. While Shor's algorithm demonstrates that integer factorization is in BQP, there are very good reasons to believe that many other problems are not; a large enough quantum computer may break RSA, but it won't break everything.
- beloch 17y agoMy point was that you don't need Quantum computing to break all existing crypto algorithms within a couple decades. QC just makes matters that much worse. (Downplaying Quantum Computing ostrich-style is very popular in classical crypto circles for some reason, but that's a topic for another day!)
- reikonomusha 17y agoWrong. We have made them do very fast Fourier transforms now. See http://physics.aps.org/pdf/10.1103/PhysRevLett.104.180501.pdf http://physics.aps.org/pdf/10.1103/PhysRevLett.104.180501.pd... for details.
- notauser 17y agoI once wrote a Crypto plug-in for mIRC that relied on one time pads distributed by floppy disk. (Someone created the masters and mailed them out.) A floppy disk worth of IRC chat is actually quite a lot but it also had a 'degraded mode' which used the last chunk of the random data as a symmetric cypher key. That would keep things going until the next disk arrived in the post. This just goes to show that if you are stupid enough to tell a geek what the best answer is then there is a pretty good chance that they will confuse it with the right answer. My only hope is that our inane chats about movies are, even now, causing cycles to be burned on a NSA supercomputer somewhere :-)
- natch 17y agoHow is this good code? x |= MAC_computed[i] − MAC_computed[i]; Shouldn't one side or the other (of the minus operation) be MAC_received[i]?
- cperciva 17y agoYes, that's a typo. Sorry. (Lesson learned: LaTex is not the best language to write code in.)
- natch 17y agoDO: Do what Bruce Eckel does, and have all code in a publication run through automated tests before releasing it. ;-). And... you're welcome?
- Robin_Message 17y agoAlso, x |= MAC received[i] − MAC computed[i]; Is making me twitchy, I mean I'm sure we're on two's complement machines and there is no C compiler in the world where those two could be unequal but still subtract to zero* , but still, how about one of x |= (MAC received[i] != MAC computed[i]); x |= (MAC received[i] ^ MAC computed[i]); Otherwise, Good stuff! * Possible break: If we have a separate sign bit, then we might have 0 and -0, which would subtract to give 0. Don't know of any machine/compiler that does that though.
- caf 17y agoYour != proposed change likely results in a branch, which is what we're trying to avoid. The ^ version is fine, but the original subtraction is too as long as they're unsigned.
- NateLawson 17y agoI wrote about this mistake before. Developers see a single-line RHS expression and think it evaluates without branching. http://rdist.root.org/2010/01/07/timing-independent-array-comparison/ http://rdist.root.org/2010/01/07/timing-independent-array-co...
- johkra 17y agoDO: Use a 2048-bit RSA key, a public exponent of 65537, SHA256, and MGF1-SHA256. How can I set the public exponent when generating a key? man gpg wasn't helpful. And why this particular number? I can see that it's 2^16+1, but I don't understand the advantage of this number compared to others. (Although I've been taught that people prefer small values for e now.)
- cperciva 17y agoThat was explained in the audio part of the talk. :-) Short answer: A long list of attacks in the past have been much harder with large public exponents; using 2^16+1 instead of 3 is a bit slower but is likely to make you safer if someone else gets smart in the future.
- johkra 17y agoThanks for answering my curious questions so far. =) Since I messed up formatting earlier, my first question about generating keys with this particular exponent was hidden: Do you know how to generate such a key pair using gpg (or another tool)? Or is this done automatically?
- cperciva 17y agoIn OpenSSL you can pass your public exponent to RSA_generate_key. I'm not sure about gpg... it has been a while since I last generated a key.
- gduffy 17y agoFor OpenSSL command line: openssl genrsa -f4 2048
- johkra 17y agoThanks, OpenSSL actually uses 0x10001 by default for e. I'll use it instead of GPG from now on to generate keys.
- 17y ago
- d0mine 17y agoThere is a typo "which which" on the 2nd "Side channel attacks" slide.
- lsc 17y ago>Don't even dream about storing your user's passwords on your server. No, not even if they are encrypted. While I always follow this when it comes to ssh logins, how do you suggest doing this for webapp logins? force everyone to use client certificates? mod_auth_kerberos? (hell, for that matter, kerberos keeps user passwords on the keyserver) I'm working on bringing my web bits up to snuff, and I'm seriously considering forcing the use of client certificates. That, or just saying 'fuck it' and writing a ncurses billing app that you ssh into. no web interface at all. Both of those solutions might work okay for me because I have a highly technical userbase, and my marketing is strong enough (or rather, I have other bottlenecks that are bad enough) that I can turn away some customers, but I don't see them working for most web applications.
- mootothemax 17y agoI think he's saying don't store the users' actual passwords, store salted hashes instead :)
- gduffy 17y agoWell, more explicitly PBKDF2 or scrypt. Some people might take "salted hash" as MD5(password+salt) or something.
- lsc 17y agoso the point here is just something that is slow to calculate? I mean, once the attacker has the hash, he can start trying random passwords against it. Sure, with a completely random password, that takes a while. But with a password a human can remember? So PBKDF2 or scrypt just slows down the process of checking a users password against a hash, right? That does make sense in that it does slow down an attacker (and combined with a strong user password it seems like it could be secure) but it doesn't solve the essential problem that humans are not good at remembering random things, and there is a limit to how slow your 'check password' function can be in production. your attacker can almost always be assumed to have more computing resources than you do.
- geoffc 17y agoThe manifestation of this crisp thinking is tarsnap. The best linux backup product I have ever seen.
- cperciva 17y agoThanks!
- anagri 17y agohttp://www.norvig.com/21-days.html http://www.norvig.com/21-days.html there ain't anything called learn it in x hrs/days
- deleted 17y ago[deleted]
- Groxx 17y agoAm curious as to why to use "x |= MAC_computed[i] − MAC_received[i];" instead of the block-wise comparison. Wouldn't the x |= approach be less secure, because two (or more) differences may cancel each other out? (am assuming that |= == ||= in Ruby, or a bitwise OR)
- gjm11 17y agoNo, not possible for differences to cancel. The bitwise OR of a bunch of things is zero only if all of the individual things are zero. The difference between two things is zero only if they're equal. Therefore, the final value of x is zero only if all the elements of MAC_computed and MAC_received match. (And -- the main point here -- how long it takes to do the calculation should be totally independent of what's actually in the arrays: no early termination, no operations that take different amounts of time depending on how many elements match, etc.)
- Groxx 17y agoah, bitwise or, was thinking incorrectly for some reason. And early termination makes sense, thanks! Didn't think of that.
- shin_lao 17y agoGreat slides, some comments though. I feel they focus too much on "use process X and algorithm Y". The difficulty is not to choose the algorithm or the process, but to understand what kind of problem you're dealing with in the first place. In other words: threat modeling. There isn't a single slide about threat modeling, unless I'm mistaken. If your error boils down to using SHA-1 instead of SHA-256, that's trivial to fix and you won't be exposed to real world attacks anytime soon. Talking about side channel attacks on a hyperthreaded core is just going to confuse the audience. This is a very sophisticated attack that require the attacker to be able to run code on the target machine. If that's your only vulnerability, consider yourself happy.
- cperciva 17y agoThe difficulty is not to choose the algorithm or the process, but to understand what kind of problem you're dealing with in the first place. I agree, up to a point. But there's no way you can teach that sort of understanding in 1 hour. :-) The purpose of this talk was to provide a checklist for developers of what they should and should not be doing.
- tptacek 17y agoBut, for instance, you recommended CTR-mode AES-256, but didn't discuss: * How to set the counters so that counter/IV can't collide and destroy your security * What metadata your messages need to include to make them not replayable * How to canonicalize your messages so that the process of packing, authenticating, encrypting, decrypting, and unpacking doesn't change the intent of a message. I think that may be what the grandparent comment is getting at.
- NateLawson 17y agoExcellent points. I would much rather have seen a talk on the hard issues such as these. Choosing an algorithm is simple if you already handle the above issues -- you've already heard a lot about AES by then. On the other hand, choosing AES-CTR as Colin recommends in the talk without handling the above issues is exactly where most developers are today. Put another way: find me one crypto library or application implementing CTR mode that got all the above issues right but used a poor block cipher (not AES or 3DES).
- moserware 17y ago> * SSL requires that you decide which certificate authorities you want to trust. One subtle point is that governments can force seemingly great certificate authorities to give them a certificate so that they can do man-in-the-middle attacks and still have a reasonable "trust chain" that you can look at in your browser. More details of this "compelled certificate creation attack" at http://cryptome.org/ssl-mitm.pdf http://cryptome.org/ssl-mitm.pdf If I had to bet, I'd say most serious attackers aren't bothering to break crypto math or even weak implementations but are rather focusing on this approach by getting a CA to give them a good cert to spoof another site and it'd go practically undetected. Ultimately with crypto (or anything else) you have to implicitly trust somebody (e.g. Mozilla Foundation) or something (your processor to correctly execute a program or your quantum crypto box to not behave maliciously). As long as this is the case, you can't have perfect security. Great paper of "Reflections on Trusting Trust" : http://cm.bell-labs.com/who/ken/trust.html http://cm.bell-labs.com/who/ken/trust.html
- yannis 17y agoSlides look great and so is the presentation. May I ask what you used to prepare them?
- Nelson69 17y agoWhat's wrong with Elliptical curves? Seriously, are there some known attacks against ECDSA? And what of DSA2?
- gjm11 17y agoI'm neither Colin nor a cryptographer, but I think elliptic curve cryptography (1) involves more complicated ideas and code (which might therefore be easier to get wrong), and (2) is subject to more patent claims, than its rivals, without any obvious big benefit to outweigh those facts. [EDIT: oh, and because of 1 and 2 ECC is used less, and therefore your implementation mightn't have had its bugs and design flaws so thoroughly shaken out.] Certicom has ~130 ECC-related patents. You probably don't want to have to crawl through them all making sure that your code, or someone else's code that you're using, doesn't infringe (and won't be found to infringe by a not-necessarily-infallible jury if you get sued anyway). [EDIT again: actually, ECC does have a claimed big benefit, namely not needing such long keys. But one might reasonably be worried by the possibility that an algorithmic breakthrough some day might suddenly make longer keys necessary...]
- tptacek 17y agoECC is extremely well studied and implemented almost by default in embedded settings. There are providers of it other than Certicom. The reality is, you need to consult a cryptographer before you implement any public key system. RSA and vanilla DSA are also spectacularly easy to screw up.
- cperciva 17y agoIn an embedded environment I would probably use ECC. I believe that I mentioned this in my talk; certainly I mentioned that my advice was for the context of software on general-purpose CPUs. Unusual environments need special treatment.
- tptacek 17y agoECC vs. RSA is a place where you certainly know better than me; I have that list of things Kaliski said not to do wrong with ECC and very little else. I also think we probably don't disagree very much about ECC. Where I know we do disagree: public key crypto is a threshold over which I would not be OK implementing a custom cryptosystem. If I need public key, it's GPG or nothing. I am terrified of public key crypto.
- hackermom 17y agoI found some of the information in this presentation to actually be wrong. The guy repeats himself, and at two points he even contradict himself. I also didn't like that a very large portion of it was presented with a very fervent zeal, replacing actual knowledge of why and why not with useless favorism and indoctrination; the guy is a zealot, and that's a very, very bad ingredient in any serving of important information. I would not recommend this particular presentation to anyone. add.: Thanks for the downvote, Colin :D Oh boy...
- cperciva 17y agoat two points he even contradict himself Where are those? replacing actual knowledge of why and why not with useless favorism and indoctrination I provided some explanation of why and why not in the talk. Slides != transcript. EDIT: And no, the downvote didn't come from me.
- deleted 17y ago[deleted]
- Deestan 17y agoPlease remember that this wasn't a book chapter or a blog posting, but presentation slides. As presentations are normally held, the slides are just key excerpts from the one hour talk he was holding while the slides whizzed by.
- khafra 17y agoHackermom, you sound confused about the downvotes. To provide a bit of background: Colin Percival has a doctorate in computer science from Oxford, has won the Putnam, has been FreeBSD's security officer for years, and discovered the hyperthreading leak noted in this presentation. Most people who've been on Hacker News for a while trust his judgement. I'd like to think we would all--cperciva included--welcome specific criticisms or errors, but by claiming they exist without naming them, you're asking us to take your word over his. Your score reflects the fact that you haven't earned that.
- tptacek 17y ago
- caf 17y agoI'll be interested to hear the thoughts behind the "Probably Avoid" recommendation on DSA and EC signatures. They're both attractive in some situations because they produce much shorter signatures than RSA. The recommendation for AES-256 over AES-128 runs contrary to Schneier's advice. It makes it hard for the non-experts when the experts can't agree...
- cperciva 17y agoDSA and EC both have benefits in some rare circumstances. That's the 1% of the time when you ought to consult a cryptographer. I'm aware that my advice concerning AES does not match Schneier's advice. I don't think he takes side channel attacks seriously enough.
- tptacek 17y agoHe also thought "cube cryptanalysis" was going to break most modern ciphers. Do you think he's a serious practitioner? I think he's a pundit.
- cperciva 17y agoI think Schneier does less cryptography now than he used to, but I would still say that he's much more than just a pundit.
- tptacek 17y agoI'm interested in why you think that (I'm in listen mode here, not argue mode).
- cperciva 17y agoHmm. I'm having trouble putting my finger on anything really concrete right now. More than anything else I'd say that it's just a general impression from how well in touch he seems to be with current events.
- carlhaagen 17y agoi kinda found this presentation to be chock full of "i am right, you are wrong" "i know better than you" et cetera. it's as if he's trying to coerce people into using what -he- thinks is best and what -he- prefers, but not really caring for sorting out the facts or explaining the details to give people a big enough picture to make educated choices of their own. "just go with this and that, trust me it's the best". no question actual knowledge is in there, the guy knows cryptology, but this seems to be a slide for indoctrinating people into sharing his preferences in crypto, not for teaching, and i personally find it to be the completely wrong approach.
- cperciva 17y agoi know better than you Well, I do know better than my audience. That's why they came to my talk. :-)
- robryan 17y agoGiven a one hour overview though there has to be some of this. No time for the history of cryptography and the pros and cons of all the methods employed. It seems he wanted the audience to take away some key points that if without any other knowledge should prevent the majority of attacks.
- tptacek 17y agoThe repeated advice in this talk not to use block cipher modes that provide both encryption and authentication (which also follows from the advice not to use CBC-MAC) is contrary to a lot of professional best practice advice, very much including NIST, and represents Colin's opinion more than it does a consensus on the issue. It is easier to get something wrong when it has more moving parts. You are less likely to screw up EAX-mode AES --- presuming your library "just does it" for you --- than you are to screw up CTR-mode AES and HMAC-SHA256. The rest of the talk looks great, although I flinched when I saw the CTR recommendation, because CTR is also really easy to screw up. Obviously, the comments about SSL are crazy. But you expect that going in to a Colin talk.
- cperciva 17y agoCTR is also really easy to screw up That recommendation wasn't about avoiding 'easy to screw up'. That one was about avoiding 'almost impossible to avoid having your key stolen via a side channel attack'. Obviously, the comments about SSL are crazy. Do you disagree with either of the following two pieces of advice? DO: Use SSL to secure your website, email, and other public standard Internet-facing servers. DO: Think very carefully about which certificate authorities you want to trust.
- tptacek 17y agoI disagree with the assertion that SSL is a bad protocol. It's an ugly protocol, but that's because things that are elegant are rarely secure. And, of course, I disagree with your reasoning about authenticated encryption. You're saying, "you're exposing your block cipher to direct attack by overloading it to both encryption and authentication". But it's probably exposed to side-channel attacks either way. Meanwhile, the implementation flaws that people end up with in naive HMAC systems break far more systems. I suspect this is another example of the impedance mismatch between your academic approach to this and my "having to slog through people's terrible crypto on a monthly basis" approach.
- cperciva 17y agoIt's an ugly protocol, but that's because things that are elegant are rarely secure. Funny, my experience has been exactly the opposite. But [your block cipher] probably exposed to side-channel attacks either way. Exposed, yes. Exposed to attackers who don't hold the MAC key, no. Exposed to chosen-ciphertext side channel attacks, no. These distinctions matter. having to slog through people's terrible crypto on a monthly basis I do this too. But I try to educate people so that they write slightly less crypto.
- jasonkester 17y agoAs somebody who's not already a crypto expert, I found those slides next to worthless by themselves. I suspect that the speaker put a lot of extra explanation into them during the talk to explain why TLA1 is better than TLA2, but it doesn't come across at all in the text. As an example, I'd read an article about timing attacks, so I knew what the author was getting at in the slide about rewriting that loop. If I saw the slide without any background, I'd have been left scratching my head since it doesn't make any attempt to explain the actual issue. Let us know when the audio is available. I'll keep the slides around until then.
- cperciva 17y agoI suspect that the speaker put a lot of extra explanation into them during the talk to explain why TLA1 is better than TLA2, but it doesn't come across at all in the text. Yep. There's a practical limit to how much text you can put into slides and have them still be useful; I decided that it was more useful to have the recommendations in the slides and the reasoning orally than vice versa.
- tptacek 17y agoI think I can sum up the fundamental difference between my take on crypto (run away!) and Colin's ("use OAEP padding instead of PKCS!"). When Colin thinks of crypto he thinks of things like Tarsnap, which was built and designed to embrace cryptography; cryptography is part of the reason it exists. It is not an afterthought. When I think of crypto, it's about all the places crypto pops up in normal non-secure CRUD-webapp situations. Like the guy who uses crypto to effect single-signon without sharing databases between apps. Or the team that encrypts URLs instead of implementing access control. Or the team that uses AES to "secure" a viewstate cookie. If your goal is to produce a system like Tarsnap, which from day one is going to receive attention from security people because it is a security tool, I have less of a problem with Colin's recommendations. But if you're trying to build client-side database-free single signon (ab)using crypto as a tool, this slide deck is terrible. Follow every piece of advice in it and you will very likely still produce a system that is easier to break than if you hadn't used crypto.
- NateLawson 17y agoOverall, I think this talk best applies as a starting point for learning about crypto. Take Colin's recommendations as signposts to underlying research. Why would he dislike DSA? Hint: it requires a secure RNG at signing time while RSA only requires one at key generation time. http://rdist.root.org/2009/05/17/the-debian-pgp-disaster-that-almost-was/ http://rdist.root.org/2009/05/17/the-debian-pgp-disaster-tha... However, I don't think he achieved the stated goal of teaching you enough to become a crypto implementer in 1 hour. I disagree with a lot of his conclusions. But you'd have to learn more than the slides hint at to have a discussion on the details why. Some specific comments on the slides. ### Common failures and their causes (2): I find it interesting that he characterized a timing attack in Keyczar as "stupidity" while a cache-based timing attack with HTT was "unusual environment". Same thing with SSL renegotiation. I think all of these were subtle flaws and easy to overlook. The SSL bug was around for at least 10 years. HMAC timing attacks were not as widely published as they are now, but instead were part of common lore to cryptographers. The WEP vulnerability was almost certainly not "unusual environment". Sure, there were power and cost constraints in the WEP design, but what was unusual about it was that the crypto was obviously designed by a group with no crypto experience and no public review. Using a varying key with RC4, something it was known to be weak to, was an example of "using a tool wrong" and more similar to the AWS v1 signature bug you found. The only "unusual environment" was that the specialized and closed field of IEEE wifi design led to non-cryptographers designing crypto. There was nothing unique to the environment that a good crypto person would have had an inherent problem with. I don't think this list is a good categorization of types of crypto bugs. ### Authentication/Signing (5) Confusing terminology. I use "integrity protection" or "authenticator" for MAC and "signature" only for public-key signatures. They are two very different processes, even though they share some goals. ### Hashes (8) It was funny to see SHA-1 in the "don't use" list next to MD4, for example. I agree it's best not to use it for new designs, but there's a world of difference between SHA1 and MD4, especially if you have to use SHA1 for legacy compatibility. ### Symmetric authenticators (10) I think CBC-MAC should be on a "don't use" list, not "avoid". If you put SHA1 on the "don't" list, it's even more important that CBC-MAC be put there. Which will be broken sooner: HMAC-SHA1 or an arbitrary CBC-MAC implementation or use? ### CTR mode (17) Based on his previous comments, I think Colin advocates CTR mode due to its supposed resistance to side channel attacks. However, it is not a panacea. See this paper by Josh Jaffe on how to use side channel attacks against CTR mode. It's quite interesting how AES's structure makes it more vulnerable to his particular attack. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.93.6851 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.93.6...