Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 21

CRYPTOGRAPHY

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,

 Now performing 2nd encryption process,


Plaintext be: CIEAMLAKSTYITBS
 Key (Xi): 1

 Here, the length of the plaintext = 15

Therefore the increment of the key will be up to 15 loops.


i.e. the last letter of the plaintext will be encrypted with the
key= 15
EXAMPLE:

Ciphertext = DHERRHSBDJYGPH
EXAMPLE…
 cipher text = DHERRHSBDJYGPH
 Key (Xi ) = 1

 initial plaintext = CIEAMLAKSTYITBS


EXAMPLE
Initial plaintext = CIEAMLAKSTYITBS
Key for the 2nd phase decryption = 35421

the original message = ATTACK BY MISSILE


MARS ...
Advantages
 Single secret key works as double encryption.
 single secret key will minimize the network
traffic.
 There is not possibility to guess the letter
frequency of English Alphabet.
 There is less possibility to decrypt the
message by man-in-the-middle attack unless
known about the algorithm.
MARS ..
Disadvantages
 dependent upon the secret key
CONCLUSION
 Our algorithm is based on encryption and
decryption of plain text.
 It will be applicable in the messaging
services like the chat and email systems.
 It is more secure and mitigated than existing
algorithm.
 Use of digital envelope or certificate (DC) to
secure the secret key.
Thank you

You might also like