Falcon Invoice Discounting: The best investment platform in india for investors
Roshini project 1st Review.pptx
1. A NOVEL ENCRYPTION TECHNIQUE BASED ON
PASCAL’S TRIANGLE AND SIERPINSKI TRIANGLE
Project by
K.ROSHINI
MCA IV Semester
PG202102025
T.TEJASWI
MSc(Computer Science)
IV Semester
PG202106016
Under Guidance of
Dr. D.CHANDRAVATHI
HEAD OF THE DEPARTMENT(M.SC)
& ASSOCIATE PROFESSOR
2. Abstract
Introduction
Problem Statement
Existing System
Proposed System
Algorithm
Example
Conclusion
CONTENTS
3. ABSTRACT
Text messages are often created and shared among different users. Because of its frequent
usage those messages are not been encrypted. Thus it is unable to send confidential messages via
SMS service. In this project, a new encryption technique using the notions of Pascal’s Triangle and
Sierpinski Triangle is introduced. The proposed method uses the Pascal’s triangle for substitution
and Sierpinski triangle for permutation. The method is simple and easy to implement in real time.
It is difficult for the attackers to predict the original message contained in the ciphertext. The
proposed method is not much vulnerable to brute force and letter frequency attacks.
4. Due to the availability and abundant use of technology, sending of short text messages between
the communicating users has increased in domain such as social media, messaging apps, e-mails.
Some messages in those domains are confidential and sensitive for the communicating persons.
Hence, providing confidential to those messages is important.
Confidential service can be provided by mechanisms like encipherment.
Transposition and Substitution methods are used to encrypt and decrypt text messages.
In this project, a new substitution and permutation based technique to encrypt/decrypt text
messages using the concept of Pascal and Sierpinski triangle is proposed.
The notion of Pascal triangle is used to perform XOR operation on the characters of plaintext
message in a particular pattern and then permutation is done to get the ciphertext.
INTRODUCTION
5. EXISTING SYSTEM
Quantum Cryptography enables users to communicate more securely compared to
traditional cryptography. After keys are exchanged between the involved parties, there
is little concern that a malicious actor could decode the data without the key . If the key
is observed when it is being constructed , the expected outcome changes, alerting both
sender and the receiver.
6. PROPOSED SYSTEM
The proposed encryption method uses the Pascals triangle concept as substitution and Sierpinski
triangle concept as permutation to encrypt the data.
Initially, the characters of the plaintext are arranged in triangle format.
Then by using the Pascal principle the characters are XORed bitwise to get a new cipher character.
Subsequently permutation technique is applied using sierpinski triangle to get the final encrypted
message.
7. PASCAL TRIANGLE
Pascal's triangle is a triangular array of the binomial coefficients. The entries in each row are
numbered from the left beginning with k = 0 and are usually staggered relative to the numbers in the
adjacent rows. Having the indices of both rows and columns start at zero makes it possible to state that the
binomial coefficient (nk) appears in the nth row and kth column of Pascal's triangle.
8. SIERPINSKI TRIANGLE
In Sierpinski triangle, the characters at the odd positions are written first and then the even position
characters. A sample of Sierpinski triangle shown below
9. ENCRYPTION ALGORITHM
Input: Plaintext
Step 1: Let the message to be encrypted in the matrix[m, m] as triangle 1.
At sender side, the characters of the plain text are arranged row wise in the triangular pattern
(Triangle-1).
Step 2: Develop another triangle, triangle 2, based on the concept of Pascal triangle. i.e., the corner
characters are XOR’ed with 0 and the middle characters are XORed with the neighboring characters.
Step 3: Add characters in triangle 1 with triangle 2 for substitution.
Step 4: Repeat step 3 until all the characters in the matrix are processed.
Step 5: Read the characters based on the concept of sierpinski triangle to accomplish permutation.
Step 6: Store the encrypted text.
Output: Ciphertext.
10. EXAMPLE : ENCRYPTION
STEP 1:Let us take the plaintext message “ROSHINIPGMCA”.
STEP 2: We need to place the characters of plaintext message is shown below. Padding character, in this
case x‟ is appended at the end to complete the triangle.
Triangle 1
11. A B C D E F G H I J
0 1 2 3 4 5 6 7 8 9
K L M N O P Q R S T
10 11 12 13 14 15 16 17 18 19
U V W X Y Z
20 21 22 23 24 25
STEP 3:Based on the concept of Pascal triangle, the corner
characters are XORed with 0 and the middle values are XORed
with neighboring characters using vigenere cipher.
Ci = (Pi + Ki) mod 26
(0R )+ O
0 = 00000
R = 10001(17)
Now we need to perform XOR for 0 AND R
0R = 10001=17.
17 17+14(we have O value 14) = 31
Now we do mod operation
31 mod 26 = 5
Now we need to check the 5 in the table
5=F
ENCRYPTION EXAMPLE
(0R)+O
=F
(R0)+S
=J
(0F)+H
=M
(FJ)+I
=U
(J0)+N
=W
(0M)=I
=U
(MU)+P
=N
(UW)+G
=I
(W0)+M
=I
(0U)+C
=W
(UN)+A
=Z
(NI)+X
=C
(II)+X
=C
(I0)+X
=F
Triangle 2
12. Ci = (Pi + Ki) mod 26
(F^J)+I
F=0101(5)
J=1001(9)
Now we need to perform XOR for F AND J
FR= 1100=12.
12 12+8=20
Now we do mod operation
20 mod 26 = 20
Now we need to check the 20 in the table
20=U
ENCRYPTION EXAMPLE
14. ENCRYPTION EXAMPLE
In Sierpinski triangle, the characters at the odd positions are
written first and then the even position characters.
RFJMWUNIIWFUZCX
Ciphertext:2
Sierpinski triangle
15. DECRYPTION ALGORITHM
Input : Cipher Text
Step1: Read the characters based on the concept of sierpinski triangle to accomplish permutation.
Step2: Let the message to be decrypted in the matrix [m , m] as triangle 1.
At receiver side the characters of the cipher text are arranged row wise in the triangular pattern.
Step3: Develop another triangle, triangle 2,based on the concept of pascal triangle. i.e., the
corner characters are Xored with 0 and the middle characters are xored with the neighbouring
characters.
Step4: Apply vigenere cipher decryption for 1&2 triangles and perform substitution.
Output: Plain text
16. EXAMPLE:DECRYPTION
STEP 1: Take the cipher text message” RFJMWUNIIWFUZCX”.
STEP 2: We need to place the characters of cipher text message is
shown in the cipher text triangle-1.
STEP 3: The cipher text is arranged according to the Sierpinski
Rule
RFJMWUNIIWFUZCX
17. EXAMPLE: DECRYPTION
STEP 3:Based on the concept of Pascal triangle,
the corner characters are XORed with 0 and the
middle values are XORed with neighboring
characters using vigenere cipher.
Ci = (Pi -Ki) mod 26
0 = 00000
R = 10001
Now we need to perform XOR for O AND R
0R = 10001=17.
F=5
F-(0R)=5-17=-12
Now we need to do the mod operation
-12 mod 26 = 14=O
Triangle-2
A B C D E F G H I J
0 1 2 3 4 5 6 7 8 9
K L M N O P Q R S T
10 11 12 13 14 15 16 17 18 19
U V W X Y Z
20 21 22 23 24 25
F-(0R)
=O
J-(R0)
=S
M-(0F)
=H
U-(FJ)
=I
W-(J0)
=N
U-(0M)
=I
N-(MU)
=P
I-(UW)
=G
I-(W0)
=M
W-(0U)
=C
Z-(CN)
=X
C-(NI)
=X
X-(II)
=X
F-(I0)
=X
19. CONCLUSION
In this project, a new cryptosystem to encrypt/decrypt text messages by using Pascal and
Sierpinski triangles is developed. The method is very simple and easy to implement because it
involves permutation and substitution techniques for encryption. The characters of the plaintext
are transformed to random characters after substitution and the ciphertext are randomly shuffled
by using permutation. The proposed encryption method satisfies both confusion and diffusion
properties significantly. The messages encrypted using the proposed method is not much
vulnerable to cryptanalysis and letter frequency attacks.