15HACKING THE AFFINE CIPHER

“Cryptanalysis could not be invented until a civilization had reached a sufficiently sophisticated level of scholarship in several disciplines, including mathematics, statistics, and linguistics.”—Simon Singh, The Code Book

Images

In Chapter 14, you learned that the affine cipher is limited to only a few thousand keys, which means we can easily perform a brute-force attack against it. In this chapter, you’ll learn how to write a program that can break affine cipher–encrypted messages.

Source Code for the Affine Cipher Hacker Program

Open a ...

Get Cracking Codes with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.