You have learned that the Atbash Cipher is one of the eldest known ciphers.

Also, you observed that due to the absence of a "key", the scheme cannot be classified under "modern cryptography".

For educational purposes, we will extend the original Atbash cipher to several variations and see how we can break it.

This is a good start to learn the basics of cryptanalysis using simple brute-force attacks.

Extended Atbash (Version I):

In the original scheme, the characters used for encryption and decryption are the 26 English alphabets.

We will call this: the base. Characters undefined in the base are ignored during encryption/decryption.

The original Atbash cipher uses all characters in the base, by constructing a substitution table that contains the ordered alphabet and its reverse.

The scheme is assumed to be case insensitive.

Untitled

In this extension, instead of using the entire base, we will use part of it.

For instance, if we select the character 'H', then we can construct a substitution table from 'H' to 'Z' which is:

Untitled

What are the valid values of the key? [0,25] Which key would you use to make this version work as the original Atbash cipher? 0 Which key will result in no encipherment? 25 What is the brute-force key space? How many keys do you need to use before breaking the cipher? 25 keys [0-24]

Extended Atbash (Version II):

Instead of using the upper-case English characters, we will create a general base that contains the following chars.

!"#$%&\\'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~*