2081 4

CSC327 · 2081 · 5 marks

Show the encryption of plain text "ALGORITHM" using the key "PSEUDOCODE" using playfair cipher.

Show the encryption of plain text "ALGORITHM" using the key "PSEUDOCODE" using playfair cipher. [5]

CryptographyChapter 1: Introduction and Classical CiphersSubstitution TechniquesNumerical: Playfair cipher encryption

Playfair Cipher: Encryption of "ALGORITHM" using key "PSEUDOCODE"

Given

  • Plaintext: ALGORITHM
  • Key: PSEUDOCODE
  • Convention: I/J share one cell (standard Playfair)

Solution

Construct the 5x5 Matrix

Key: P S E U D O C O D E

Remove duplicates (keep first occurrence): P, S, E, U, D, O, C (The second O, D, E are dropped.)

Fill remaining letters A, B, F, G, H, I/J, K, L, M, N, Q, R, T, V, W, X, Y, Z:

Col1Col2Col3Col4Col5
Row1PSEUD
Row2OCABF
Row3GHI/JKL
Row4MNQRT
Row5VWXYZ

Prepare Digrams

Plaintext: A L G O R I T H M

No double letters within pairs. M is left alone, pad with X:

$$AL \mid GO \mid RI \mid TH \mid MX$$

Apply Rules

AL: A(2,3), L(3,5) → rectangle → A→(2,5)=F, L→(3,3)=I → FI

GO: G(3,1), O(2,1) → same column → G→(4,1)=M, O→(3,1)=G → MG

RI: R(4,4), I(3,3) → rectangle → R→(4,3)=Q, I→(3,4)=K → QK

TH: T(4,5), H(3,2) → rectangle → T→(4,2)=N, H→(3,5)=L → NL

MX: M(4,1), X(5,3) → rectangle → M→(4,3)=Q, X→(5,1)=V → QV

Final Ciphertext

DigramCipher
ALFI
GOMG
RIQK
THNL
MXQV

$$\boxed{\text{Ciphertext} = \text{FIMGQKNLQV}}$$

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.