Professional Documents
Culture Documents
Cryptography and Number Theory - Presentation - MARS
Cryptography and Number Theory - Presentation - MARS
AND NUMBER
THEORY
Coursework
Group Members
Sunil Shrestha
Roshan Subba
Madhusudhan Khanal
Anil Poddar
Prabesh Wagle
FORECAST
What is Cryptography?
MARS Cipher
Algorithm
Working Mechanism of MARS with Examples
Conclusions
WHAT IS CRYPTOGRAPHY?
Art of writing text or data in secret code
It encrypts the plaintext data into
unreadable format, which is called cipher
text
Base on the mathematical algorithms
Uses the secret key
MARS CIPHER
MARS is the name of 4th planet and derived
from solar system.
Falls under the secret-key cryptography
Inspired from the substitution cipher and
columnar transposition cipher
Uses a single secret key
ALGORITHM
Substitution Cipher
one of the mostly used techniques during the
beginning concept of the message encryption
plaintext are replaced by other numbers,
letters or by symbols
BACKGROUND
Mathematically,
a, b , c, ..., x, y, z
0, 1, 2, ..., 23, 24, 25
Then the general Caesar cipher is:
For encryption,
c- Ek (p) - E(k,p)-(p+k) mod 26
For decryption,
p- Dk (c) - D(k,c)-(c-k) mod 26
ALGORITHM
Advantages
It is easy to understand and implement.
consumes less resource
Disadvantages
Easy cryptanalysis
Each plaintext letters always represented by
the same cipher text letter
Brute force attack can crack the ciphertext.
ALGORITHM
Transposition technique
Columnar Transposition Cipher
Method of encryption in which permutation
function is applied on plain text letters to be
converted into cipher text.
the message is written in the rectangle, row
by row, and the message is read in the
column by column
ALGORITHM
SecretKey = the pattern of the permutation
of the columns
Ciphertext = HTOOSEYTTSTBIHRUISAU
ALGORITHM CONTD..
Advantages
It is easy to understand and implement but
complex to break by cryptanalysis.
The hackers cannot break the code unless
the method is known
Disadvantages
Frequency of English letter can help in
cryptanalysis.
Highly depended upon secret key
WORKING MECHANISM OF MARS
WORKING MECHANISM OF MARS
CONTD..
Mathematically enciphering in the 2nd phase,
Cx1 = (P1+ Xi + N1) mod26
Cx2 = (P2+ Xi + N2) mod26
Cxn = (Pn + Xi + Nn) mod26
Where, P = position of the plaintext letter in
the English alphabet
Xi = the ending key (last digit of a secret key
used in columnar transposition).
N = the position of letter in the plaintext
WORKING MECHANISM OF
MARS ..
Mathematically, the 1st decryption phase can
be denoted as:
Dx1 = (P1- (Xi + N1)) mod26
Dx2 = (P2- (Xi + N2)) mod26
Dxn = (Pn – (Xi + Nn)) mod26
EXAMPLE
Let suppose the plaintext: ATTACK BY MISSILE
Suppose the secret key: 35421
First encryption process,
Ciphertext = DHERRHSBDJYGPH
EXAMPLE…
cipher text = DHERRHSBDJYGPH
Key (Xi ) = 1