Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
By
APARNA SONKAR
ROLL NO-1884110018
Under Supervision of
Assist. Prof-Mr.Ashish Ranjan Mishra
(Assist.Prof of C.S.E.D. at R.E.C. Sonbhadra)
CERTIFICATE
This is to certify that this internship report entitled “Data Encryption and Decryption using
RSA Algorithm” submitted by Aparna Sonkar, Roll No.: 1884110018,in partial fulfilment of
the requirements for the degree of Bachelor of Technology in Computer Science & Engineering
College, Affiliated to Dr. A.P.J. Abdul Kalam Technical University, Lucknow) during the
academic year 2019-20, is a bonafide record of work carried out under guidance and supervision
of Mr. Ashish Ranjan Mishra(Assistant Professor C.S.E.D. REC SONBHADRA). This is his/her
I, Anushka Chaudhary, hereby declare that the Internship Training and Summer Project Report,
entitled “Data Encryption and Decryption using RSA Algorithm", submitted to the Rajkiya
Engineering College, Sonbhadra Uttar Pradesh in partial fulfilment of the requirements for
the award of the Degree of Bachelor of Technology is a record of original training undergone by
me during the period (29/07/2019 - 7/10/2019) under the supervision and guidance of Mr. Ashish
Engineering College, Sonbhadra and it has not formed the basis for the award of any
Certificate i
Company certificate ii
Declaration iii
Acknowledgement iv
2. Technology Background 2
3. Modules Covered 3
4. Applications 4
All proofs of how RSA works boil down to the fact that for any
integer x, x1+kφ(n) ≡ x (mod n).
PLATEFORM DESCRIPTION
1.1 Introduction: C was originally developed at Bell Labs by Dennis
Ritchie between 1972 and 1973 to make utilities running on Unix.
Later, it was applied to reimplementing the kernel of the Unix
operating system. During the 1980s, C gradually gained popularity.
Nowadays, it is one of the most widely used programming languages,
with C compilers from various vendors available for the majority of
existing computer architectures and operating systems. C has been
standardized by the ANSI since 1989 (see ANSI C) and subsequently
by the International Organization for Standardization. C is an
imperative procedural language. It was designed to be compiled
using a relatively straightforward compiler, to provide low-level
access to memory, to provide language constructs that map
efficiently to machine instructions, and to require minimal runtime
support. Despite its low-level capabilities, the language was designed
to encourage cross-platform programming. A standards-compliant C
program that is written with portability in mind can be compiled for a
wide variety of computer platforms and operating systems with few
changes to its source code; the language has become available on
various platforms, from embedded microcontrollers to
supercomputers.
1.3 History:
The origin of C is closely tied to the development of the Unix
operating system, originally implemented in assembly language on a
PDP-7 by Dennis Ritchie and Ken Thompson, incorporating several
ideas from colleagues. Eventually, they decided to port the operating
system to a PDP-11. The original PDP-11 version of Unix was
developed in assembly language. Thompson needed a programming
language to make utilities. At first,
he tried to make a Fortran compiler, but soon gave up the idea and
made a new language, B, Thompson's simplified version of BCPL.
However, few utilities were written in B because B was too slow, and
B could not take advantage of PDP-11 features such as byte
addressability. In 1972, Ritchie started to improve B, which resulted
in creating a new language C. The C compiler and some utilities
made with it were included in Version 2 Unix. At Version 4 Unix
released at Nov. 1973, the Unix kernel was extensively re-
implemented by C.By this time, the C language had acquired some
powerful features such as struct types. Unix was one of the first
operating system kernels implemented in a language other than
assembly. Earlier instances include the Multics system (which was
written in PL/I) and Master Control Program (MCP) for the Burroughs
B5000 (which was written in ALGOL) in 1961. In around 1977, Ritchie
and Stephen C. Johnson made further changes to the language to
facilitate portability of the Unix operating system. Johnson's Portable
C Compiler served as the basis for several implementations of C on
new platforms.
3.MODULES COVERED
What is Encryption and Decryption
What is RSA.
RSA algorithm.
Platform description.
History of C language.
Scope.
Snapshot.
References
4.APPLICATION
Development of RSA algorithm for better security.
5.CONCLUSION AND FUTURE SCOPE
In the end, I would like to conclude that my aim to make this project was to
secure Computer from attacks.
I would like to thanks all those who have helped me and contributed in
making of this project.
6.Code:-
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
long int p,q,n,t,flag,e[100],d[100],temp[100],j,m[100],en[100],i;
char msg[100];
int prime(long int);
void ce();
long int cd(long int);
void encrypt();
void decrypt();
int main() {
void encrypt() {
long int pt,ct,key=e[0],k,len;
i=0;
len=strlen(msg);
while(i!=len) {
pt=m[i];
pt=pt-96;
k=1;
for (j=0;j<key;j++) {
k=k*pt;
k=k%n;
}
temp[i]=k;
ct=k+96;
en[i]=ct;
i++;
}
en[i]=-1;
printf("\nTHE ENCRYPTED MESSAGE IS\n");
for (i=0;en[i]!=-1;i++)
printf("%c",en[i]);
}
void decrypt() {
long int pt,ct,key=d[0],k;
i=0;
while(en[i]!=-1) {
ct=temp[i];
k=1;
for (j=0;j<key;j++) {
k=k*ct;
k=k%n;
}
pt=k+96;
m[i]=pt;
i++;
}
m[i]=-1;
printf("\nTHE DECRYPTED MESSAGE IS\n");
for (i=0;m[i]!=-1;i++)
printf("%c",m[i]);
}
OUTPUT:-
REFERNCES
rithm.html