12HACKING THE TRANSPOSITION CIPHER

“Ron Rivest, one of the inventors of RSA, thinks that restricting cryptography would be foolhardy: ‘It is poor policy to clamp down indiscriminately on a technology just because some criminals might be able to use it to their advantage.’”— Simon Singh, The Code Book

Images

In this chapter, we’ll use a brute-force approach to hack the transposition cipher. Of the thousands of keys that could possibly be associated with the transposition cipher, the correct key should be the only one that results in legible English. Using the detectEnglish.py module we wrote in Chapter 11, our transposition cipher hacker program will ...

Get Cracking Codes with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.