SlideShare a Scribd company logo
1 of 36
Download to read offline
A
PROJECT REPORT ON
“Image and Text Encryption and Decryption”
In the fulfillment of theRequirement for the Degree of
BachelorofComputerApplication(B.C.A.)
Submitted By
Mr. PATIL PIYUSH ANIL
To
G. H. Raisoni Institute of Business Management, Jalgaon
Affiliated To
Kavayitri Bahinabai Chaudhari, North
Maharashtra University, Jalgaon
2019-2020
ACKNOWLEDGEMENT
A successful project is the result of a good team- work
whichconsistsofnotonlythepartnerswhoputin their long
and hard work but also those who guided them. Indeed, a
truesaying.
I would like to thanks to ______ and Hon. _________and
our Project guide “_______” all my college Faculty
members for providing me with valuable support and guiding
me throughout my college days.
Thanks andRegards
Mr. PATIL PIYUSH ANIL
Index
Chapter Sr. No Topic Pages
1 Introduction
1.1 Introduction to Project 1
1.2 Introduction to Project Existing System and Need for
New System
1-2
1.3 PROBLEM STATEMENT 2
1.4 OBJECTIVE 3
2 Project Details
2.1 Hardware/ Software Specification 4
3 Feasibility study
3.1 What is feasibility? 5
3.2 Technical feasibility 5
3.3 Economic feasibility 5
3.4 Operational feasibility 6
4 Preliminary Design
4.1 Introduction 7
4.2 Preliminary Design 7
4.3 Entity Relationship Diagram 10
4.4 Data Flow Diagram 11
5 Screen Layout 14
6 Testing
7.1 Introduction 18
7.2 White Box Testing 19
7.3 Black Box Testing 20
7 Implementation 22
8 Future Enhancement 31
9 Conclusion 32
10 Bibliography 33
Page | 1
Chapter 1
Introduction to project
Encryption software has become important when it comes to protecting your
Data. Hack attempts and privacy intrusions mean that it's become easier than ever
for complete strangers to access your most personal details stored on your computer.
For businesses its worse, as the exposure of sensitive or confidential records can
result in financial losses as well as heavy fines.
While there are a number of security solutions available, everything from free
anti-malware tools for home consumers and cloud anti-virus for business, even
simple human error can undermine these attempts to secure data.
Encryption software is already deployed by some large corporations and
government agencies to protect data, but it's also available and now accessible for a
wider range of users.
Once properly setup, even if your security software fails,
thieves/hackers/snoopers would still find it almost impossible to do anything with
any encrypted data that might be exposed.
1.1Existing System:-
There may exist many applications of encryption and decryption of varies type
of file formats .this software are paid software and mainly available as web
applications so they required high speed internet connection.
Page | 2
New System:-
The proposed system suggest a new concept that is free desktop application.
It means user can use this application free of cost .whale in existed system user has
to pay some amount to use the services.
The new system will work in offline mode. Manse user can use it any time
without any problem. The proposed system uses RSA (Rivest–Shamir–Adleman)
algorithm. RSA is known to be the strongest publicly available encryption method.
This algorithm works with both private key and public key. The only way of
decrypting the files which are encrypted with the public key is to use the private key.
Users’ file will be encrypted and saved to desktop .Then, user has to enter the private
key to decrypt the file.
The proposed study is enriched with Waterfall Development Methodology
which implements a sequential based stage by stage concept.
1.2. PROBLEM STATEMENT:-
The underlying respective architecture of most IT systems, including the
desktop computer and internet, does not guarantee security. Users with malicious
intents have always found a way of exploiting one vulnerability or the other. An
attack that affects the confidentiality of information often presents the platform for
the integrity of such information to be compromised. Intercepted information on
transit would make little or no sense to an interceptor if he is not able to decipher the
content of the information. This explains why it is very necessary to ensure
that even when an intruder or unauthorized user successfully obtains access to
some information the confidentiality and integrity of the information remain
uncompromised.
Page | 3
1.3. OBJECTIVE:-
The objective of this project is to design and implement an application that
encrypts and decrypts plain text and images using R.S.A algorithm. EXISTING
SYSTEM Designing an encryption/decryption system, amongst other things,
requires decision on the basic functionality of the software, and the choice of
cryptographic algorithm to be used. While the functionality supports the
attractiveness of the system, the type of cryptographic algorithm actually determines
how much security the system would actually provide. Hence, this forms the major
component in the system design
Page | 4
Chapter 2
Hardware/Software Details
Hardware/Software Hardware/Software
Element
Specification/version
Hardware Processor Intel core to duo
RAM 4 GB
Hard Disk 100 GB
Software OS Windows
Java and Net beans IDE
Page | 5
Chapter 3
Feasibility Study
3.1 What is Feasibility:-
A feasibility study is an analysis that takes all of a project's relevant factors
into account—including economic, technical, legal, and scheduling considerations
to ascertain the likelihood of completing the project successfully. Project managers
use feasibility studies to discern the pros and cons of undertaking a project before
they invest a lot of time and money into it.
3.2Technical Feasibility:-
It is always essential to evaluate the various aspects before
we develop a system. Evaluation should always justify the cost and
benefits ratio. If it is found that benefits are less compare to the cost of
project, thenitisbettertoavoidgoinginforcomputerization. So technical
feasibility is analysed. It has taken 2 days.
Page | 6
3.3Operational Feasibility:-
If you plan to change something inside the company that will affect how
the organization runs or when a client asks you to explore a new product or
process that will affect elements within their own organization. So, it has taken
2 days.
Page | 7
Chapter 4
Preliminary Design
4.1 Introduction:-
About RSA
RSA is an encryption algorithm.
Developed in: 1977.
Developed by: Ron Rivest, Adi Shamir, and Leonard Adleman.
The RSA algorithm is the most commonly used public key encryption algorithm.
Encryption and Decryption
Public Key Encryption:-
It is also known as asymmetric cryptography.
Page | 8
Two keys are used: Public Key and Private Key.
Public Key: For encryption.
Private Key: For decryption, also known as a secret key.
Public Key: Shared with the public that wants to send us data.
Private Key: Kept secret so that when someone sends us data encrypted by our
Public Key, we can decrypt the data using the Private Key.
HOW RSA WORKS:-
Both users (sender and receiver) generates a public and private key.
Flowchart of Generation of Public and Private Key in RSA.
Page | 9
After getting the public and private key the main thing isto encrypt and decrypt File
using RSA.
Text Encryption and Decryption in RSA:-
RSA Algorithm:-
The public and the private key-generation algorithm is the most complex part
of RSA cryptography. Two large prime numbers, p and q, are generated. A modulus
n is calculated by multiplying p and q. This number is used by both the public and
private keys and provides the link between them. The public key consists of the
modulus n, and a public exponent, e as it's a prime number that is not too large. The
e figure doesn’t have to be a secretly selected prime number as the public key is
shared with everyone. The private key consists of the modulus n and the private
exponent d, which is calculated using the Extended Euclidean algorithm to find the
multiplicative inverse with respect to the totient of n.
RSA algorithm is an asymmetric cryptography algorithm. Asymmetric means
that it works on two different keys i.e. Public Key and Private Key. As the name
suggests that the Public Key is given to everyone and Private Key is kept private.
Page | 10
4.3Entity Relationship Diagram:-
RSA (Rivest–Shamir–Adleman) algorithm ER Diagram
Page | 11
4.4 Flow Chart for Encryption and Decryption:-
The above flow chart shows how the project in this article works. The flow
chart explains in a step by step manner the processing of the encryption and
decryption, using JAVA. In this project, we only consider the images not audio.
Images are encrypted, and create the *.txt file, the same file is used for decryption.
IMAGE CRYPTOGRAPHY METHODOLOGY BY RSA:-
The RSA is an cryptographic algorithm which is use to encrypt and decrypt
the data. This algorithm developed in 1977 by Ron Rivest, Adi Shamir, and Leonard
Adleman. RSA cryptosystem is also known as the public-key cryptosystems. RSA
is normally used for secure data transmission.
The encryption is starting on the RSA algorithm with the selection of two
large prime numbers, along with an auxiliary value, as the public key. The prime
numbers are keep in secret. The public key is used to encrypt a message, and private
key is used to decrypt a message or information. The RSA algorithm is encrypt the
original image and decrypts the image by the different keys
Page | 12
RSA is an algorithm is using in the modern computer environment to encrypt
and decrypt the data in transform. The RSA algorithm is also called as an asymmetric
cryptographic algorithm. Asymmetric cryptosystem means two different keys are
using in the encryption and decryption. In the two keys one key is using for
encryption and the second key is using for decryption. This RSA algorithm is also
called as the public key cryptography. Because one of the secret key can be given to
everyone which means public. The other key must be kept private.
Page | 13
RSA Cryptosystem
Page | 14
Chapter 5
Screen Layout
 After Starting application we can see the home page
 After Click on Get Started Button Next window is open where there are
