Home | News | Hacking | Sciences | Technology | Ti 92 | Programming | Free articles | Links | Webmaster

Simple encipherment techniques
Encryption     Jul 02 2002 - 00:25 EST
stand__sure writes: SIMPLE ENCIPHERMENT TECHNIQUES
Introduction

This is the first article in what is planned to be a three article series on the subject of cryptography.

I. Simple Encipherment Techniques,
II. Advanced Encipherment Techniques, and
III. Decryption Methods.


The third article may be split into two articles (I still haven't decided/finished writing it). There may be a fourth article on compression as encryption and a fifth on well-known computer methods. If the community likes the first couple of papers, then I will probably write four and five.

The concepts in this first article are very fundamental. My reasons for starting here are two-fold:

1) if you can't create an encryption scheme, you can't learn how to break one; and

2) although there are a lot of wonderful sources out there on encryption,
I have seen very few that begin at the beginning.

This first article deals with "pen and paper" methods.
These may seem primitive, but they are used very frequently. Imagine a scenario where you don't have access to a computer and you are fearful of being caught -- what method do you use to encode your messages?
The answer is normally one of the methods shown in this first article. Two good sources for further information on these types of codes are

CRYPTANALYSIS: a study of ciphers and their solution by Helen Fouché Gains
(Dover Publications, ©1939, ©1956, ISBN: 0-486-20097-3) and Codes, Ciphers & Other Cryptic & Clandestine Communication: Making and Breaking Secret Messages from Hieroglyphs to the Internet by Fred B. Wrixon (©1998, Black Dog & Leventhal Publishers, 1998, ISBN:1-57912-040-7)


A quick note: As a rule, I use the terms "encipher" and "decipher" to refer to a method of encoding. I use the terms "decrypt" and "decryption" to refer to breaking codes.


Disclaimers: The author is an enthusiast not an expert. Quotations are used for educational conveyance only.


Simple Transposition

The approach here is very straight forward. The plain text is written (without spaces) in a grid containing a certain number of columns. The cipher is read off in columns.

For example,

DID I HAVE A DREAM OR DID A DREAM HAVE ME -- RUSH

D I D I H A V
E A D R E A M
O R D I D A D
R E A M H A V
E M E R U S H


DEORE IAREM IRIMR HEDHU AAAAS VMDVH

Of course, you can always write in a different order. For example, the same plain text can be written in a spiral

D I D I H A V
E
D A
I D
D R O M A E R


D I D I H A V
A D R E A M E
D R U S H H A
I E M E V A D
D R O M A E R


DADID IDRER DRUMO IESEM HAHVA AMHAW VEADR

All that matters is that the approach being employed is agreed upon by both the sender and the receiver. The grid can have asmany columns as you wish. Using the same example, here's what six columns looks like. (NOTE: there is one empty spacewhich I have filled with a 'Q' -- the position of the filler character is up to you.)

D I D I H A
V E A D R E
A M O R D I
D A D R E A
M H A V E M
E Q R U S H


DVADM EIEMA HQDAO DARID RRVUH RDEES AEIAM H


Example

In God we trust; all others we monitor - Intercept Operators' Motto


Plaintext: INGODWETRUSTALLOTHERSWEMONITOR

Left-to-Right
I N G O D W
E T R U S T
A L L O T H
E R S W E M
O N I T O R
Cipher: IEAEONTLRNGRLSIOUOWTDSTEOWTHMR

Alternating Horizontals
I N G O D W
T S U R T E
A L L O T H
M E W S R E
O N I T O R
Cipher: ITAMONSLENGULWIOROSTDTTROWEHER

Diagonal
I G W U L R
N D R L E M
O T A H E I
E T T W N O
S N S O T R
Cipher: INOESGDTTNWRATSULHWOLEENTRMIOR



Geometrical Transposition

The forgoing columnar transpositions are easily decrypted. Indeed, all one needs to do is write the cipher into different size grids -- eventually the plain-text will be found. To combat this weakness, one can employ Geometrical Transposition.

Transposition becomes less crude when the order in which the columns are taken off is varied. Normally, a key is employed to specify the removal order. For example,

DID I HAVE A DREAM OR DID A DREAM HAVE ME -- RUSH

A M E R I C A


1 6 4 7 5 3 2


D I D I H A V
E A D R E A M
O R D I D A D
R E A M H A V
E M E R U S H


