News for hackers. Stuff that matters.
Re:Crypto 101 by lvh on Wednesday March 19, 2014 @03:11PM (#7430965)
This is a preview release of Crypto 101, an introductory course on cryptography. It's a follow-up to a talk I gave last year at PyCon.

To paraphrase David Reid, abstinence-only crypto education isn't working. We need easily accessible crypto education for developers. This book, and, once they're done, the included exercises, hopes to help.

I will happily answer all your questions here, by e-mail (see profile) or on twitter (@lvh).

In case the website breaks down, here's the direct download URL: https://9d0df72831e4b345bb93-4b37fd03e6af34f2323bb971f72f0c0...

here's a magnet link: magnet:?xt=urn:btih:e4af18f490672c6f7982a03f427e099014013774&dn=Crypto 101March2014.pdf&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A8 0%2Fannounce&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3 A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A 80

Re:Crypto 101 by wiredfool on Wednesday March 19, 2014 @10:34PM (#7433463)
Do you want patches/prs for copy editing? I've noticed 2 or 3 of them.
Re:Crypto 101 by lvh on Thursday March 20, 2014 @04:23AM (#7434410)
Absolutely! All the stuff is on Github, website and book (and source code for the exercises which I'm still hacking on): https://www.github.com/crypto101

Thanks in advance for your contributions!

Re:Crypto 101 by hmottestad on Thursday March 20, 2014 @07:26AM (#7434874)
Had a look through and really enjoyed the picture examples, can even remember some of those examples from uni.

And I see you are using vectorisation of hand drawn diagrams (maybe you write on a whiteboard and then take a photo and vectorise it). If you have an ipad I would recommend GoodNotes and a good stylus (maybe the Adonit Jot Script).

Re:Crypto 101 by lvh on Thursday March 20, 2014 @10:04AM (#7435553)
Thank you for the kind words!

Due to a stupid oversight my iPad is stuck in storage somewhere a few countries over :( I really wish I could, but right now it's just me, white paper, a pen, a scanner and potrace. It's tedious, but workable :)

Re:Crypto 101 by daturkel on Wednesday March 19, 2014 @05:21PM (#7431967)
The book looks great. I don't have any experience in crypto really but will certainly be taking a look at the early chapters here for a foundation.

edit: ignore the below, just got to this explanation in the book!

> The entire Crypto 101 project is publicly developed on Github under the crypto101 organization, including this book. https://github.com/crypto101/book

----

Excuse me if this info's on the website (I can't get to it right now, HN "hug of death" it appears), will you be open sourcing contribution to the book? I'm not saying it's necessary or that I even recommend it, just curious about your authorship model (and noticed the CC license at the beginning).

Also, did you make the book in LaTeX (or some TeX variant)? If so, will you be sharing the source? I always love looking at other people's TeX documents.

Re:Crypto 101 by dfc on Wednesday March 19, 2014 @07:14PM (#7432546)
> Latex source

Check the github link you posted, the book is right there. I also like looking at other people's tex files. The book was written with orgmode, so this could be a double treat, you get to see the tex as well as the orgmode used to generate the pdf.

UPDATE: The choice of non-free fonts is a peculiar choice. The math text looks a little strange in places. I am not sure if there is a package to fix up the math font for caslon, ie. one similar to the minion package. The euler fonts would work for a mathfont. Why not use something from texlive so that anyone can build a copy of the book that looks like the original and/or submit improvements? Everything looks nicer when you turn on microtype.

Re:Crypto 101 by lvh on Thursday March 20, 2014 @04:22AM (#7434408)
Thanks for the suggestions! I think that being able to build on standard free texlive installations would be a wonderful feature, but this the first time I've heard of the microtype package. Are you saying I can just turn it on and it'd be better? I've skimmed the CTAN entry and it suggests that it'd work with most fonts; does that include the ones I'm using now? (If so, does that mean that "use free fonts" and "use microtype" are two different tickets?)

Thank you very much in advance. I've created two tickets for this: https://github.com/crypto101/book/issues/60 and https://github.com/crypto101/book/issues/61.

Re:Crypto 101 by dfc on Thursday March 20, 2014 @12:24PM (#7436538)
Microtype is different from " use free fonts." Microtype allows for:

  "character protrusion and font expansion, furthermore the adjustment 
  of interword spacing and additional kerning, as well as hyphenatable 
  letterspacing (tracking) and the possibility  to disable all or 
  selected ligatures."
I will follow up on github. Are you planning to have the book printed? The recto/verso margins can be distracting.
Re:Crypto 101 by smnrchrds on Wednesday March 19, 2014 @06:26PM (#7432319)
It would be nice if you collect email addresses so that you could inform interested individuals(that's me!) when the final version is released.
Re:Crypto 101 by lvh on Wednesday March 19, 2014 @06:32PM (#7432342)
I'm actually trying to, but at the last minute I changed the magnet link to a HTTPS PDF link, which appears to open in a new window for most people :-/ Any help from people with frontend chops who could tell me how to fix that (apparently Content-Disposition isn't the answer?) would be much appreciated!
Re:Crypto 101 by sawyer on Wednesday March 19, 2014 @06:51PM (#7432432)
As a quick fix you can add a target attribute to the big anchor tag:

<a href="..." target="_blank">

It'll still open the PDF in a new window but the underlying site with email prompt will still exist!

Re:Crypto 101 by doktrin on Wednesday March 19, 2014 @07:53PM (#7432756)
Excellent suggestion. Not the OP, but this suggestion allowed me to sign up.
Re:Crypto 101 by lvh on Thursday March 20, 2014 @05:40AM (#7434573)
I think this should be up now. Thanks, GP!
Re:Crypto 101 by bqe on Wednesday March 19, 2014 @03:39PM (#7431224)
Cool stuff, man.

Where do you think your book stands in relation to other books like Cryptography Engineering? Should people new to crypto read your book before or after CE, or instead of?

Re:Crypto 101 by lvh on Wednesday March 19, 2014 @03:44PM (#7431274)
Thanks!

This is definitely in the same space as CE. When I just started writing this, tptacek wrote: http://sockpuppet.org/blog/2013/07/22/applied-practical-cryp...

... and that was a huge motivator and inspiration to me. So:

1. (Unlike Applied Cryptography) focus on things that you are actually likely to hit in the wild

2. (Unlike Cryptography Engineering) Written today, and hopefully perpetually updated; including things like ECC, all sorts of CBC attacks, et cetera.

3. (Unlike either) Free of charge, and freely redistributable :)

Re:Crypto 101 by bqe on Wednesday March 19, 2014 @03:50PM (#7431312)
About #3, have you considered hosting a git repo with your (presumably LaTeX) source so that others can contribute?
Re:Crypto 101 by lvh on Wednesday March 19, 2014 @03:54PM (#7431354)
Yeah; there's a link somewhere in the "Development" section. It's org-mode, though: https://github.com/crypto101/book

Everything about this project (except the TLS keys) is on Github.

Re:Crypto 101 by muaddirac on Wednesday March 19, 2014 @06:05PM (#7432190)
Looks great (haven't read all of it yet).

Have you considered using something like Ipe to make diagrams for you?

Re:Crypto 101 by lvh on Thursday March 20, 2014 @04:39AM (#7434445)
Nope! I just started drawing some stuff and it stuck. I had never even heard of ipe. How's it compare to TikZ? (That seems like the closest thing I have played with.)