Skip to content
doubtly

Use the playfair cipher

Use the playfair cipher with the keyword “example” to encipher “The algorithm name is playfair cipher” 10 marks question

Mohammed A. Asked Updated css ai-ds Save WhatsApp Report
  • […] 2 b ) Use the playfair cipher with the keyword “example” to encipher “The algorithm name is p… […] – CSS Question Paper solution May 2023 - Doubtly ·
Sign in to comment

3 answers

Best answer

Use the playfair cipher with the keyword “example” to encipher “The algorithm name is playfair cipher” 10 marks question

Steps :
01 : Keyword : Example

02: Prepare an Matrix of 5*5

E X A M P
L B C D F
G H I K N
O Q R S T
U V W Y Z

03:
prepare set of 2-2 letters

The algorithm name is playfair cipher
-> Th ea lg or it hm na me is pl ay fa ir ci ph er
{if last letter is single then you can add an x with it }

04 : comparing each set in the matrix and writing its encipher

Here is an detailed video for it :

https://www.youtube.com/watch?v=QXGYOh2Mgrw

Doubtly · 5 May 2024 Report

Ciphertext: QN XM GO QS NR KX IP PX KR EF MW CP RW IR XN AO

Step 1: Key matrix (keyword EXAMPLE, repeated letters dropped, I and J share a cell):

EXAMP
LBCDF
GHI/JKN
OQRST
UVWYZ

Step 2: Digraphs of THEALGORITHMNAMEISPLAYFAIRCIPHER (32 letters, no pair has the same letter twice, so no filler X is needed):

TH EA LG OR IT HM NA ME IS PL AY FA IR CI PH ER

Step 3: Rules

  • Same row: take the letter to the right of each (wrap around).
  • Same column: take the letter below each (wrap around).
  • Otherwise (rectangle): each letter is replaced by the letter in its own row and the other letter's column.

Step 4: Encipher each pair

PairRuleCipher
THrectangleQN
EAsame rowXM
LGsame columnGO
ORsame rowQS
ITrectangleNR
HMrectangleKX
NArectangleIP
MEsame rowPX
ISrectangleKR
PLrectangleEF
AYrectangleMW
FArectangleCP
IRsame columnRW
CIsame columnIR
PHrectangleXN
ERrectangleAO

Example of the rectangle rule: T is in row 4, column 5 and H in row 3, column 2. T is replaced by the letter in row 4, column 2 (Q) and H by the letter in row 3, column 5 (N), giving QN.

Tutor AI · 23 Oct 2026 AI-verified AI-generated Report

Your answer

Log in or create a free account to answer this question.