Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Bifid Cipher

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Ministry of Higher Education and Scientific Research.

Dep: Network & Information Security


Duhok Polytechnic University Subject: Computer A & O
Technical College of Informatics – Akre Grade: 2nd Stage

Bifid cipher
What is the Bifid cipher?
•The bifid cipher is an encryption using a
substitution with a Polybius square and
a transposition, it is described in Traité
Élémentaire de Cryptographie by
Felix Delastelle.
How to encrypt using Bifid cipher?
•Bifid encryption requires a square grid
(or a keyword to generate the grid,
generally 5x5or 6x6) and (optional) a
number N which will serve as a
period/block length (otherwise take
N=1).
How to recognize Bifide ciphertext?
• The message has a low coincidence
index around 0.04 to 0.05.

• If the grid is 5x5 then it can have at most 25


distinct characters.
Example:
• Encrypt the plain message DCODE with the grid
(generated with the word SECRET) :

\ 1 2 3 4 5
1 S E C R T
2 A B D F G
3 H I K L M
4 N O P Q U
5 V W X Y Z
Encryption first consists in splitting letters in blocks of size
N. This text-splitting is not mandatory, but simplifies
encryption/decryption for long texts.
How to decrypt a Bifid cipher?
• Bifid decryption begins identically to encryption.
• Example: The message DBAKS has been encrypted with a period N=3
and the grid (generated with the word MESSAGE):
\ 1 2 3 4 5
1 M E S A G
2 B C D F H
3 I K L N O
4 P Q R T U
5 V W X Y Z

• The message is split into period/block of size N


Example:
Take the first block DBA. D=(2,3), B=(2,1), A=(1,4)
and write it in a table:
D 2 3
B 2 1
A 1 4

To get new coordinates, read the numbers of the table vertically by


columns.
Example:
• The message is decomposed in block of 3: DBA,KS
Each letter is associated with its position in the grid as coordinates (row,
column)
• Example: The letters of the block D,B,A have the
respective coordinates (2,3),(2,1),(1,4).
Write the coordinates on 2 lines (and thus N columns, eventually except
the last block)
2 3 2
1 1 4
Then, read vertically by columns
Example:
• You get 2,1,3,1,2,4 or (2,1),(3,1),(2,4).

• You find the plain letters (2,1)=B, (3,1)=I and (2,4)=F

• The plaintext message is BIF


Sources:
• https://www.dcode.fr/bifid-cipher
• Math for Liberal Studies: Encoding a Message
Using the Bifid Cipher – YouTube
• https://youtu.be/zE34jDx2gWE

You might also like