two options
Page | 15
 Here User will select text or images
 After User will Select text or Image for Safety application
Ask Password
Page | 16
 On text Selection user Will navigate to for text Encryption
 On Image Selection user Will navigate to for Image Encryption
 Here are two options one for image encryption and other for image
decryption
Page | 17
After Encryption
 In this image we can see there is a button to select image. After
encryption image will be automatically saved to Desktop
After decryption
 In this image user will select the encrypted image and will get decrypted
image as output. Decrypted image will automatically save to Desktop
Page | 18
Chapter 6
Testing
6.1 Introduction:-
Software Testing is a method to check whether the actual software product
matches expected requirements and to ensure that software product is Defect free. It
involves execution of software/system components using manual or automated tools
to evaluate one or more properties of interest. The purpose of software testing is to
identify errors, gaps or missing requirements in contrast to actual requirements.
Why Software Testing is Important?
Software Testing is Important because if there are any bugs or errors in the
software, it can be identified early and can be solved before delivery of the software
product. Properly tested software product ensures reliability, security and high
performance which further results in time saving, cost effectiveness and customer
satisfaction.
What are the benefits of Software Testing?
Here are the benefits of using software testing:-
Cost-Effective: It is one of the important advantages of software testing.
Testing any IT project on time helps you to save your money for the long term. In
case if the bugs caught in the earlier stage of software testing, it costs less to fix.
Security: It is the most vulnerable and sensitive benefit of software testing.
People are looking for trusted products. It helps in removing risks and problems
earlier.
Product quality: It is an essential requirement of any software product. Testing
ensures a quality product is delivered to customers.
Page | 19
Customer Satisfaction: The main aim of any product is to give satisfaction to
their customers. UI/UX Testing ensures the best user experience.
6.2White Box Testing
White Box Testing is software testing technique in which internal structure,
design and coding of software are tested to verify flow of input-output and to
improve design, usability and security. In white box testing, code is visible to testers
so it is also called Clear box testing, Open box testing, Transparent box testing,
Code-based testing and Glass box testing.
Advantages of White Box Testing:-
 Code optimization by finding hidden errors.
 White box tests cases can be easily automated.
 Testing is more thorough as all code paths are usually covered.
 Testing can start early in SDLC even if GUI is not available.
Page | 20
Disadvantages of White Box Testing:-
 White box testing can be quite complex and expensive.
 Developers who usually execute white box test cases detest it. The
white box testing by developers is not detailed can lead to production
errors.
 White box testing requires professional resources, with a detailed
understanding of programming and implementation.
 White-box testing is time-consuming, bigger programming
applications take the time to test fully.
6.3Black Box Testing:-
Black Box Testing is a software testing method in which the functionalities of
software applications are tested without having knowledge of internal code structure,
implementation details and internal paths. Black Box Testing mainly focuses on
input and output of software applications and it is entirely based on software
requirements and specifications. It is also known as Behavioral Testing.
Page | 21
Tools used for Black Box Testing:-
Tools used for Black box testing largely depends on the type of black box
testing you are doing.
 For Functional/ Regression Tests you can use - QTP, Selenium
 For Non-Functional Tests, you can use - LoadRunner, Jmeter
Black Box Testing and Software Development Life Cycle (SDLC):-
Black box testing has its own life cycle called Software Testing Life Cycle
(STLC) and it is relative to every stage of Software Development Life Cycle of
Software Engineering.
Requirement - This is the initial stage of SDLC and in this stage, a requirement is
gathered. Software testers also take part in this stage.
Test Planning & Analysis - Testing Types applicable to the project are determined.
A Test Plan is created which determines possible project risks and their mitigation.
Design - In this stage Test cases/scripts are created on the basis of software
requirement documents
Test Execution- In this stage Test Cases prepared are executed. Bugs if any are fixed
and re-tested.
Page | 22
Chapter 8
Implementation
This project develop in java .it is a windows executable file with extinction
(.jar)
The application divided into three module
 First module :- home module (home.java)
 Second module :- text module (text.java)
 Third module :- image module (image.java)
