Cracking Codes with Python

Cracking Codes with Python
An Introduction to Building and Breaking Stuff
Al Sweigart
November 2017, 464 pp.
Use coupon code PREORDER to get 30% off!

In Cracking Codes with Python, you’ll learn how to program in Python while making and breaking ciphers, which are used to encrypt secret messages. (No programming experience required!).

After a quick crash course in programming, you’ll make, test, and hack classic cipher programs. You’ll begin with simple programs like the Caesar cipher and then work your way up to public key cryptography and the RSA cipher, which is used for modern secure data transmissions.

Each program comes with the full code and a line-by-line explanation of how things work. By book’s end, you’ll walk away with a solid foundation in Python and same crafty programs under your belt.

Learn how to:

  • Combine loops, variables, and flow control statements into real working programs
  • Use dictionary files to instantly detect whether text is English or nonsense
  • Create programs to test that the code you've written is working correctly
  • Write your own programming modules that you can import and use in other programs
  • Debug your programs and find common errors

Cracking Codes with Python is a chance to pick up some Python skills while getting a peek into the intriguing world of cryptography—what more could an aspiring hacker want?

Author Bio 

Al Sweigart is a professional software developer who teaches programming to kids and adults. His programming tutorials can be found at He is the author of Automate the Boring Stuff with Python, Scratch Programming Playground, and Invent Your Own Computer Games with Python.