0% found this document useful (0 votes)
183 views

Cryptography-One Time Pad Revisited - 2 (Compatibility Mode)

This is a presentation of a cryptography project done by Natasha.

Uploaded by

yvj_20006373
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views

Cryptography-One Time Pad Revisited - 2 (Compatibility Mode)

This is a presentation of a cryptography project done by Natasha.

Uploaded by

yvj_20006373
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

6/19/2011

1
Cryptography-One Time Pad
Revisited
Natasha Y Jeppu
National Public School
Bangalore, Class 10
What is cryptography?
Cryptography is the science of sending secret
messages. People often use the term secret
code to mean a method for changing a
message into a secret message.
In Boston in 1776 a simple code was used to
show how the British were coming. The code
involved the number of lanterns hung in the
church bell tower: one if by land, two if by sea.
Cryptanalysis
Simple substitution
Every character in plaintext is represented by
an alphabet which is shifted by a definite
integer(n).
Example : Shift of 3
a in plaintext is represented by D in cipher text.
This is followed for other characters.
Cipher wheel
Cryptanalysis
Drawback
The code becomes very easy to solve if the
shift key is known.
Navajo Code Talkers
The Navajo code talkers developed a
secret code based on Navajo language.
They first made up simple English words
to represent military words and translated
them into Navajo. This way submarine
became iron fish which was translated to
besh-lo.
6/19/2011
2
Dancing men
Sir Arthur Conan Doyle, the author of the Sherlock Holmes
mysteries developed a substitution cipher made from stick
figures of dancing men. Above is an example of a substitution
cipher made of symbols instead of letters.
The symbols correspond to letters as shown below and the
flags are added to indicate the end of words.
Cryptanalysis
Decoding method
Frequency analysis
Encryption methods
Double transposition
One time pad
Frequency analysis
In this method the
frequencies of the
occurrence of each
alphabet of the plain text
and cipher text is made
and then matched. The
cipher character having
the highest frequency is
likely to be E and so
on.(refer to graph)
0.00
0.02
0.04
0.06
0.08
0.10
0.12
0.14
A C E G I K M O Q S U W Y
Study on frequency analysis
A frequency analysis of three different books
was made.
The lost symbol, Dan Brown
The chariot of the gods, Erich Von Daniken
Dynamics of flight, Bernard Etkin
A soft copy of the book in word format was used
and each character replaced by #. Word
indicates the number of replacements thus
providing a count.
Results
0
2
4
6
8
10
12
14
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
Series1
0
2
4
6
8
10
12
14
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
Series1
The lost symbol
Dan Brown
The chariot of the gods
Erich Von Daniken
6/19/2011
3
Results
Dynamics of flight
Bernard Etkin
These results show that the three books indeed have an
alphabet distribution that is similar. This can now be used
to a decode simple cipher codes.
0
2
4
6
8
10
12
14
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
Series1
One Time Pad
One Time Pad
A miniature paper one-time pad
Tapir conversion table
My idea
This is based on the one time pad concept.
A unique character in the plaintext will be
represented by different characters in the cipher
text.
This makes the code difficult to break.So even if
you do a frequency analysis of the cipher
characters, it is not necessary that they will
represent the same plaintext character.
Demonstration
757 706 823 438 489
743 31 694 381 445
392 276 317 765 646
655 46 950 795 709
171 97 34 186 754
This demonstration has
been
made using Matlab.
This is a simple 5/5 grid
having numbers from 1 to
1000 arranged randomly.
This is the known to both
the sender (A) and the
receiver (B).
Demonstration
A saves the original grid
using a unique password (in
this case 1234) which is
added to every number in
the original grid. (as shown)
Similarly B saves it using
another password (in this
case 4321)
The password is known only
to the users (A) and (B)
1991 1940 2057 1672 1723
1977 1265 1928 1615 1679
1626 1510 1551 1999 1880
1889 1280 2184 2029 1943
1405 1331 1268 1420 1988
Grid as saved by A
5078 5027 5144 4759 4810
5064 4352 5015 4702 4766
4713 4597 4638 5086 4967
4976 4367 5271 5116 5030
4492 4418 4355 4507 5075
Grid as saved by B
6/19/2011
4
Demonstration
Example:
This is a message.
Every alphabet has an
unique ASCII code. The
message to be sent is
first written in ASCII
code.
T I M G
H S E E
I S
S A S
A
84 105 109 103 32
104 115 101 101 32
105 32 115 46 32
115 97 115 32 32
32 32 97 32 32
ASCII code for this message.
Demonstration
The ASCII codes are then
added to the original grid.
The resultant grid is
displayed below.
841 811 932 541 521
847 146 795 482 477
497 308 432 811 678
770 143 1065 827 741
203 129 131 218 786
This is then sent to B
who then decodes the
message.
For this the original is
got back by subtracting
the password from the
grid that is saved. The
message grid is
subtracted from the
original. This will give
us the ASCII code of
the message which is
then used to display the
message.
Image cryptography
As mentioned earlier , we can use images
to send coded messages.
This is the original image that
both the sender and the
receiver know. Each square
represents a pixel
This is the image that
represents the message.
The dark blue boxes at the
end represent empty
spaces.
Message: This is a
message. Blue indicates
spaces
This image is the coded message
that is sent. The same principle
can be used in sending secret
messages using pictures where
every pixel will have different
colors.
This method makes decoding
very difficult.
Improvising on it
The message is stretched to fit the one-
time pad by adding random number of non
spaces (eg.#).
Random spaces before and filler spaces
after the message are added to make the
message equal to one time pad.
Eg. This is a message.
T###########h###i###########s####### #####i#######s###########
#######a#### #####m###e#####s###s###########a######g#e#####.###########
6/19/2011
5
Improvising on it
The spaces before and after are allotted random
numbers between 200 and 8,000,201.
The non spaces or # are allotted random
numbers between 8,000,201 and 16,000,201.
Other characters are allotted their respective
ASCII numbers.
Modulus function is used to wrap the numbers
and limit between 0 and 16777216.(2^24)
The one time pad has numbers between 0 and
16777216.
There is a 6 digit password to save and retrieve
the one time pad.
Conversion to image
The 16,000,000 number is converted to an
RGB color value by converting it into a 24
bit digit.
This is divided into three parts. The first 8
are assigned to R. The next 8 bits to G
and the last 8 to B.
The image is stored as a tiff file.
A reverse process is done to
to get the 16 million value
VB application
This algorithm has been made into a VB
application for the PC.
One time pad
VB application
Message
Length of
the
messsage
Password
VB application
Encrypted image
Future work
Investigate increase in complexity by using a
Vigenere square
Convert this into an Android code for a mobile
application.
Investigate methods to make the saving of one time
pads more secure.
Investigate methods to send one time pads via Email
securely
6/19/2011
6
References
D. Rijmenants, Is One-time Pad History?,
Cipher Machines & Cryptology 2010
http://users.telenet.be/d.rijmenants
http://users.telenet.be/d.rijmenants/en/onet
imepad.htm
Janet Beissinger and Vera Pless, The
Cryptoclub, using mathematics to make
and break secret code
Thank you

You might also like