Playfair is a great little code, and uses a 5×5 matrix, where we add the key at the start, and then place the rest of the letters (without repeating any). Next we take the plain text two characters at a time, and then draw a rectangle around then, and the other letters which bound the rectangle are then used. For example with a key of “playfair example” Theory

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

For example if we use:

hide the gold in the tree stump

with a key:


We get a matrix of:


The first step is to split into two character strings:

hi de th eg ol di nt he tr ee st um p

First “hi” gives:


to give “bm”. The final mapping is then:

bm od zb xd na be ku dm ui xm mo uv if


There are more details at:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s