Hacking Secret Ciphers with Python

A beginner's guide to cryptography and computer programming with Python

by Al Sweigart

DescriptionTable of ContentsDetailsHashtagsReport an issue

Book Description

There are many books that teach beginners how to write secret messages using ciphers. There are a couple books that teach beginners how to hack ciphers. As far as I can tell, there are no books to teach beginners how to write programs to hack ciphers. This book fills that gap.

This book is for complete beginners who do not know anything about encryption, hacking, or cryptography. The ciphers in this book (except for the RSA cipher in the last chapter) are all centuries old, and modern computers now have the computational power to hack their encrypted messages. No modern organization or individuals use these ciphers anymore. As such, there's no reasonable context in which you could get into legal trouble for the information in this book.

This open book is licensed under a Creative Commons License (CC BY-NC-SA). You can download Hacking Secret Ciphers with Python ebook for free in PDF format (3.9 MB).

Table of Contents

Chapter 1
Making Paper Cryptography Tools
Chapter 2
Downloading and Installing Python
Chapter 3
The Interactive Shell
Chapter 4
String and Writing Programs
Chapter 5
The Reverse Cipher
Chapter 6
The Caesar Cipher
Chapter 7
Hacking the Caesar Cipher with the Brute Force Technique
Chapter 8
The Transposition Cipher, Encrypting
Chapter 9
The Transposition Cipher, Decrypting
Chapter 10
Programming a Program to Test Our Program
Chapter 11
Encrypting and Decrypting Files
Chapter 12
Detecting English Programmatically
Chapter 13
Hacking the Transposition Cipher
Chapter 14
Modular Arithmetic and the Multiplicative Cipher
Chapter 15
The Affine Cipher
Chapter 16
Hacking the Affine Cipher
Chapter 17
The Simple Substitution Cipher
Chapter 18
Hacking the Simple Substitution Cipher
Chapter 19
The Vigenère Cipher
Chapter 20
Frequency Analysis
Chapter 21
Hacking the Vigenère Cipher
Chapter 22
The One-Time Pad Cipher
Chapter 23
Finding Prime Numbers
Chapter 24
Public Key Cryptography and the RSA Cipher

Book Details

Computer Science
ISBN13 Digital
ISBN10 Digital
PDF Size
3.9 MB

Book Hashtags

Related Books

Programming for Computations - Python
This book presents computer programming as a key method for solving mathematical problems. This second edition of the well-received book has been extensively revised: All code is now written in Python version 3.6 (no longer version 2.7). In addition, the two first chapters of the previous edition have been extended and split up into five new chapte...
Invent Your Own Computer Games with Python
Invent Your Own Computer Games with Python teaches you how to program in the Python language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the examples. Games include Guess the Number, Hangman, Tic Tac Toe, and Reversi. This book also has an introduction to making games with 2D graph...
Programming for Computations - Python
This book presents computer programming as a key method for solving mathematical problems. There are two versions of the book, one for MATLAB and one for Python. The book was inspired by the Springer book TCSE 6: A Primer on Scientific Programming with Python (by Langtangen), but the style is more accessible and concise, in keeping with the needs o...
Making Games with Python & Pygame
Making Games with Python & Pygame covers the Pygame library with the source code for 11 games. Making Games was written as a sequel for the same age range as Invent with Python. Once you have an understanding of the basics of Python programming, you can now expand your abilities using the Pygame library to make games with graphics, animation, a...
The Coder's Apprentice
The Coder's Apprentice is a course book, written by Pieter Spronck, that is aimed at teaching Python 3 to students and teenagers who are completely new to programming. Contrary to many of the other books that teach Python programming, this book assumes no previous knowledge of programming on the part of the students, and contains numerous exercises...
Test-Driven Development with Python
By taking you through the development of a real web application from beginning to end, this hands-on guide demonstrates the practical advantages of test-driven development (TDD) with Python. You'll learn how to write and run tests before building each part of your app, and then develop the minimum amount of code required to pass those tests. The re...