The image module can be sub-divided as two modules Encryption (encryption.java)
and Decryption (decryption.java) module.
Text EncryptionGenerating RSA Public Private Key:-
(RSAKeyPairGenerator.java):-
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.*;
import java.util.Base64;
public class RSAKeyPairGenerator {
private PrivateKey privateKey;
private PublicKey publicKey;
Page | 23
public RSAKeyPairGenerator() throws NoSuchAlgorithmException {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(1024);
KeyPair pair = keyGen.generateKeyPair();
this.privateKey = pair.getPrivate();
this.publicKey = pair.getPublic();
}
public void writeToFile(String path, byte[] key) throws IOException {
File f = new File(path);
f.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(f);
fos.write(key);
fos.flush();
fos.close();
}
public PrivateKey getPrivateKey() {
return privateKey;
}
public PublicKey getPublicKey() {
return publicKey;
}
public static void main(String[] args) throws NoSuchAlgorithmException, IOExcepti
on {
RSAKeyPairGenerator keyPairGenerator = new RSAKeyPairGenerator();
keyPairGenerator.writeToFile("RSA/publicKey", keyPairGenerator.getPublicKey()
.getEncoded());
keyPairGenerator.writeToFile("RSA/privateKey", keyPairGenerator.getPrivateKey
().getEncoded());
System.out.println(Base64.getEncoder().encodeToString(keyPairGenerator.getPub
licKey().getEncoded()));
Page | 24
System.out.println(Base64.getEncoder().encodeToString(keyPairGenerator.getPri
vateKey().getEncoded()));
}
}
We can use factory method to generate these keys using KeyPairGenerator.
For the demo purpose we are using a key size of 1024. By default, the private key
is generated in PKCS#8 format and the public key is generated in X.509 format.
Once these keys are generated, either you can write these keys in a file and share
the file containing public keys with the client. Remember, the public key is written
in the text file as X.509 format. Also, we can do a base64 encode to make it
readable and share the string with the client.
Text Encryption:-
public static PublicKey getPublicKey(String base64PublicKey){
PublicKey publicKey = null;
try{
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(Base64.getDecoder().d
ecode(base64PublicKey.getBytes()));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
publicKey = keyFactory.generatePublic(keySpec);
return publicKey;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (InvalidKeySpecException e) {
e.printStackTrace();
}
return publicKey;
}
We have encryption.java that has methods defined for RSA encryption and
decryption. Let us discuss about encryption first. As we discussed above the public
key generated is in X.509 format and we use public key for encryption. Hence, we
Page | 25
need X509EncodedKeySpec class to convert it again to RSA public key.
Remember, that we have base64 encoded public keys. Hence, first let us first
Base64 decode and generate the public key.
we have a simple method encrypt()that takes the string to be encrypted and
the Base64 encoded RSA key for encryption. Here getPublicKey() is the method
that we defined above.
public static byte[] encrypt(String data, String publicKey) throws BadPaddingExceptio
n, IllegalBlockSizeException, InvalidKeyException, NoSuchPaddingException, NoSuchAlgo
rithmException {
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.ENCRYPT_MODE, getPublicKey(publicKey));
return cipher.doFinal(data.getBytes());
}
Text Decryption:-
public staticPrivateKey getPrivateKey(String base64PrivateKey){
PrivateKey privateKey = null;
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().dec
ode(base64PrivateKey.getBytes()));
KeyFactory keyFactory = null;
try {
keyFactory = KeyFactory.getInstance("RSA");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
try {
privateKey = keyFactory.generatePrivate(keySpec);
} catch (InvalidKeySpecException e) {
e.printStackTrace();
}
return privateKey;
}
For decryption we will be using private key and we discussed above that the
private key is generated in PKCS#8 format. Hence, following is the code to
Page | 26
generate the private key from base64 encoded string using
PKCS8EncodedKeySpec.
Now following is the decrypt method that accepts RSA encrypted string and
Base64 encoded RSA private key for decryption.
public static String decrypt(String data, String base64PrivateKey) throws IllegalBloc
kSizeException, InvalidKeyException, BadPaddingException, NoSuchAlgorithmException, N
oSuchPaddingException {
return decrypt(Base64.getDecoder().decode(data.getBytes()), getPrivateKey(bas
e64PrivateKey));
}
Image Encryption:-
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
Page | 27
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
public class EncryptFile {
KeyGenerator keyGenerator = null;
SecretKey secretKey = null;
Cipher cipher = null;
public EncryptFile() {
try { keyGenerator = KeyGenerator.getInstance("Blowfish");
secretKey = keyGenerator.generateKey();
cipher = Cipher.getInstance("Blowfish");
} catch (NoSuchPaddingException ex) {
System.out.println(ex);
} catch (NoSuchAlgorithmException ex) {
System.out.println(ex);}}
public static void main(String[] args) {
String fileToEncrypt = "fileToEncrypt.jpg";
String encryptedFile = "encryptedFile.jpg";
String decryptedFile = "decryptedFile.jpg";
String directoryPath = "C:/Users/dhanoopbhaskar/Desktop/blowfish/";
EncryptFile encryptFile = new EncryptFile();
System.out.println("Starting Encryption...");
encryptFile.encrypt(directoryPath + fileToEncrypt,
Page | 28
directoryPath + encryptedFile);
System.out.println("Encryption completed...");
System.out.println("Starting Decryption...");
encryptFile.decrypt(directoryPath + encryptedFile,
directoryPath + decryptedFile);
System.out.println("Decryption completed...");}
private void encrypt(String srcPath, String destPath) {
File rawFile = new File(srcPath);
File encryptedFile = new File(destPath);
InputStream inStream = null;
OutputStream outStream = null;
try { cipher.init(Cipher.ENCRYPT_MODE, secretKey);
inStream = new FileInputStream(rawFile);
outStream = new FileOutputStream(encryptedFile);
byte[] buffer = new byte[1024];
int len; while ((len = inStream.read(buffer)) > 0) {
outStream.write(cipher.update(buffer, 0, len));
outStream.flush();}
outStream.write(cipher.doFinal());
inStream.close();
outStream.close();
} catch (IllegalBlockSizeException ex) {
System.out.println(ex);
Page | 29
} catch (BadPaddingException ex) {
System.out.println(ex);
} catch (InvalidKeyException ex) {
System.out.println(ex);
} catch (FileNotFoundException ex) {
System.out.println(ex);
} catch (IOException ex) {
System.out.println(ex);
}}
Image Decryption:-
private void decrypt(String srcPath, String destPath) {
File encryptedFile = new File(srcPath);
File decryptedFile = new File(destPath);
InputStream inStream = null;
OutputStream outStream = null;
try {
cipher.init(Cipher.DECRYPT_MODE, secretKey);
inStream = new FileInputStream(encryptedFile);
outStream = new FileOutputStream(decryptedFile);
byte[] buffer = new byte[1024];
int len;
while ((len = inStream.read(buffer)) > 0) {
Page | 30
outStream.write(cipher.update(buffer, 0, len));
outStream.flush();
}
outStream.write(cipher.doFinal());
inStream.close();
outStream.close();
} catch (IllegalBlockSizeException ex) {
System.out.println(ex);
} catch (BadPaddingException ex) {
System.out.println(ex);
} catch (InvalidKeyException ex) {
System.out.println(ex);
} catch (FileNotFoundException ex) {
System.out.println(ex);
} catch (IOException ex) {
System.out.println(ex);}}}
Page | 31
Chapter 8
Future Enhancement
In today’s world the protection of sensitive data is one of the most critical
concerns for organizations and their customers. This, coupled with growing
regulatory pressures, is forcing businesses to protect the integrity, privacy and
security of critical information. As a result cryptography is emerging as the
foundation for enterprise data security and compliance, and quickly becoming the
foundation of security best practice. Cryptography, once seen as a specialized,
esoteric discipline of information security, is finally coming of age.
No one would argue that cryptography and encryption are new technologies.
It was true decades ago and it is still true today – encryption is the most reliable way
to secure data. National security agencies and major financial institutions have long
protected their sensitive data using cryptography and encryption. Today the use of
encryption is growing rapidly, being deployed in a much wider set of industry sectors
and across an increasing range of applications and platforms. Put simply,
cryptography and encryption have become one of the hottest technologies in the IT
security industry – the challenge now is to ensure that IT organizations are equipped
to handle this shift and are laying the groundwork today to satisfy their future needs.
Page | 32
Chapter 9
Conclusion
At the end of the day we need to protect our data. Increasingly, encryption
is being seen as the best way to ensure that data is protected, but the ever growing
use of encryption creates a management challenge. The challenge, however, doesn’t
need to be daunting. Implementing a flexible and extensible solution that automates
many of the time-consuming and error-prone key management tasks in an automated
enterprise-wide manner is rapidly becoming a priority for many organizations. In
order for enterprise-wide encryption to be deployed correctly, organizations need to
deploy the correct tool to manage the keys. In the same way that data protection has
moved from an IT challenge to a C-level issue, key management has become a high-
level business imperative.
Page | 33
Chapter 10
Bibliography
 https://www.theinsanetechie.in/2013/08/java-encryption-and-decryption-of-
