0% found this document useful (0 votes)
17 views18 pages

Computing With Encrpted Data

Uploaded by

Sushant Bhardwaj
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)
17 views18 pages

Computing With Encrpted Data

Uploaded by

Sushant Bhardwaj
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/ 18

COMPUTING WITH ENCRPTED DATA

Mini Project Synopsis

MASTER OF COMPUTER APPLICATIONS

Submitted by

SUDHANSHU YADAV

Batch-2023-2025
Enrolment No.-U2010651

Under the Supervision of- Mr. ANAND DURGA SINGH

Centre of Computer Education & Training


Institute of Professional Studies
University of Allahabad, Prayagraj
Uttar Pradesh – 211002

1
Table of Content

1. INTRODUCTION………………………………………………………………………… 3
Problem Definition …………………………………………………………………. 4
Motivation ………………………………………………………………………….. 5
2. OBJECTIVES ……………………………………………………………………………. 6
3. REQUIREMENT ANALYSIS AND SPECIFICATION ………………………………… 7
3.1 Software & Hardware Requirements …………………………………………….8
4. SYSTEM DESIGN
4.1. DFD (Data Flow Diagram) ……………………………………………………. 10
5. NAME OF ALGORITHM ………………………………………………………………11-15
6. MILESTONE ……………………………………………………………………………. 16
7. MEETING WITH SUPERVISOR ……………………………………………………….. 17
8. REFERENCES…………………………………………………………………………… 18

2
INTRODUCTION
Project Title: Computing with encrypted data

RSA (Rivest-Shamir-Adleman) is a widely used asymmetric encryption algorithm that was introduced in
1978 by Ron Rivest , Adi Shamir and Leonard Adleman. It is a named after the three inventors and is based
on the mathematical concepts of number theory.
The RSA algorithm is based on the use of a pair of keys: a public key and a private key. The public key is
used for encryption, while the private key is used for decryption. These keys are generated using complex
mathematical calculations and are designed in such a way that it is computationally infeasible to determine
the private key based on the public key.

3
PROBLEM DEFINITION

Design and implement an encryption and decryption system that ensures data confidentiality, integrity, and security for
sensitive information transmitted over insecure networks. The system should allow for secure communication between
parties by encrypting the data before transmission and decrypting it upon receipt.
Key Challenges:
Data Encryption: The system should provide mechanisms to encrypt plaintext data into ciphertext using a cryptographic
algorithm. The algorithm can be symmetric (same key for encryption and decryption) or asymmetric (different keys for
encryption and decryption).
Data Decryption: The system should allow authorized users to decrypt the ciphertext back into its original plaintext form
using the appropriate key.
Key Management: Implement a secure key management system that handles the generation, distribution, storage, and
revocation of encryption/decryption keys.
Authentication: The system should verify the identity of users or devices before allowing them to access the encrypted
data.
Data Integrity: Ensure that the encrypted data has not been tampered with during transmission or storage by
implementing mechanisms like hash functions or digital signatures.
Usability: The system should be user-friendly, allowing non-experts to easily encrypt and decrypt data without
compromising security.

4
MOTIVATION
The motivation behind the RSA algorithm is to provide a secure method for exchanging encrypted messages or data over
insecure channels, such as the internet, RSA provides confidentiality, integrity, authenticity, and non-repudiation of
messages, making it suitable for a wide range of applications, including secure email communication, online banking, digital
signatures, and secure remote access.

5
OBJECTIVE
The objective of this task is to implement the RSA algorithm for encryption and decryption of
messages. The RSA algorithm involves generating a pair of keys - a public key and a private key. The
public key is used for encrypting messages, while the private key is used for decrypting messages. The
main objective is to ensure that the messages can be securely transmitted over an insecure
communication channel, where only the intended recipient with the private key can decrypt and read
the original message.
Overall, the objective is to implement a secure and efficient RSA algorithm for encryption and
decryption of messages, and provide proper documentation to ensure that the implementation can be
used correctly and securely by others.

6
REQUIREMENT ANALYSIS AND SPECIFICATION
The following describes the hardware software and platform required in order to implement the
computing with encrypted data using RSA algorithm.

HARDWARE

DESKTOP OR LAPTOP-
The computer desktop or a laptop will be used to run the visual software in order to display what
webcam had captured. A notebook which is a little, lightweight and reasonable PC proposed to
increment versatility.

SOFTWARE
The following software are required in the development and execution of this project

1. PYTHON- This whole project is developed in python language python provides us ease to
perform tasks in the field of artificial intelligence it is a high level language which is user
friendly requires less lines of code. Python also gives you various pre defined modules libraries
which helps us to reduce the codes and makes it easier for the developer.

