Click to view the other books

Encrypt messages and hack ciphers!

“Hacking Secret Ciphers with Python” teaches complete beginners how to program in the Python programming language. The reader not only learns about several classical ciphers, but also how to write programs that encrypt and hack these ciphers. The full source code is given and explained line-by-line for ciphers such as the Caesar cipher, transposition cipher, simple substitution cipher, multiplicative & affine ciphers, Vigenere cipher, and hacking programs for each of these ciphers. The final chapters cover public key cryptography and the modern RSA cipher.

100% of the proceeds from this book are donated to the Electronic Frontier Foundation, the Creative Commons, and the Tor Project.

This book is aimed at middle and high school students or adults.

Download the .pdf version for free. (Alternate link)

Vote up on StumbleUpon.comVote for this site on Stumble Upon

If you want to test your cipher hacking skills, check out the Mystery Twister C3 Contest. The contest has several challenges for you to attempt and a forum where contestants can discuss their approaches.

Python & Cryptography Books I Recommend (if you don't mind paying)

These books take a more conventional approach to covering programming concepts. They don't focus on having complete source code for small projects or games, but they do explain programming concepts fairly well.

"The Code Book" by Simon Singh is a well written history of classical and modern cryptography, and an easy read as well. "Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers" is devoted to using Python for modern computer security.
"Python for Kids" is a new book from No Starch Press specifically aimed at a young reader. "Programming the Raspberry Pi: Getting Started with Python" is a great book to learn Python if you have purchased a Raspberry Pi.
"Super Scratch Programming Adventure!: Learn to Program By Making Cool Games" is a great book for younger kids (8 to teens) to learn MIT's graphical Scratch programming environment to quickly make games. "Python Programming for the Absolute Beginner, 3rd Edition" is a great book to learn Python if you have never programmed before.
"The Quick Python Book, 2nd Edition" is a great book if you are already a programmer and want to learn Python, or just want to quickly get up to speed with various programming concepts. "Programming Video Games for the Evil Genius" teaches the Java programming language, but takes a similar approach to "Invent with Python" by having the source code to various games.


You can email the author at [email protected]. Feel free to send your programming questions or comments.