image.html
 https://www.devglan.com/java8/rsa-encryption-decryption-java
 https://www.helpnetsecurity.com/2008/02/18/the-future-of-encryption/
 https://www.tutorialspoint.com/cryptography/public_key_encryption.htm
 https://www.c-sharpcorner.com/UploadFile/75a48f/rsa-algorithm-with-C-
Sharp2/
 https://www.codeproject.com/Articles/723175/Image-Cryptography-using-
RSA-Algorithm-in-Csharp
 https://www.thecrazyprogrammer.com/2017/03/rsa-algorithm.html

More Related Content

What's hot (20)

Cryptography
CryptographyCryptography
Cryptography
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
 
Fundamentals of cryptography
Fundamentals of cryptographyFundamentals of cryptography
Fundamentals of cryptography
 
RSA Algorithm report
RSA Algorithm reportRSA Algorithm report
RSA Algorithm report
 
Image encryption and decryption using aes algorithm
Image encryption and decryption using aes algorithmImage encryption and decryption using aes algorithm
Image encryption and decryption using aes algorithm
 
Email security
Email securityEmail security
Email security
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Rsa Encryption in java
Rsa Encryption in java Rsa Encryption in java
Rsa Encryption in java
 
Data Security Using Steganography
Data Security Using Steganography Data Security Using Steganography
Data Security Using Steganography
 
Image encryption and decryption
Image encryption and decryptionImage encryption and decryption
Image encryption and decryption
 
Pgp
PgpPgp
Pgp
 
Steganography Project
Steganography Project Steganography Project
Steganography Project
 
Image Steganography
Image SteganographyImage Steganography
Image Steganography
 
Cryptography ppt
Cryptography pptCryptography ppt
Cryptography ppt
 
Asymmetric Cryptography
Asymmetric CryptographyAsymmetric Cryptography
Asymmetric Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
cryptography ppt free download
cryptography ppt free downloadcryptography ppt free download
cryptography ppt free download
 
Cryptography
CryptographyCryptography
Cryptography
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 

Similar to Image and text Encryption using RSA algorithm in java

AWS Cloud Based Encryption Decryption System
AWS Cloud Based Encryption Decryption SystemAWS Cloud Based Encryption Decryption System
AWS Cloud Based Encryption Decryption SystemIRJET Journal
 
Design of Hybrid Cryptography Algorithm for Secure Communication
Design of Hybrid Cryptography Algorithm for Secure CommunicationDesign of Hybrid Cryptography Algorithm for Secure Communication
Design of Hybrid Cryptography Algorithm for Secure CommunicationIRJET Journal
 
Literature Survey: Secure transmitting of data using RSA public key implement...
Literature Survey: Secure transmitting of data using RSA public key implement...Literature Survey: Secure transmitting of data using RSA public key implement...
Literature Survey: Secure transmitting of data using RSA public key implement...Editor IJCATR
 
IRJET- Survey of Cryptographic Techniques to Certify Sharing of Informati...
IRJET-  	  Survey of Cryptographic Techniques to Certify Sharing of Informati...IRJET-  	  Survey of Cryptographic Techniques to Certify Sharing of Informati...
IRJET- Survey of Cryptographic Techniques to Certify Sharing of Informati...IRJET Journal
 
Security Issues related with cloud computing
Security Issues related with cloud computingSecurity Issues related with cloud computing
Security Issues related with cloud computingIJERA Editor
 
IRJET- Secure Data Protection in Cloud Computing
IRJET-  	  Secure Data Protection in Cloud ComputingIRJET-  	  Secure Data Protection in Cloud Computing
IRJET- Secure Data Protection in Cloud ComputingIRJET Journal
 
Image Cryptography using RSA Algorithm
Image Cryptography using RSA AlgorithmImage Cryptography using RSA Algorithm
Image Cryptography using RSA Algorithmijtsrd
 
Paper id 27201448
Paper id 27201448Paper id 27201448
Paper id 27201448IJRAT
 
IRJET - Data Security in Cloud Computing using Homomorphic Algoritham
IRJET - Data Security in Cloud Computing using Homomorphic AlgorithamIRJET - Data Security in Cloud Computing using Homomorphic Algoritham
IRJET - Data Security in Cloud Computing using Homomorphic AlgorithamIRJET Journal
 
Secure Cloud Environment Using RSA Algorithm
Secure Cloud Environment Using RSA AlgorithmSecure Cloud Environment Using RSA Algorithm
Secure Cloud Environment Using RSA AlgorithmIRJET Journal
 
An Efficient Approach for Data Security in Cloud Environment using Watermarki...
An Efficient Approach for Data Security in Cloud Environment using Watermarki...An Efficient Approach for Data Security in Cloud Environment using Watermarki...
An Efficient Approach for Data Security in Cloud Environment using Watermarki...IRJET Journal
 
Attribute-Based Encryption for Access of Secured Data in Cloud Storage
Attribute-Based Encryption for Access of Secured Data in Cloud StorageAttribute-Based Encryption for Access of Secured Data in Cloud Storage
Attribute-Based Encryption for Access of Secured Data in Cloud StorageIJSRD
 
State of the art parallel approaches for
State of the art parallel approaches forState of the art parallel approaches for
State of the art parallel approaches forijcsa
 
