In this book, you will learn basic programming concepts using the Python programming language, which is one of the best languages for beginners. It has a gentle learning curve that novices of all ages can master, yet it’s also a powerful language used by professional software developers. Python runs on Windows, macOS, Linux, and even the Raspberry Pi, and it’s free to download and use. Download Cracking Codes with Python Book free of cost.

A hacker can be a person who studies a system (such as the rules of a cipher or a piece of software) to understand it so well that they’re not limited by that system’s original rules and can modify it in creative ways. A hacker can also be a criminal who breaks into computer systems, violates people’s privacy, and causes damage. This book uses the term in the first sense. Hackers are cool. Criminals are just people who think they’re being clever by breaking stuff.


  • Chapter 1: Making Paper Cryptography Tools covers some simple paper tools, showing how encryption was done before computers.
  • Chapter 2: Programming in the Interactive Shell explains how to use Python’s interactive shell to play around with code one line at a time.
  • Chapter 3: Strings and Writing Programs covers writing full programs and introduces the string data type used in all programs in this book.
  • Chapter 4: The Reverse Cipher explains how to write a simple program for your first cipher.
  • Chapter 5: The Caesar Cipher covers a basic cipher first invented thousands of years ago.
  • Chapter 6: Hacking the Caesar Cipher with Brute-Force explains the brute-force hacking technique and how to use it to decrypt messages without the encryption key.
  • Chapter 7: Encrypting with the Transposition Cipher introduces the transposition cipher and a program that encrypts messages with it.
  • Chapter 8: Decrypting with the Transposition Cipher covers the second half of the transposition cipher: being able to decrypt messages with a key.
  • Chapter 9: Programming a Program to Test Your Program introduces the programming technique of testing programs with other programs.
  • Chapter 10: Encrypting and Decrypting Files explains how to write programs that read files from and write files to the hard drive.
  • Chapter 11: Detecting English Programmatically describes how to make the computer detect English sentences.
  • Chapter 12: Hacking the Transposition Cipher combines the concepts from previous chapters to hack the transposition cipher.
  • Chapter 13: A Modular Arithmetic Module for the Affine Cipher explains the math concepts behind the affine cipher.
  • Chapter 14: Programming the Affine Cipher covers writing an affine cipher encryption program.
  • Chapter 15: Hacking the Affine Cipher explains how to write a program to hack the affine cipher.
  • Chapter 16: Programming the Simple Substitution Cipher covers writing a simple substitution cipher encryption program.
  • Chapter 17: Hacking the Simple Substitution Cipher explains how to write a program to hack the simple substitution cipher.
  • Chapter 18: Programming the Vigenère Cipher explains a program for the Vigenère cipher, a more complex substitution cipher.
  • Chapter 19: Frequency Analysis explores the structure of English words and how to use it to hack the Vigenère cipher.
  • Chapter 20: Hacking the Vigenère Cipher covers a program for hacking the Vigenère cipher.
  • Chapter 21: The One-Time Pad Cipher explains the one-time pad cipher and why it’s mathematically impossible to hack.
  • Chapter 22: Finding and Generating Prime Numbers covers how to write a program that quickly determines whether a number is prime.
  • Chapter 23: Generating Keys for the Public Key Cipher describes public key cryptography and how to write a program that generates public and private keys.
  • Chapter 24: Programming the Public Key Cipher explains how to write a program for a public key cipher, which you can’t hack using a mere laptop.

Download Cracking Codes with Python Book

Click here to download.