11.07.2015 Views

Cryptography - Sage

Cryptography - Sage

Cryptography - Sage

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

As a special case, consider 2-character polygrams, so thatAA = (0, 0), . . . , ZY = (25, 24), ZZ = (25, 25).The matrix A given by ( 1 821 3and vector v = (13, 14) defines a map)AA = ( 0, 0) ↦→ (13, 14) = NO..ZY = (25, 24) ↦→ (18, 23) = WAZZ = (25, 25) ↦→ (18, 23) = RDwhich is a simple substitution on the 2-character polygrams. Note that the number ofaffine ciphers is much less than all possible substutions, but grows exponentially in thenumber n of characters.2.2 Transposition CiphersRecall that a substitution cipher permutes the characters of the plaintext alphabet, ormay, more generally, map the plaintext characters into a different ciphertext alphabet. Ina transposition cipher, the symbols of the plaintext remain the same unchanged, but theirorder is permuted by a permutation of the index positions. Unlike substitution ciphers,transposition ciphers are block ciphers.The relation between substitution ciphers and transposition ciphers is illustrated in Table2.1. The characters and their positions of the plaintext string ACATINTHEHAT appear ina graph with a character axis c and a position index i for the 12 character block 1 ≤ i ≤ n.We represented as a graph a substitution cipher (with equal plaintext and ciphertext alphabets)is realised as a permutation of the rows of the array, while a transposition cipheris realised by permuting the columns in fixed size blocks, in this case 12.Permutation groupsThe symmetric group S n is the set of all bijective maps from the set {1, . . . , n} to itself,and we call an elements π of S n a permutation. We denote the n-th composition of π withitself by π n . As a function write π on the left, so that the image of j is π(j). An elementof S n is called a transposition if and only if it exhanges exactly two elements, leaving allothers fixed.2.2. Transposition Ciphers 13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!