10.11648.j.ijdst.20160204.12
10.11648.j.ijdst.20160204.1210.11648.j.ijdst.20160204.12
10.11648.j.ijdst.20160204.12Arindam Paul
 
IRJET- An Implementation of Secured Data Integrity Technique for Cloud Storag...
IRJET- An Implementation of Secured Data Integrity Technique for Cloud Storag...IRJET- An Implementation of Secured Data Integrity Technique for Cloud Storag...
IRJET- An Implementation of Secured Data Integrity Technique for Cloud Storag...IRJET Journal
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Ranking Efficient Attribute Based Keyword Searching Over Encrypted Data Along...
Ranking Efficient Attribute Based Keyword Searching Over Encrypted Data Along...Ranking Efficient Attribute Based Keyword Searching Over Encrypted Data Along...
Ranking Efficient Attribute Based Keyword Searching Over Encrypted Data Along...IRJET Journal
 

Similar to Image and text Encryption using RSA algorithm in java (20)

AWS Cloud Based Encryption Decryption System
AWS Cloud Based Encryption Decryption SystemAWS Cloud Based Encryption Decryption System
AWS Cloud Based Encryption Decryption System
 
Design of Hybrid Cryptography Algorithm for Secure Communication
Design of Hybrid Cryptography Algorithm for Secure CommunicationDesign of Hybrid Cryptography Algorithm for Secure Communication
Design of Hybrid Cryptography Algorithm for Secure Communication
 
Literature Survey: Secure transmitting of data using RSA public key implement...
Literature Survey: Secure transmitting of data using RSA public key implement...Literature Survey: Secure transmitting of data using RSA public key implement...
Literature Survey: Secure transmitting of data using RSA public key implement...
 
IRJET- Survey of Cryptographic Techniques to Certify Sharing of Informati...
IRJET-  	  Survey of Cryptographic Techniques to Certify Sharing of Informati...IRJET-  	  Survey of Cryptographic Techniques to Certify Sharing of Informati...
IRJET- Survey of Cryptographic Techniques to Certify Sharing of Informati...
 
Security Issues related with cloud computing
Security Issues related with cloud computingSecurity Issues related with cloud computing
Security Issues related with cloud computing
 
IRJET- Secure Data Protection in Cloud Computing
IRJET-  	  Secure Data Protection in Cloud ComputingIRJET-  	  Secure Data Protection in Cloud Computing
IRJET- Secure Data Protection in Cloud Computing
 
Inscibe and Squeeze
Inscibe and SqueezeInscibe and Squeeze
Inscibe and Squeeze
 
Image Cryptography using RSA Algorithm
Image Cryptography using RSA AlgorithmImage Cryptography using RSA Algorithm
Image Cryptography using RSA Algorithm
 
Paper id 27201448
Paper id 27201448Paper id 27201448
Paper id 27201448
 
IRJET - Data Security in Cloud Computing using Homomorphic Algoritham
IRJET - Data Security in Cloud Computing using Homomorphic AlgorithamIRJET - Data Security in Cloud Computing using Homomorphic Algoritham
IRJET - Data Security in Cloud Computing using Homomorphic Algoritham
 
Secure Cloud Environment Using RSA Algorithm
Secure Cloud Environment Using RSA AlgorithmSecure Cloud Environment Using RSA Algorithm
Secure Cloud Environment Using RSA Algorithm
 
An Efficient Approach for Data Security in Cloud Environment using Watermarki...
An Efficient Approach for Data Security in Cloud Environment using Watermarki...An Efficient Approach for Data Security in Cloud Environment using Watermarki...
An Efficient Approach for Data Security in Cloud Environment using Watermarki...
 
Attribute-Based Encryption for Access of Secured Data in Cloud Storage
Attribute-Based Encryption for Access of Secured Data in Cloud StorageAttribute-Based Encryption for Access of Secured Data in Cloud Storage
Attribute-Based Encryption for Access of Secured Data in Cloud Storage
 
State of the art parallel approaches for
State of the art parallel approaches forState of the art parallel approaches for
State of the art parallel approaches for
 
Ijetcas14 355
Ijetcas14 355Ijetcas14 355
Ijetcas14 355
 
10.11648.j.ijdst.20160204.12
10.11648.j.ijdst.20160204.1210.11648.j.ijdst.20160204.12
10.11648.j.ijdst.20160204.12
 
finl.docx
finl.docxfinl.docx
finl.docx
 
IRJET- An Implementation of Secured Data Integrity Technique for Cloud Storag...
IRJET- An Implementation of Secured Data Integrity Technique for Cloud Storag...IRJET- An Implementation of Secured Data Integrity Technique for Cloud Storag...
IRJET- An Implementation of Secured Data Integrity Technique for Cloud Storag...
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Ranking Efficient Attribute Based Keyword Searching Over Encrypted Data Along...
Ranking Efficient Attribute Based Keyword Searching Over Encrypted Data Along...Ranking Efficient Attribute Based Keyword Searching Over Encrypted Data Along...
Ranking Efficient Attribute Based Keyword Searching Over Encrypted Data Along...
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

