3.4 Transposition Cipher
3.4.1 Encrypting Using Transposition
One of the easiest ways to encrypt a message is simply to scramble the letters. For example, the word “house” could be randomly transformed to “suheo.” In fact, there are 120 different possible arrangements of the word “house.” However, if the encryption algorithm randomly scrambles the letters, the task of the decryption algorithm becomes difficult. Encryption and decryption algorithms must work together in some agreed-upon way, with the encryption algorithm using a scheme to scramble the letters and the decryption algorithm knowing the scheme.
One way to scramble the letters of a message is to separate the message into two groups of characters, where the first group is composed ...
Get Python Programming in Context, 4th Edition 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.