9 ms·
Crypto 101 – Introductory course on cryptography
- LaurensBER 10y agoI checked the PDF and this looks very interesting and comprehensive, any change you could give an eta for the final release and more specific the epub release? Thanks!
- lvh 10y agoHi! I'm the author. I should remove that "pre-release" notice. Sure; there's plenty more that I could talk about, but there's also plenty of stuff there that you can use right now (and most of the stuff I wanted to talk about). Suggestions come in faster than I have time to implement them, so... Maybe this will never be done, and maybe that doesn't stop it from being a useful resource :-) I hope you enjoy it!
- eponeponepon 10y agoThis is about to eat my weekend, I think! :) Quite seriously, this is exactly what the tech world needs - personally, I know that in terms of understanding of crypto I'm streets ahead of the average Joe, but orders of magnitude behind people who actually know the field. I'm certain I'm far from alone in that set, but the way the world's going means that we with the generalised technical know-how have a moral impetus to bring the rest of the world up to speed with the whys and wherefores.
- Gruselbauer 10y agoLogged in to post pretty much exactly this. Since the author is reading this: thanks. Read the first few lines and am already hooked. I have been looking for a long time, but most texts on crypto are either way below my level of understanding or miles above. You're a godsend!
- tscs37 10y agoI'm not sure if it still applies, but there is a saying: "There are maybe 5 people in the world that may call themselves cryptographers"
- CodeMage 10y agoAnd they're called Alice, Bob, Chris, Dave and Eve.
- Ar-Curunir 10y agoCarol is the preferred C party :P
- tscs37 10y agoWhat about Mallory?
- siberianbear 10y agoIs that you, Mr. Hintjens?
- deleted 10y ago[deleted]
- marknadal 10y agoSame here, however I think it is better for us to talk about what we do know more, so that it increases the discussion and thus awareness and knowledge sharing (as well as getting corrected when wrong). So we went out on a limb and made these 1 minute layman video explainers on cryptography: http://gun.js.org/explainers/data/security.html http://gun.js.org/explainers/data/security.html , I hope they are useful. Anything incorrect?
- milansm 10y ago> I'm streets ahead of the average Joe Has anyone seen "streets ahead" being used by anyone else besides Pierce Hawtorn and the OP? I mean, is it widely used now? (I'm not native speaker, obviously)
- tptacek 10y agoI read it as a Pierce Hawthorneism.
- eponeponepon 10y agoIt's been common parlance in English for centuries.
- lethargic_meat 10y agoI'm using it as much as possible just to push it into language.
- milansm 10y ago> I'm streets ahead of the average Joe Has anyone seen "streets ahead" being used by anyone else besides Pierce Hawtorn and the OP? I mean, is it widely used now? (I'm not native speaker, obviously)
- seycombi 10y agoThis is currently on edx. Its more advanced that the courses mentioned here. I do not know what edx will do after the course ends, but if you want it you can get it while it ss still available. https://www.edx.org/course/quantum-cryptography-caltechx-delftx-qucryptox https://www.edx.org/course/quantum-cryptography-caltechx-del... Quantum Cryptography by Thomas Vidick (Caltech) and Stephanie Wehner (Delft University)
- tptacek 10y agoThis is certainly not the first thing you want to learn in cryptography, for many reasons.
- hannob 10y agoSo-called Quantum Cryptography is largely snake oil. The most important things you need to know about it is that: * In order to do QC you need an authenticated channel first. QC proponents hardly mention that or try to obscure it, but it basically means you can't have QC unless you already have some other secure cryptography. * QC has severe practical limits. It needs a point to point connection capable of sending physical particles. That means: No Wifi, no mobile Internet and no connections over large distances. Given that these people recently started talking about a "Quantum Internet" makes this simply ridiculous.
- jpt4 10y agoOf the first point I shall plead Wittgenstein and not speak, but as regards the second: In what way are photons, the medium of wireless telecommunication, not physical particles? In what way are, indirect connections not decomposable into multiple direct connections (broadcast vs. point-to-point is a more robust difference, I agree)?
- marcosdumay 10y agoFor QC to work, the receiver must receive the exact same photons the transmitter created. Those photons can not be tampered with, what means they can not be relayed, or reflected by most surfaces.
- gespadas 10y agoSuggestion: Add some notification medium for when the book is ready.
- midgetjones 10y agoAgreed. The one time I actually want to sign up to a mailing list, and there's no way of doing it.
- lvh 10y agoHi! I'm the author. I should really remove that pre-release stuff. There's no useful point for "done", and it already includes most of the stuff I wanted to talk about.
- midgetjones 10y agoOh, well in that case I'll get reading! Thanks so much :)
- gespadas 10y agoThank you!
- kanzure 10y agoAlso here is is a Dan Boneh cryptography playlist https://www.youtube.com/playlist?list=PL9oqNDMzcMClAPkwrn5dm7IndYjjWiSYJ https://www.youtube.com/playlist?list=PL9oqNDMzcMClAPkwrn5dm...
- nemild 10y agoAnd as context, Professor Dan Boneh teaches the main introductory crypto class at Stanford (CS255) - it's a great intro for someone with some good CS fundamentals. The course syllabus is here: http://crypto.stanford.edu/~dabo/cs255/syllabus.html http://crypto.stanford.edu/~dabo/cs255/syllabus.html (Disclosure, I took the class a few years ago)
- okbake 10y agoThis is a great course. I also took it a few years ago and have been waiting for his Crypto 2 course since then. It seems like it's always "Coming Soon Fall 201x" though.
- TrinaryWorksToo 10y agoWith everything in Crypto I have to wonder: Is the information correct? I really have no way of verifying if I'm learning the correct DHE, and I know that it's easy to get wrong. Perhaps I can do some testing in code, but I may test it incorrectly too, and those small errors can be exploited.
- clifanatic 10y agoWell, one benefit of wide exposure (like here on HN) is that if it was wrong, somebody would be bound to come along and point it out. FWIW, I consider myself pretty well-versed on cryptography and although I haven't gone over this book with a fine-toothed comb (yet!), it looks very, very accurate to me.
- dom0 10y ago> Well, one benefit of wide exposure (like here on HN) is that if it was wrong, somebody would be bound to come along and point it out. I wouldn't expect that subtle implementation errors or even protocol flaws would get noticed on any news site, or even by contributors / co-developers or whatever.
- dom0 10y ago> I really have no way of verifying if I'm learning the correct DHE, and I know that it's easy to get wrong. Perhaps I can do some testing in code, but I may test it incorrectly too, and those small errors can be exploited. Well this is step 0 in cryptography engineering: You don't implement primitives. Use reviewed components providing primitives and implement your protocol on top of that. Step -1 is to not design your protocol, but use a reviewed protocol and implement that. Finally, step -2 is to not implement a protocol, but rather use a reviewed implementation of a fitting protocol. This isn't sarcasm and I don't mean to attack you.
- eponeponepon 10y agoThere's a difficult rabbithole here - eventually you have to draw a line and decide to trust someone. Otherwise it's just layer after layer of paranoia until you implode in a puff of Philip Dick :)
- stcredzero 10y agoWhen I was taking Aikido, there was a day when the sensei was going through all of our techniques and showed how the uke (initiator of the attack, receiver of the technique) could turn things around on the tori. (receiver of the attack, initiator of the technique) It seemed like there were a half dozen ways each that a technique could go seriously wrong, and that many of them didn't require much skill, only determination and the opportunity provided by a mistake. That day made me question the validity of the entire notion of self defense. I wonder if there shouldn't be a software engineering class where people try to set up a secure web app, with their own homegrown algorithms and protocols, which is then attacked by a tiger team which includes a conspirator on the inside? Perhaps there are such classes now.
- thfuran 10y agoWhat would be the purpose of such a class? If the point is to show that rolling your own security is bad, it seems like having an inside man would just help leave people convinced that they could have succeeded if only it weren't for that other guy.
- kaoD 10y agoSomething tells me a conspirator wouldn't be required anyways. Your security is either sound or broken, i.e. probably broken unless you use proven implementations of proven cryptosystems with proven configurations. E.g. even if RSA is (currenly) safe, as well as its primitives and common configuration... rolling your own implementation will probably be subject to timing attacks.
- stcredzero 10y agoSomething tells me a conspirator wouldn't be required anyways. The conspirator is there to teach about Defense in Depth. Systems that rely on just 1 "impenetrable" membrane tend to be brittle. Their failure is catastrophically sudden and complete, like glass breaking. Glass is way harder than steel, but steel structures are much more robust, because steel's ductility allows for partial failures and continued resistance/integrity. Your security is either sound or broken What about "Defense in depth?"
- paulddraper 10y agoLooks interesting, but I can't open it with Adobe Reader on my Android.
- qwertyuiop924 10y agoCan any crypto people here on HN verify that this gets it right?
- clifanatic 10y agoI'm the author of the book "Implementing SSL" (https://books.google.com/books?id=LfsC03f8oGsC&printsec=frontcover&dq=implementing+ssl&hl=en&sa=X&ved=0ahUKEwjvp9ifj9bQAhWGnZQKHQp6Ab8Q6AEIMDAA#v=onepage&q=implementing%20ssl&f=false https://books.google.com/books?id=LfsC03f8oGsC&printsec=fron..., which covers a lot of the same ground as the link) and consider myself a crypto person - although I haven't had a chance to read every word and check through it with a fine tooth comb, based on what I've had a chance to review, it appears very accurate and very well laid out.
- tptacek 10y agoI'm biased, since LVH is a partner at our new firm, but I've always liked his crypto writing. He's also a trained cryptographer.
- baby 10y agoFor knowing lvh, he usually knows what he's talking about ;) I looked at his book a while ago and it looked pretty good to me.
- gtheodor 10y ago
- donderokara 10y agominecraft
- steamer25 10y agoApplied Cryptography is also one of the free advanced courses on Udacity: https://www.udacity.com/course/applied-cryptography--cs387 https://www.udacity.com/course/applied-cryptography--cs387
- Raed667 10y agoI'm really disappointed that (9.4) Elliptic curve cryptography is still under TODO. If anyone is interested in ECC, ars has a pretty good introduction [0]. [0] : http://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/ http://arstechnica.com/security/2013/10/a-relatively-easy-to...
- tptacek 10y agoYou can also mail Sean Devlin to get Set 8 of the Crypto Challenges, which cover ECC. Finding the right place to mail I'll leave as an exercise for the reader.
- CameronBanga 10y agoQuick question, I had apparently Pinboarded this in March 2014. I see the PDF is still pre-release. Has anything changed with this, or is it kinda just coming up again because of recent political climate. I'm fine either way, just curious if this has changed drastically from what I had looked at previously.
- ronjouch 10y agoParagraph "Development" (page 14 in the current version) answers your question: "The entire Crypto 101 project is publicly developed on GitHub under the crypto101 organization, including this book: https://github.com/crypto101/book https://github.com/crypto101/book " [...] "The copy of this book that you are reading right now is based on the git commit with hash 3f89ec3 , also known as 0.4.0-22-g3f89ec3" Then, looking at the commits, yes the book changed a lot since 2014: https://github.com/crypto101/book/commits/master https://github.com/crypto101/book/commits/master
- deleted 10y ago[deleted]
- lvh 10y agoHi! I'm the author. I should stop calling it a pre-release. There's no useful "done" marker. It includes most of the material I wanted to talk about, and has for a while. You should update the PDF though; as the other commenter mentioned, it does get updated :)
- clifanatic 10y ago> There's no useful "done" marker. Well, maybe when there are no more "TODOs" ;)
- lvh 10y agoThat doesn't work too well when they get added faster than they get removed; which is what I mean by "no useful done marker". There's an issue tracker now instead of TODOs in the document (not to say that all of them have been removed) -- I don't think that _actually_ improves anything except optics :)
- southphillyman 10y agoThanks for this my guy! Maybe I'm telling on myself here, but I get the impression that your average developer doesn't know much about security outside of the basic (sql injection/cross site scripting)
- truth_sentinell 10y agoWhy is the url a hash? Also I'm getting privacy error on chrome mobile. Thanks for this, seems pretty useful.
- lvh 10y agoHi! I'm the author. It's hosted on a CDN; I don't choose that URL. Sorry about the privacy error; could you take a screenshot and submit a ticket on https://www.github.com/Crypto101/book https://www.github.com/Crypto101/book? Thanks!
- chetanahuja 10y agoI put this pdf on my phone and read through interesting sections over a vacation involving long flights. It's a very nicely written text that you can read over a few days with some basic computer-science/mathematical background.
- markild 10y agoStop trying to make "streets ahead" a thing...
- eponeponepon 10y agoEh? Just a turn of phrase..?
- sacert 10y agoIt is from the TV show, Community.
- mediocrejoker 10y agoThe line "Stop trying to make 'streets ahead' a thing" is a joke from the TV show Community.
- mjdesa 10y agoWhich is a derivative of "Stop trying to make 'fetch' a thing" from Mean Girls.
- mnem 10y agoThat's been a reasonably common phrase in the U.K. for a few hundred years, so it already is a thing.
- sctb 10y agoWe detached this subthread from https://news.ycombinator.com/item?id=13090029 https://news.ycombinator.com/item?id=13090029 and marked it off-topic.
- Dowwie 10y agogood work, lvh
- lhnz 10y agoWhenever I have taken the small amount of cryptography knowledge I already have and tried to use it in a project, I've often been shutdown with "the system already does that" when it doesn't, or "this will be too complicated for the user, instead lets just roll our own [ad-hoc cryptography method]". For those reading: How do you convince people that it's worth using best practices? Is there a good heuristic to measure the value of something, when deciding how much time and money to spend on securing it? What are good library/SaaS solutions to help build secure applications with less chance of shooting yourself in the foot, better UX and lower cost? (Keybase, etc.)
- zimmerfrei 10y agoMaybe I am being too harsh, but it is clear the author does not have a formal education in the subject [0] nor any track in breaking non-toy crypto implementations [1]. This alone makes me a bit wary of any recommendation one may read in the material. There seems to be more attention to listing all the beasts in the cryptographic zoo than to the few fundamental tools required to really understand the mechanics (e.g. birthday paradox, PRFs, some prime number theory). Sure, I can't spot anything fundamentally wrong and it all reads pretty smoothly, but calling this a "course" is highly misleading. If the intention is to guide people in selecting good crypto primitives, then maybe "guide" is a more honest word? For those interested, I would strongly recommend to bite the bullet and dedicate time to Boneh's course on Coursera. [0] I don't have any either [1] Ditto
- linkregister 10y agolvh (https://lvh.io https://lvh.io), care to weigh in? I was under the impression he was formally educated in cryptography. This ebook has been cited by many computer security university courses.
- lvh 10y agoHi! I'm the author. You're mistaken about [0] and [1]. I'd like to address your specific point about being a guide rather than a course. I agree that a crypto zoo would be a guide and not a course; although I disagree that either the book or the talk are a zoo. It's possible that that hasn't come through effectively enough. I could understand why someone might think that from looking at the table of contents for example; it's certainly a lot clearer in the talk. The approach is instead to walk someone through the kinds of primitives that exist, but more importantly, why they exist. In that context, when I say "primitive", I mean "block cipher" or "MAC"; not something like "AES". That includes incidentally talking about PRFs, although I dance around that term and use terminology they're going to find in their crypto libraries. Similarly, there's an appendix on modular arithmetic; but I try not to get too lost in proofs about group theory. I could say "IND-CCA2" with a formal description, but in my experience that makes people's eyes glaze over. It's a lot easier to show them a bunch of reasonably-looking-yet-fatally-broken unauthenticated encryption to drive the point home. My target audience is curious programmers, not new academic cryptographers. If that's your criticism, that's absolutely valid. If you want to be the person to design SHA-4; this book isn't for you. It's true that I take a different approach than Dan Boneh does. That's not a criticism: Boneh's course is great, it's just different. I think showing people how to break stuff is a useful educational tool. If your threat model is random web apps that have the letters "AES" or "MD5" in their code, I think it's a more effective one than a rigorous mathematical approach that will quickly dissuade the curious programmer.
- mrcactu5 10y agocryptography textbooks get very difficult. I get lost in a sea of hashes and the prime number theorem
- theschwa 10y agoThere seems to be a lot of comments asking about the quality of this piece. I read through this the last time it was posted to HN, and I just have to say that this is the perfect balance of having enough detail to understand how things work, but not so much that it's overwhelming. That's a really difficult balance when it comes to crypto, so major props to the author. Fantastic work.
- bogomipz 10y agoThis is great! Kudos to the author and thanks Rackspace for sponsoring this as well. It's really encouraging to see this increased democratization of crypto not necessarily in the engineering of it per se but rather the awareness and understanding of it.
- cponeill 10y agoI downloaded this about a year ago and loved it. Incredibly informative. Is this an updated version?
- Natanael_L 10y agoIt gets continuously updated, so yes.
- cponeill 10y agoNice. Will have to get it again. Thank you.
- zappo2938 10y agoFor idiots like myself, I found this video, Public key cryptography - Diffie-Hellman Key Exchange (full version), to be completely enlightening using mixed colors to explain the most basic features of a cryptography algorithm.[0] [0] https://www.youtube.com/watch?v=YEBfamv-_do https://www.youtube.com/watch?v=YEBfamv-_do
- PeterisP 10y agoThe old Cryptopals challenges (http://cryptopals.com/ http://cryptopals.com/) seem to cover the same material in a pedagogically very different way - they don't feed you the information as this book does, but give you a practical task which can be easily done with e.g. reading the specification of an algorithm from wikipedia, but figuring out the implementation of the attack yourself gives a much better understanding than simply reading about it. Although this book claims a "Learn by doing" approach, I didn't find any specific assignments or data samples to facilitate that.
- lvh 10y agoHi! I'm the author. Also a big fan of Cryptopals; I was one of the reviewers for Set 8, and working with some of the authors. It's interesting to hear that point of view; because I thought C101 took the same approach as Cryptopals in the sense that it focused on teaching crypto by breaking it. When I say "learn by doing", I'm referring to stuff like walking through a bit-flipping attack just like cryptopals does. I recommend (and have organized/will be organizing) study groups where we work through cryptopals using Crypto 101; and I think that's a great idea. I was originally going to add exercises for C101, but honestly, Cryptopals was already that, and there wasn't much point in reinventing the wheel. I guess I should probably link to them?
- boterock 10y agoI think it would be good to link them, I started reading, got to page 30 and thought it would be nice to try the challenge. This reminds me when I thought I could handle myself in Linux, but when I played OverTheWire wargames, I still learned a ton of things that you only learn by doing.
- meadori 10y agoI had a similar POV as well -- I went into reading this book thinking there would be exercises and projects to reinforce the ideas. In particular, the following sentence (and remaining paragraph) in Chapter 1 set me up for that: > The exercises accompanying this book focus on teaching cryptography by breaking inferior systems.
- sambe 10y agoThe video claims that the Python standard library doesn't check certificates by default. In fact, it has done for at least a couple of years ([0] quotes the documentation as saying that it changed two years ago - in 2.7.9 and 3.4.3). Although the video is marked 2015, the overlay at the start shows it's from PyCon 2013. [0]: http://stackoverflow.com/a/28325763/2492 http://stackoverflow.com/a/28325763/2492
- bogomipz 10y agoFor anyone interested I found this to be a good book on working through some cryto implementations in Go: https://leanpub.com/gocrypto https://leanpub.com/gocrypto Its free to read online but its also very reasonably priced. Its written by an engineer over at Cloudflare.