DEOREVMDVHAAAASDDDAEIAREMIRIRM

The key as used is called ataking-off key. The columns are taken off alphabetically from left to right with duplicates being assigned the next ordinal value. This is still pretty weak -- to solve it all one has to do is 'guess' the correct grid-size, fill the grid and then rearrange the columns (I have done this by cutting graph paper into strips and rearranging). To combat this weakness, one can employirregular transposition (if the grid is square, it is sometimes called theNihliist Transposition ). In this transposition, both the row- and column-order are varied. For example,

M


A M E R I C A

M


1 6 4 7 5 3 2

A
M
E
R
I
C
A

D I D I H A V
E A D R E A M
O R D I D A D
R E A M H A V
E M E R U S H



Although different encoders may do otherwise, I ignore the slack characters in the key -- thus, my row key becomes AMERI= 14253 . Working step-wise, (NOTE: I prefer to do rows first since the text is still readable left-to-right -- if one prefers columns, the result would be the same)

D I D I H A V
O R D I D A D
E M E R U S H
E A D R E A M
R E A M H A V


The "United States Army" Double Transposition The goal of multiple anagramming is to make the message more difficult to decrypt. As has been previously shown (supra), the enipherment process is not difficult. The so-called "United States Army" Double Transposition is a real-world example from WWI. It is shown here because it is a slightly different encipherment technique than shown previously. The goal of any "Pen and Paper" method is that it be easy enough to be done anywhere (even on the front lines of a battle). It must also be simple enough that almost anyone can do it with a minimum amount of training.

REGRET THE CHANGE IN SYSTEMS
P A R A D I S E
6 1 7 2 3 5 8 4


REGRETTH
E C H A N G E I
N S Y S T E M S


This first block is not taken off directly. Rather, the columns written as rows in a new block of the same dimensions. For example,

E C S R A S E N
T H I S T G E R
E N G H Y T E M





The completed block is shown below.

P A R A D I S E
6 1 7 2 3 5 8 4


E C S R A S E N
T H I S T G E R
E N G H Y T E M


Reading off by columns, the result is:

ETECH NSIGR SHATY SGTEE ENRM


Simple Substitution
Simple substitution is a one-one mapping of each letter of the alphabet to another.
There is no requirement that a letter not map onto itself.
Indeed, doing so can give a decryptor real fits.
Normally, there is some sort of rule employed to generate the alphabet.
This is so that the encoding scheme can be carried in one's head.


Some examples include the shifted or "Caesar" alphabet.

a b c d e f g h i j k l m n o p q r s t u v w x y z

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

Security is mostly supersition. It does not exist in nature. -Helen Keller
becomes

Vhfxulwb lv prvwob vxshuvwlwlrq. Lw grhv qrw halvw lq qdxwuh. -Khohq Nhoohv
VHFXU LWBLV PRVWO BVXSH UVWLW LRQLW GRHVQ RWHAL VWLQQ DXWUH KHOHQ NHOOH VABCD

Another example: Inverse Alphabets

a b c d e f g h i j k l m n o p q r s t u v w x y z

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

Security is mostly supersition. It does not exist in nature. -Helen Keller
becomes

Hvxfirgb rh nlhgob hfkvihgrgrlm. Rg wlvh mlg vcrhg rm mzgfiv. -Svovm Pvoovi
HVXFI RGBRH NLHGO BHFKV IHGRG RLMRG WLVHM LGVCR HGRMM ZGFIV SVOVM PVOOV IABCD

Another example: Reciprocals

a b c d e f g h i j k l m

N O P Q R S T U V W X Y Z
Or

a b c d e f g h i j k l m

Z Y X W V U T S R Q P O N

To add variety, you can also use keywords in reciprocals. For example, using the keyword "helen"

h e l n a b c d f g i j k

M O P Q R S T U V W X Y Z



At a glance, these methods still look pretty easy to crack. To add more variety to the alphabet, why not block-transpose an alphabet? For example,

H E L N A BC D F G I JK M O P Q RS T U V W XY Z

a b c d e f g h i j k l m n o p q r s t u v w x y z

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

A personal favorite is

a b c d e f g h i j k l m n o p q r s t u v w x y z

Q W E R T Y U I O P A S D F G H J K L Z X C V B N M
If you don't see the pattern, look at your hands for a moment. Got it?


Copyright (C) 2002 cj anderson
you may distribute this document freely in whole so long as this notice remains in tact