Crypto Corner
  • Home
    • Crypto Corner Challenges
    • Glossary
    • Help with Activities
    • Educational Uses
    • Downloadable Resources
  • Introduction to Cryptography
    • Steganography
    • Codes and Ciphers
    • Conventions in Cryptography
  • Monoalphabetic Substitution Ciphers
    • Atbash Cipher
    • Pigpen Cipher
    • Caesar Shift Cipher
    • Affine Cipher
    • Mixed Alphabet Cipher
    • Other Examples
    • Frequency Analysis: Breaking the Code
    • Homophonic Substitution
  • Simple Transposition Ciphers
    • Rail Fence Cipher
    • Route Cipher
    • Columnar Transposition Cipher
    • Myszkowski Transposition Cipher
    • Permutation Cipher
    • Anagramming: Jumbling words
    • Combining Monoalphabetic and Simple Transposition Ciphers
  • Polyalphabetic Substitution Ciphers
    • Vigenère Cipher
    • Kasiski Analysis: Breaking the Code
    • Autokey Cipher
    • Other Examples
  • Fractionating Ciphers
    • Polybius Square
    • Straddling Checkerboard
    • Transposing Fractionated Text
    • Other ways to Alter Fractionated Text
  • Digraph Substitution Ciphers
    • Playfair Cipher
    • Two-Square Cipher
    • Four-Square Cipher
    • Hill Cipher

Digraph Substitution Ciphers

Digraph Substitution Ciphers are similar to Monoalphabetic Substitution Ciphers, except that instead of replacing individual letters in the plaintext, they replace pairs of letters with another pair of letters (or digraph).
In its simplest version a grid like the one below can be used to find a new pair of letters to use in each substitution. For example, to encipher the digraph "he" you find "h" across the top, and "e" down the side, and where these two intercept is the new digraph "NY".
When using a Digraph Substitution Cipher, the first step is to split the plaintext up into digraphs. Each of these will then be enciphered using a grid like the one above into a new digraph. If there is a lone letter, then we must add a null letter to form a digraph, and this is usually "x".
For example, let's encrypt the plaintext "simple example". First of all we must split the plaintext into digraphs: "si mp le ex am pl ex". Notice that we have added an "x" on the end to make sure the lone "e" forms part of a digraph. Now we use the grid above to encrypt each digraph in turn. We get the table below.
Picture
The digraph split and encryption for the plaintext "simple example"
So our ciphertext is "RJYDNCGVVRUGGV", which could be split into groups of 5 "RJYDN CGVVR UGGV" or split to match the original structure "RJYDNC GVVRUGGV".
Of course, we need a way to come up with the digraph substitution table. The easiest way is to use two Caesar Shifts. One of these dictates the first letter of the digraph, and the other the second letter. Also, one letter changes across the columns, whilst the other remains the same, and the other changes down the rows, whilst the former remains constant. Can you spot this pattern in the table above?
In a similar way we could use any mixed alphabet to create the two parts to each digraph within the grid. If we use the keywords mixed and alphabet then we use the keyword mixed to create the mixed alphabet to go down through the rows, and the keyword alphabet to create the mixed alphabet to go across the columns. Finally we combine the two letters within each box to create a digraph (we must decide which way round the letters are combined).

Previous Page: Alter Fractionated Text
Next Page: Playfair Cipher
Information
  • About Me
  • Contact Me
  • Legal
  • Glossary
  • Help with Activities
  • Educational Uses
  • Downloadble Resources
Crypto Corner is a subsiduary of www.interactive-maths.com
©2013 - 2019 Daniel Rodriguez-Clark
All rights reserved
If you have found Crypto Corner useful, then please help to keep it a free site by donating using the button below. Thanks!
  • Home
    • Crypto Corner Challenges
    • Glossary
    • Help with Activities
    • Educational Uses
    • Downloadable Resources
  • Introduction to Cryptography
    • Steganography
    • Codes and Ciphers
    • Conventions in Cryptography
  • Monoalphabetic Substitution Ciphers
    • Atbash Cipher
    • Pigpen Cipher
    • Caesar Shift Cipher
    • Affine Cipher
    • Mixed Alphabet Cipher
    • Other Examples
    • Frequency Analysis: Breaking the Code
    • Homophonic Substitution
  • Simple Transposition Ciphers
    • Rail Fence Cipher
    • Route Cipher
    • Columnar Transposition Cipher
    • Myszkowski Transposition Cipher
    • Permutation Cipher
    • Anagramming: Jumbling words
    • Combining Monoalphabetic and Simple Transposition Ciphers
  • Polyalphabetic Substitution Ciphers
    • Vigenère Cipher
    • Kasiski Analysis: Breaking the Code
    • Autokey Cipher
    • Other Examples
  • Fractionating Ciphers
    • Polybius Square
    • Straddling Checkerboard
    • Transposing Fractionated Text
    • Other ways to Alter Fractionated Text
  • Digraph Substitution Ciphers
    • Playfair Cipher
    • Two-Square Cipher
    • Four-Square Cipher
    • Hill Cipher