Image and text Encryption using RSA algorithm in java

  • 1. A PROJECT REPORT ON “Image and Text Encryption and Decryption” In the fulfillment of theRequirement for the Degree of BachelorofComputerApplication(B.C.A.) Submitted By Mr. PATIL PIYUSH ANIL To G. H. Raisoni Institute of Business Management, Jalgaon Affiliated To Kavayitri Bahinabai Chaudhari, North Maharashtra University, Jalgaon 2019-2020
  • 2. ACKNOWLEDGEMENT A successful project is the result of a good team- work whichconsistsofnotonlythepartnerswhoputin their long and hard work but also those who guided them. Indeed, a truesaying. I would like to thanks to ______ and Hon. _________and our Project guide “_______” all my college Faculty members for providing me with valuable support and guiding me throughout my college days. Thanks andRegards Mr. PATIL PIYUSH ANIL
  • 3. Index Chapter Sr. No Topic Pages 1 Introduction 1.1 Introduction to Project 1 1.2 Introduction to Project Existing System and Need for New System 1-2 1.3 PROBLEM STATEMENT 2 1.4 OBJECTIVE 3 2 Project Details 2.1 Hardware/ Software Specification 4 3 Feasibility study 3.1 What is feasibility? 5 3.2 Technical feasibility 5 3.3 Economic feasibility 5 3.4 Operational feasibility 6 4 Preliminary Design 4.1 Introduction 7 4.2 Preliminary Design 7 4.3 Entity Relationship Diagram 10 4.4 Data Flow Diagram 11 5 Screen Layout 14 6 Testing 7.1 Introduction 18 7.2 White Box Testing 19 7.3 Black Box Testing 20 7 Implementation 22 8 Future Enhancement 31 9 Conclusion 32 10 Bibliography 33
  • 4. Page | 1 Chapter 1 Introduction to project Encryption software has become important when it comes to protecting your Data. Hack attempts and privacy intrusions mean that it's become easier than ever for complete strangers to access your most personal details stored on your computer. For businesses its worse, as the exposure of sensitive or confidential records can result in financial losses as well as heavy fines. While there are a number of security solutions available, everything from free anti-malware tools for home consumers and cloud anti-virus for business, even simple human error can undermine these attempts to secure data. Encryption software is already deployed by some large corporations and government agencies to protect data, but it's also available and now accessible for a wider range of users. Once properly setup, even if your security software fails, thieves/hackers/snoopers would still find it almost impossible to do anything with any encrypted data that might be exposed. 1.1Existing System:- There may exist many applications of encryption and decryption of varies type of file formats .this software are paid software and mainly available as web applications so they required high speed internet connection.
  • 5. Page | 2 New System:- The proposed system suggest a new concept that is free desktop application. It means user can use this application free of cost .whale in existed system user has to pay some amount to use the services. The new system will work in offline mode. Manse user can use it any time without any problem. The proposed system uses RSA (Rivest–Shamir–Adleman) algorithm. RSA is known to be the strongest publicly available encryption method. This algorithm works with both private key and public key. The only way of decrypting the files which are encrypted with the public key is to use the private key. Users’ file will be encrypted and saved to desktop .Then, user has to enter the private key to decrypt the file. The proposed study is enriched with Waterfall Development Methodology which implements a sequential based stage by stage concept. 1.2. PROBLEM STATEMENT:- The underlying respective architecture of most IT systems, including the desktop computer and internet, does not guarantee security. Users with malicious intents have always found a way of exploiting one vulnerability or the other. An attack that affects the confidentiality of information often presents the platform for the integrity of such information to be compromised. Intercepted information on transit would make little or no sense to an interceptor if he is not able to decipher the content of the information. This explains why it is very necessary to ensure that even when an intruder or unauthorized user successfully obtains access to some information the confidentiality and integrity of the information remain uncompromised.
  • 6. Page | 3 1.3. OBJECTIVE:- The objective of this project is to design and implement an application that encrypts and decrypts plain text and images using R.S.A algorithm. EXISTING SYSTEM Designing an encryption/decryption system, amongst other things, requires decision on the basic functionality of the software, and the choice of cryptographic algorithm to be used. While the functionality supports the attractiveness of the system, the type of cryptographic algorithm actually determines how much security the system would actually provide. Hence, this forms the major component in the system design
  • 7. Page | 4 Chapter 2 Hardware/Software Details Hardware/Software Hardware/Software Element Specification/version Hardware Processor Intel core to duo RAM 4 GB Hard Disk 100 GB Software OS Windows Java and Net beans IDE
  • 8. Page | 5 Chapter 3 Feasibility Study 3.1 What is Feasibility:- A feasibility study is an analysis that takes all of a project's relevant factors into account—including economic, technical, legal, and scheduling considerations to ascertain the likelihood of completing the project successfully. Project managers use feasibility studies to discern the pros and cons of undertaking a project before they invest a lot of time and money into it. 3.2Technical Feasibility:- It is always essential to evaluate the various aspects before we develop a system. Evaluation should always justify the cost and benefits ratio. If it is found that benefits are less compare to the cost of project, thenitisbettertoavoidgoinginforcomputerization. So technical feasibility is analysed. It has taken 2 days.
  • 9. Page | 6 3.3Operational Feasibility:- If you plan to change something inside the company that will affect how the organization runs or when a client asks you to explore a new product or process that will affect elements within their own organization. So, it has taken 2 days.
  • 10. Page | 7 Chapter 4 Preliminary Design 4.1 Introduction:- About RSA RSA is an encryption algorithm. Developed in: 1977. Developed by: Ron Rivest, Adi Shamir, and Leonard Adleman. The RSA algorithm is the most commonly used public key encryption algorithm. Encryption and Decryption Public Key Encryption:- It is also known as asymmetric cryptography.
  • 11. Page | 8 Two keys are used: Public Key and Private Key. Public Key: For encryption. Private Key: For decryption, also known as a secret key. Public Key: Shared with the public that wants to send us data. Private Key: Kept secret so that when someone sends us data encrypted by our Public Key, we can decrypt the data using the Private Key. HOW RSA WORKS:- Both users (sender and receiver) generates a public and private key. Flowchart of Generation of Public and Private Key in RSA.
  • 12. Page | 9 After getting the public and private key the main thing isto encrypt and decrypt File using RSA. Text Encryption and Decryption in RSA:- RSA Algorithm:- The public and the private key-generation algorithm is the most complex part of RSA cryptography. Two large prime numbers, p and q, are generated. A modulus n is calculated by multiplying p and q. This number is used by both the public and private keys and provides the link between them. The public key consists of the modulus n, and a public exponent, e as it's a prime number that is not too large. The e figure doesn’t have to be a secretly selected prime number as the public key is shared with everyone. The private key consists of the modulus n and the private exponent d, which is calculated using the Extended Euclidean algorithm to find the multiplicative inverse with respect to the totient of n. RSA algorithm is an asymmetric cryptography algorithm. Asymmetric means that it works on two different keys i.e. Public Key and Private Key. As the name suggests that the Public Key is given to everyone and Private Key is kept private.
  • 13. Page | 10 4.3Entity Relationship Diagram:- RSA (Rivest–Shamir–Adleman) algorithm ER Diagram
  • 14. Page | 11 4.4 Flow Chart for Encryption and Decryption:- The above flow chart shows how the project in this article works. The flow chart explains in a step by step manner the processing of the encryption and decryption, using JAVA. In this project, we only consider the images not audio. Images are encrypted, and create the *.txt file, the same file is used for decryption. IMAGE CRYPTOGRAPHY METHODOLOGY BY RSA:- The RSA is an cryptographic algorithm which is use to encrypt and decrypt the data. This algorithm developed in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman. RSA cryptosystem is also known as the public-key cryptosystems. RSA is normally used for secure data transmission. The encryption is starting on the RSA algorithm with the selection of two large prime numbers, along with an auxiliary value, as the public key. The prime numbers are keep in secret. The public key is used to encrypt a message, and private key is used to decrypt a message or information. The RSA algorithm is encrypt the original image and decrypts the image by the different keys
  • 15. Page | 12 RSA is an algorithm is using in the modern computer environment to encrypt and decrypt the data in transform. The RSA algorithm is also called as an asymmetric cryptographic algorithm. Asymmetric cryptosystem means two different keys are using in the encryption and decryption. In the two keys one key is using for encryption and the second key is using for decryption. This RSA algorithm is also called as the public key cryptography. Because one of the secret key can be given to everyone which means public. The other key must be kept private.
  • 16. Page | 13 RSA Cryptosystem
  • 17. Page | 14 Chapter 5 Screen Layout  After Starting application we can see the home page  After Click on Get Started Button Next window is open where there are two options
  • 18. Page | 15  Here User will select text or images  After User will Select text or Image for Safety application Ask Password
  • 19. Page | 16  On text Selection user Will navigate to for text Encryption  On Image Selection user Will navigate to for Image Encryption  Here are two options one for image encryption and other for image decryption
  • 20. Page | 17 After Encryption  In this image we can see there is a button to select image. After encryption image will be automatically saved to Desktop After decryption  In this image user will select the encrypted image and will get decrypted image as output. Decrypted image will automatically save to Desktop
  • 21. Page | 18 Chapter 6 Testing 6.1 Introduction:- Software Testing is a method to check whether the actual software product matches expected requirements and to ensure that software product is Defect free. It involves execution of software/system components using manual or automated tools to evaluate one or more properties of interest. The purpose of software testing is to identify errors, gaps or missing requirements in contrast to actual requirements. Why Software Testing is Important? Software Testing is Important because if there are any bugs or errors in the software, it can be identified early and can be solved before delivery of the software product. Properly tested software product ensures reliability, security and high performance which further results in time saving, cost effectiveness and customer satisfaction. What are the benefits of Software Testing? Here are the benefits of using software testing:- Cost-Effective: It is one of the important advantages of software testing. Testing any IT project on time helps you to save your money for the long term. In case if the bugs caught in the earlier stage of software testing, it costs less to fix. Security: It is the most vulnerable and sensitive benefit of software testing. People are looking for trusted products. It helps in removing risks and problems earlier. Product quality: It is an essential requirement of any software product. Testing ensures a quality product is delivered to customers.
  • 22. Page | 19 Customer Satisfaction: The main aim of any product is to give satisfaction to their customers. UI/UX Testing ensures the best user experience. 6.2White Box Testing White Box Testing is software testing technique in which internal structure, design and coding of software are tested to verify flow of input-output and to improve design, usability and security. In white box testing, code is visible to testers so it is also called Clear box testing, Open box testing, Transparent box testing, Code-based testing and Glass box testing. Advantages of White Box Testing:-  Code optimization by finding hidden errors.  White box tests cases can be easily automated.  Testing is more thorough as all code paths are usually covered.  Testing can start early in SDLC even if GUI is not available.
  • 23. Page | 20 Disadvantages of White Box Testing:-  White box testing can be quite complex and expensive.  Developers who usually execute white box test cases detest it. The white box testing by developers is not detailed can lead to production errors.  White box testing requires professional resources, with a detailed understanding of programming and implementation.  White-box testing is time-consuming, bigger programming applications take the time to test fully. 6.3Black Box Testing:- Black Box Testing is a software testing method in which the functionalities of software applications are tested without having knowledge of internal code structure, implementation details and internal paths. Black Box Testing mainly focuses on input and output of software applications and it is entirely based on software requirements and specifications. It is also known as Behavioral Testing.
  • 24. Page | 21 Tools used for Black Box Testing:- Tools used for Black box testing largely depends on the type of black box testing you are doing.  For Functional/ Regression Tests you can use - QTP, Selenium  For Non-Functional Tests, you can use - LoadRunner, Jmeter Black Box Testing and Software Development Life Cycle (SDLC):- Black box testing has its own life cycle called Software Testing Life Cycle (STLC) and it is relative to every stage of Software Development Life Cycle of Software Engineering. Requirement - This is the initial stage of SDLC and in this stage, a requirement is gathered. Software testers also take part in this stage. Test Planning & Analysis - Testing Types applicable to the project are determined. A Test Plan is created which determines possible project risks and their mitigation. Design - In this stage Test cases/scripts are created on the basis of software requirement documents Test Execution- In this stage Test Cases prepared are executed. Bugs if any are fixed and re-tested.
  • 25. Page | 22 Chapter 8 Implementation This project develop in java .it is a windows executable file with extinction (.jar) The application divided into three module  First module :- home module (home.java)  Second module :- text module (text.java)  Third module :- image module (image.java) The image module can be sub-divided as two modules Encryption (encryption.java) and Decryption (decryption.java) module. Text EncryptionGenerating RSA Public Private Key:- (RSAKeyPairGenerator.java):- import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.security.*; import java.util.Base64; public class RSAKeyPairGenerator { private PrivateKey privateKey; private PublicKey publicKey;
  • 26. Page | 23 public RSAKeyPairGenerator() throws NoSuchAlgorithmException { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); keyGen.initialize(1024); KeyPair pair = keyGen.generateKeyPair(); this.privateKey = pair.getPrivate(); this.publicKey = pair.getPublic(); } public void writeToFile(String path, byte[] key) throws IOException { File f = new File(path); f.getParentFile().mkdirs(); FileOutputStream fos = new FileOutputStream(f); fos.write(key); fos.flush(); fos.close(); } public PrivateKey getPrivateKey() { return privateKey; } public PublicKey getPublicKey() { return publicKey; } public static void main(String[] args) throws NoSuchAlgorithmException, IOExcepti on { RSAKeyPairGenerator keyPairGenerator = new RSAKeyPairGenerator(); keyPairGenerator.writeToFile("RSA/publicKey", keyPairGenerator.getPublicKey() .getEncoded()); keyPairGenerator.writeToFile("RSA/privateKey", keyPairGenerator.getPrivateKey ().getEncoded()); System.out.println(Base64.getEncoder().encodeToString(keyPairGenerator.getPub licKey().getEncoded()));
  • 27. Page | 24 System.out.println(Base64.getEncoder().encodeToString(keyPairGenerator.getPri vateKey().getEncoded())); } } We can use factory method to generate these keys using KeyPairGenerator. For the demo purpose we are using a key size of 1024. By default, the private key is generated in PKCS#8 format and the public key is generated in X.509 format. Once these keys are generated, either you can write these keys in a file and share the file containing public keys with the client. Remember, the public key is written in the text file as X.509 format. Also, we can do a base64 encode to make it readable and share the string with the client. Text Encryption:- public static PublicKey getPublicKey(String base64PublicKey){ PublicKey publicKey = null; try{ X509EncodedKeySpec keySpec = new X509EncodedKeySpec(Base64.getDecoder().d ecode(base64PublicKey.getBytes())); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); publicKey = keyFactory.generatePublic(keySpec); return publicKey; } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (InvalidKeySpecException e) { e.printStackTrace(); } return publicKey; } We have encryption.java that has methods defined for RSA encryption and decryption. Let us discuss about encryption first. As we discussed above the public key generated is in X.509 format and we use public key for encryption. Hence, we
  • 28. Page | 25 need X509EncodedKeySpec class to convert it again to RSA public key. Remember, that we have base64 encoded public keys. Hence, first let us first Base64 decode and generate the public key. we have a simple method encrypt()that takes the string to be encrypted and the Base64 encoded RSA key for encryption. Here getPublicKey() is the method that we defined above. public static byte[] encrypt(String data, String publicKey) throws BadPaddingExceptio n, IllegalBlockSizeException, InvalidKeyException, NoSuchPaddingException, NoSuchAlgo rithmException { Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); cipher.init(Cipher.ENCRYPT_MODE, getPublicKey(publicKey)); return cipher.doFinal(data.getBytes()); } Text Decryption:- public staticPrivateKey getPrivateKey(String base64PrivateKey){ PrivateKey privateKey = null; PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().dec ode(base64PrivateKey.getBytes())); KeyFactory keyFactory = null; try { keyFactory = KeyFactory.getInstance("RSA"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } try { privateKey = keyFactory.generatePrivate(keySpec); } catch (InvalidKeySpecException e) { e.printStackTrace(); } return privateKey; } For decryption we will be using private key and we discussed above that the private key is generated in PKCS#8 format. Hence, following is the code to
  • 29. Page | 26 generate the private key from base64 encoded string using PKCS8EncodedKeySpec. Now following is the decrypt method that accepts RSA encrypted string and Base64 encoded RSA private key for decryption. public static String decrypt(String data, String base64PrivateKey) throws IllegalBloc kSizeException, InvalidKeyException, BadPaddingException, NoSuchAlgorithmException, N oSuchPaddingException { return decrypt(Base64.getDecoder().decode(data.getBytes()), getPrivateKey(bas e64PrivateKey)); } Image Encryption:- import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException;
  • 30. Page | 27 import javax.crypto.KeyGenerator; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; public class EncryptFile { KeyGenerator keyGenerator = null; SecretKey secretKey = null; Cipher cipher = null; public EncryptFile() { try { keyGenerator = KeyGenerator.getInstance("Blowfish"); secretKey = keyGenerator.generateKey(); cipher = Cipher.getInstance("Blowfish"); } catch (NoSuchPaddingException ex) { System.out.println(ex); } catch (NoSuchAlgorithmException ex) { System.out.println(ex);}} public static void main(String[] args) { String fileToEncrypt = "fileToEncrypt.jpg"; String encryptedFile = "encryptedFile.jpg"; String decryptedFile = "decryptedFile.jpg"; String directoryPath = "C:/Users/dhanoopbhaskar/Desktop/blowfish/"; EncryptFile encryptFile = new EncryptFile(); System.out.println("Starting Encryption..."); encryptFile.encrypt(directoryPath + fileToEncrypt,
  • 31. Page | 28 directoryPath + encryptedFile); System.out.println("Encryption completed..."); System.out.println("Starting Decryption..."); encryptFile.decrypt(directoryPath + encryptedFile, directoryPath + decryptedFile); System.out.println("Decryption completed...");} private void encrypt(String srcPath, String destPath) { File rawFile = new File(srcPath); File encryptedFile = new File(destPath); InputStream inStream = null; OutputStream outStream = null; try { cipher.init(Cipher.ENCRYPT_MODE, secretKey); inStream = new FileInputStream(rawFile); outStream = new FileOutputStream(encryptedFile); byte[] buffer = new byte[1024]; int len; while ((len = inStream.read(buffer)) > 0) { outStream.write(cipher.update(buffer, 0, len)); outStream.flush();} outStream.write(cipher.doFinal()); inStream.close(); outStream.close(); } catch (IllegalBlockSizeException ex) { System.out.println(ex);
  • 32. Page | 29 } catch (BadPaddingException ex) { System.out.println(ex); } catch (InvalidKeyException ex) { System.out.println(ex); } catch (FileNotFoundException ex) { System.out.println(ex); } catch (IOException ex) { System.out.println(ex); }} Image Decryption:- private void decrypt(String srcPath, String destPath) { File encryptedFile = new File(srcPath); File decryptedFile = new File(destPath); InputStream inStream = null; OutputStream outStream = null; try { cipher.init(Cipher.DECRYPT_MODE, secretKey); inStream = new FileInputStream(encryptedFile); outStream = new FileOutputStream(decryptedFile); byte[] buffer = new byte[1024]; int len; while ((len = inStream.read(buffer)) > 0) {
  • 33. Page | 30 outStream.write(cipher.update(buffer, 0, len)); outStream.flush(); } outStream.write(cipher.doFinal()); inStream.close(); outStream.close(); } catch (IllegalBlockSizeException ex) { System.out.println(ex); } catch (BadPaddingException ex) { System.out.println(ex); } catch (InvalidKeyException ex) { System.out.println(ex); } catch (FileNotFoundException ex) { System.out.println(ex); } catch (IOException ex) { System.out.println(ex);}}}
  • 34. Page | 31 Chapter 8 Future Enhancement In today’s world the protection of sensitive data is one of the most critical concerns for organizations and their customers. This, coupled with growing regulatory pressures, is forcing businesses to protect the integrity, privacy and security of critical information. As a result cryptography is emerging as the foundation for enterprise data security and compliance, and quickly becoming the foundation of security best practice. Cryptography, once seen as a specialized, esoteric discipline of information security, is finally coming of age. No one would argue that cryptography and encryption are new technologies. It was true decades ago and it is still true today – encryption is the most reliable way to secure data. National security agencies and major financial institutions have long protected their sensitive data using cryptography and encryption. Today the use of encryption is growing rapidly, being deployed in a much wider set of industry sectors and across an increasing range of applications and platforms. Put simply, cryptography and encryption have become one of the hottest technologies in the IT security industry – the challenge now is to ensure that IT organizations are equipped to handle this shift and are laying the groundwork today to satisfy their future needs.
  • 35. Page | 32 Chapter 9 Conclusion At the end of the day we need to protect our data. Increasingly, encryption is being seen as the best way to ensure that data is protected, but the ever growing use of encryption creates a management challenge. The challenge, however, doesn’t need to be daunting. Implementing a flexible and extensible solution that automates many of the time-consuming and error-prone key management tasks in an automated enterprise-wide manner is rapidly becoming a priority for many organizations. In order for enterprise-wide encryption to be deployed correctly, organizations need to deploy the correct tool to manage the keys. In the same way that data protection has moved from an IT challenge to a C-level issue, key management has become a high- level business imperative.
  • 36. Page | 33 Chapter 10 Bibliography  https://www.theinsanetechie.in/2013/08/java-encryption-and-decryption-of- image.html  https://www.devglan.com/java8/rsa-encryption-decryption-java  https://www.helpnetsecurity.com/2008/02/18/the-future-of-encryption/  https://www.tutorialspoint.com/cryptography/public_key_encryption.htm  https://www.c-sharpcorner.com/UploadFile/75a48f/rsa-algorithm-with-C- Sharp2/  https://www.codeproject.com/Articles/723175/Image-Cryptography-using- RSA-Algorithm-in-Csharp  https://www.thecrazyprogrammer.com/2017/03/rsa-algorithm.html