PLATFORM
All the codes of this project are written and executed on VS code coding platform. It is a source code
editor developed by Microsoft with the electron framework Features include support for debugging,
syntax highlighting, intelligent code completion, snippets, code refactoring. and embedded Git.

7
2.1) REQUIREMENT SPECIFICATIONS
A. HARDWARE REQUIREMENT SPECIFICATION

S.No
1. Processor Intel(R) Core(TM)
2. RAM 8GB
3. Processor Speed 1.7 GHz and above
Fig 2.1: Table of Hardware Requirement

B. SOFTWARE REQUIREMENT SPECIFICATION

S.No
1. Programming language Python version 3.11.3 is used
2. VS Code For Software Coding
3. Windows 10 Platform for performing all
these tasks
Fig 2.2: Table of Software Requirement

For the effective performance of the system a minimum of RAM requirement is 512MB or more of OS like
XP and 8 GB for OS like Windows 10. The performance would also be affected by the other software
installed on the machine. The browsing speed of the Internet Connection would play a crucial role on the
performance of the system. Preferable browsing speed would be 1.5Mbps or more. At any instance of time
any number of users can access the website and download the information required.

8
2.2) SYSTEM DESIGN
The system designed in such a way that the user can translate the original text(plain text) to cipher text. .The
proposed design of the RSA Encryption Algorithm consists of four stages. All the stages are discussed
below-
• The first stage: In this stage, reading 1024-bit Data and entered to a variable called input, reading
two prime number p&q to generate public key , reading e which uses to generate private key and
reading another signal which are using for controlling such as clk, rst and En/Dec. The input array
contains 1024 rows, each row contains 1-bit.
• Second stage: In this stage, it receiving both prime numbers (p&q) from the previous stage then it
is operated to produce both keys private and public. The public key used to encrypt data from
original to unreadable data. And the private key uses to decrypt data to back to the original data from
unreadable data.

• Third stage: It contains many components such as Encryption, Decryption, Multiplication and Square
component. In this stage, it receives public key from previous stage and sending it to Encryption
component during Encryption process. In encryption component, to complete the process it send
message and key to both multiplication and Square component because modular exponentiation
and multiplication the large number is difficult to compute. The output form this stage is sending to
next stage which is the last one.

• Fourth stage: The fourth stage receives the input array from the previous stage and entered in the
new array named dataout. The output array consists of 1024 rows, each row consisting of 1-bit.
The output array represents the Ciphertext in Encryption process and represents plaintext in
Decryption process. At the end, it gets the 1024-bit ciphertext from 1024-bit plaintext and Vice
versa.

9
Data Flow Diagram

10
2.1) ALGORITHMS
MODULO ARITHMETIC

Modular arithmetic is a system of arithmetic for integers, where numbers wrap around after they reach a
certain value - the modulus. Given any positive integer n and any nonnegative integer a, if we divide a
by n,we get an integer quotient q and an integer remainder r that obey the following relationship:

where x is the largest integer less than or equal to x. The remainder r is often referred to as a residue. If
a is an integer and n is a positive integer, we define a mod n to be the remainder when a is divided by
n. Theinteger n is called the modulus. Thus, for any integer a, we can always write:

hence 12 mod 7 = 5; -12 mod 7 = 2

Two integers a and b are said to be congruent modulo n, if (a mod n) = (b mod n)


. This is written as a ≡ b(mod n), for example 73 ≡ 4 (mod 23).

EUCLIDEAN ALGORITHM:

Euclidean algorithm is a simple procedure for determining the greatest common divisor of two positive
integers. Nonzero b is defined to be a divisor of a if a = mb for some m, where a, b, and m are integers. We
will use the notation gcd (a, b) to mean the greatest common divisor of a and b. The positive integer c is
saidto be the greatest common divisor of a and b if c is a divisor of a and of b and any divisor of a and b is
a divisor of c.

An equivalent definition is the following:


gcd(a, b) = max[k, such that k|a and k|b].

Because we require that the greatest common divisor be


positive,gcd (a, b) = gcd (|a|, |b|).
Also, because all nonzero integers divide 0, we have gcd(a, 0) = |a|.

We stated that two integers a and b are relatively prime if their only common positive integer factor
is 1.This is equivalent to saying that a and b are relatively prime if gcd (a,b)= 1.

The Euclidean algorithm is based on the following theorem: For any nonnegative integer a and any
positiveinteger b, gcd (a,b) = gcd(b, a mod b)

PRIME NUMBERS:

11
A central concern of number theory is the study of prime numbers. Indeed, whole books have been
written on the subject. An integer p > 1 is a prime number if and only if its only divisors are ± 1 and
±p. Prime numbers play a critical role in number theory and in the cryptographic techniques discussed
later. IfP is the set of all prime numbers, then any positive integer a can be written uniquely in the
following form:

The right-hand side is the product over all possible prime numbers p; for any particular value of a,
most ofthe exponents will be 0.

It is easy to determine the greatest common divisor of two positive integers if we express each integer as
theproduct of primes.
2 1 2
3 5
Example: 300 = 2

x x

1 2
18 = 2 x 3

Gcd (18,300) = 21 x 31 x 50 = 6

For many cryptographic algorithms, it is necessary to select one or more very large prime numbers at
random. Thus we are faced with the task of determining whether a given large number is prime. There is
no simple yet efficient means of accomplishing this task.

12
FERMETTS’S AND EULER’S THEOREM:

Two theorems that play important roles in public-key cryptography are Fermett's theorem and Euler's
theorem. Fermett's theorem states that:
If p is prime and a is a positive integer not divisible by p, then

Before presenting Euler's theorem, we need to introduce an important quantity in number theory, referred
to as Euler's totient function a d itte φ (n), defined as the number of positive integers less than n and
relatively prime to n. By convention, φ 1) = 1.

Example: φ (37) =36 and φ (35). = 24 for a prime number p, φ (p) = p-1

Now suppose that we have two prime numbers p and q, with p not equal q.
Then it can be show that for n =pq, φ n) = φ pq) = φ p) x φ q) = (p-1) x (q-1)

Euler's theorem states that for every a and n that are relatively prime:

Example:

The RSA Algorithm:

The RSA cryptosystem, named after its inventors R. Rivest, A. Shamir, and L. Adleman, is the most widely
used public key Cryptosystem. It may be used to provide both secrecy and digital signatures and its security
is based on the intractability of the integer factorization. The RSA scheme is a block cipher in which the
plaintext and cipher text are integers between 0 and n 1 for some n. A typical size for n is 1024 bits, or
1024
decimal digits. That is, n is less than 2

13
Fig 2.4: Key Generation

Fig 2.5: Encryption

14
Fig 2.6: Decryption

The RSA cryptosystem was invented by Rivest, Shamir, and Adleman in 1977. This is the most commonly
used public-key cryptographic algorithm, and it is considered secure when sufficiently long keys are used.
The security of RSA depends on the difficulty of factoring large integers. Difficulty of factoring n to find the
original primes p,q defines the strength of RSA[1]. RSA is a public encryption algorithm which has a public
key for encryption (e) and private key for decryption (d). RSA algorithm is summarized to three main steps

A. Key Generation
In this step, the both (private and public) keys are generated to be used in Encryption and decryption
process. Generating both keys private and public as shown in below steps:
1. Choose two large prime numbers p and q.
2. Compute modulus number n = p x q.
3. Calculate the Euler function φ(n) = (p-1) x (q-1).
4. Select an integer number e randomly as a public key.It should satisfy Greater Common Divisor
GCD(e, φ(n)) = 1, 1< e < φ(n).
5. Compute the private key d such that d x e =1(mod φ(n)).
This is also shown in fig2.4
B. Encryption
It is the transformation of data into a form that becomes as difficult as possible to read without the
appropriate knowledge (a key). In the RSA algorithm the ciphertexte is generated by below equation.
The fig.2.5 shows the RSA encryption process. C=Me mod n (1)
C. Decryption
It is the reverse of encryption. It is the transformation of encrypted data back into an intelligible
form. In RSA algorithm generate the plaintext using the equation as shown in fig 2.6.

15
MILESTONE
Sr. No. Project Activity Estimated Estimated End
Start Date Date
1. Project Allotment 14/07/2024 24/07/2024
2. Synopsis Creation 26/07/2024 05/08/2024

16
MEETING WITH SUPERVISOR
Date of the Mode Comments by the Signature of the
meet Supervisor Supervisor
27/07/2024 Offline Detailed description about the
project and technology used in the
project

17
REFRENCES

[1] Science N and Phenomena C, 2017 Chaos , Solitons and Fractals The design and
implementation of hybrid RSA algorithm using a novel chaos based RNG ¸ o g 104 p.
655–667.
[2] Seo J H, 2020 Efficient digital signatures from RSA without random oracles Inf. Sci. (Ny).
512, xxxx p. 471–480.
[3] Hsiao F, 2017 Chaotic synchronization cryptosystems combined with RSA encryption
algorithm Fuzzy Sets Syst. 1 p. 1–29.

18

You might also like