ARS Chaotic Image Encription and Decription Using Java
ARS Chaotic Image Encription and Decription Using Java
Bachelor of Engineering
in
Computer Engineering
to
Mr.Sandip S. Patil
CERTIFICATE
This is to certify that the major project stage-1 entitled IMAGE ENCRYPTION
AND DECRYPTION USING AES ALGORITHM, submitted by
Mr.Sandip S. Patil
Guide
We would like to express our deep gratitude and sincere thanks to all who helped us in
completing this project report successfully. Many thanks to the almighty God who gave
us the strength to do this. Our sincere thanks to Principal Prof. Dr. Girish. K. Patnaik
for providing the facilities to complete this Project report. We would like to express our
gratitude and appreciation to all those who gave us the possibility to complete this report.
A special thanks to Prof. Dr. Manoj Patil Sir, Head of the Department, whose help and
stimulating suggestions, and encouragement, helped us in writing this report. We would also
like to thank Mr. Sandip P. Patil, Project Guide, who has given his/her full effort in guiding
us and achieving the goal as well as his encouragement to maintain the progress on track.
I am also sincerely thankful to Mr. Akash D. Waghmare, In-charge the of Project, for his
valuable suggestions and guidance. We would also like to appreciate the guidance given by
other supervisors that have improved our presentation skills through their comments and
tips. Last but not the least, we are extremely thankful to our parents and friends without
whom it could not reach its successful completion.
Acknowledgements ii
Abstract 1
1 INTRODUCTION 2
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 History of Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Problem Defination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Selection of life cycle model . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.7 Organization of Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 ANALYSIS 16
3.1 Requirement Collection And Identification . . . . . . . . . . . . . . . . . . . 16
3.2 Software Requirement Specification (SRS) . . . . . . . . . . . . . . . . . . . 16
3.3 Functional and Non Functional Requirements . . . . . . . . . . . . . . . . . 19
4 Design 21
4.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Data Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.1 Context Level DFD- 0 level . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.2 Level of 1 DFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.3 Level of 2 DFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.4 Level of 3 DFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2.5 Level of 4 DFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3 UML Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.1 Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.2 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.3 Collaboration Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.3.4 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.5 State Transition Diagram . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3.6 Component Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3.7 Deployment Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5 Implementation 35
5.1 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.2 Flow Of System Development . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.2.1 Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.2.2 Encryption Decryption Page . . . . . . . . . . . . . . . . . . . . . . 36
5.2.3 Original image Page . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.2.4 Encrypted Decrypted Image Page . . . . . . . . . . . . . . . . . . . 37
5.3 Software and Hardware for development in detail . . . . . . . . . . . . . . . 37
5.3.1 Implementation Environment . . . . . . . . . . . . . . . . . . . . . . 38
5.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6 System Testing 40
6.1 Test cases and Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7 Result Analysis 42
7.1 Actual Output Of The Project . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Bibliography 47
Index 48
Appendix A 49
An Image Encryption and Decryption Using AES (Advance Encryption Standard) Algorithm
is proposed in the project. Due to increasing use of image in various field, it is very important
to protect the confidential image data from unauthorized access. The design uses the iterative
approach with block size of 128 bit and key size of 128, 192 or 256 bit. The numbers of round
for key size of 256 bits is 14, for 128 bits is 10 and for 192 bits is 12. As secret key increases the
security as well as complexity of the cryptography algorithms. In this report , an algorithm
in which the image is an input to AES Encryption to get the encrypted image and then
input it to AES Decryption to get the original image is proposed and explained which will
further be implemented by me. The report shows the study in which a system could be used
for effective image data encryption and key generation in diversified application areas, where
sensitive and confidential data needs to be transmitted along with the image.
INTRODUCTION
The Internet is the fastest growing communication medium and essential part of the infras-
tructure, nowadays. To cope with the growth of internet it has become a constant struggle
to keep the secrecy of information and when profits are involved, protect the copyright of
data. To provide secrecy and copyright of data, many of the steganographic techniques have
been developed. But each of the technique has their respective pros and cons. Where one
technique lacks in payload capacity, the other lacks in robustness. So, the main emphasis of
cryptography is to overcome these shortcomings.
1.1 Background
Computer has become an essential device now a days. The main use of computer is to
store data and send it from one location to other. The information that is shared must
be transferred in a secured manner. To ensure secured transmission of information, data is
encrypted to unreadable formats by an unauthorized person. Cryptography is the science of
information security which has become a very critical aspect of modern computing systems
towards secured data transmission and storage. The exchange of digital data in cryptography
results in different algorithms that can be classified into two cryptographic mechanisms:
symmetric key in which same key is used for encryption and decryption and asymmetric key
in which different keys are used for encryption and decryption. Images are broadly used in
numerous processes. As a result, the safety of image data from unauthorized access is crucial
at the hands of user. Image encryption plays a significant role in the field of information
hiding. Image hiding or encryption methods and algorithms ranges from simple spatial
domain methods to more complicated and reliable frequency domain. Image Encryption
Using Rubik’s Cube Based Algorithm is the process to transform the image securely so that
no unauthorized user can be able to decrypt the image. Image encryption have applications
in many fields including the internet communication, transmission, medical imaging etc.
First, in order to scramble the pixels of gray-scale original image, the principle of Rubik’s
1.2 Motivation
• Hieroglyph The Oldest Cryptographic Technique:- The first known evidence
of cryptography can be traced to the use of ‘hieroglyph’. Some 4000 years ago, the
Egyptians used to communicate by messages written in hieroglyph. This code was the
secret known only to the scribes who used to transmit messages on behalf of the kings.
One such hieroglyph is shown below.
1.4 Scope
1. 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.
2. 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. Cryptog-
raphy, once seen as a specialized, esoteric discipline of information security, is finally
coming of age.
1.5 Objectives
There are four main goals in cryptography: confidentiality, integrity, authentication, and
non-repudiation Read the section on the goals of cryptography to understand each concept.
All the encryption algorithms make use of two general principles; substitution and transposi-
tion through which plaintext elements are rearranged. Important thing is that no information
should be lost. The objective of any image encryption method is to obtain a top quality
hidden image in order to keep information secret. In this paper, the procedures and schemes
1. Introduction chapter no 1.
3. Shows overall analysis of the system ,description of the system, meaning of the system.
In the Addition to that literature survey , Proposed system and feasibility study , are
also described in the chapter. Various system requirements are elaborated in system
requirement specification chapter no 3 .
4. Study of various system designs like ER diagrams, DFD’s and UML diagrams is also
done in the system design chapter no 4.
1.8 Summary
In this chapter , a brief insight about the CHAOTIC IMAGE ENCRYPTION AND DE-
CRYPTION USING JAVA for security for image on social network, motivation to develop,
the portal the defination of problem,scope of the solution. its objectives, the software pro-
cess model used. Organization and summary are presented. In the next chapter ,project
planning and management is presented.
In every work, proper planning and management is required for carrying out the execution
of any project. Also, the requirement analysis is being done to plan the overall management
of project. Better planning and management helps to understand the project in better ways.
In this chapter, you will see the feasibility study of the project work in Section
1. In Section
2.1 Feasibility
A feasibility study aims to objectively and rationally uncover the strengths and weaknesses
of an existing business or proposed venture, opportunities and threats present in the natural
environment, A feasibility study is an assessment of the practicality of a proposed project
or system.the resources required to carry through, and ultimately the prospects for success.
In its simplest terms, the two criteria to judge feasibility are cost required and value to
be attained.A well-designed feasibility study should provide a historical background of the
business . Generally, feasibility studies precede technical development and project implemen-
tation. A feasibility study evaluates the project’s potential for success; therefore, perceived
objectivity is an important factor in the credibility of the study for potential investors and
lending institutions. It must therefore be conducted with an objective, unbiased approach
to provide information upon which decisions can be based. Taking into consideration the
technical, operational and economic feasiabilities as below, the project can be anticipated
• Dependencies
• Requirement Issue
• Management Issues
• Lack of Knowledge
• Dependencies
• Reqirement Issue
1. Uncertain of appointments.
2. Undefined or unclear requirements.
3. Inaccurate Project estimation.
• Management Issues
• Lack of knowledge
1. If large number of patient appointments occurs in a single day then there is lack
of medical students. That time there is chance of providing health facility takes
much time.
Organic Model It belongs to small and simple software projects which are handled by
a small team with good domain knowledge and few rigid requirements.
E=a(KLOC)b
Software Project ab bb cb db
Organic 2.4 1.05 2.5 0.38
Semidetached 3.0 1.12 2.5 0.35
Embedded 3.6 1.20 2.5 0.32
• E=2.4(5000)1.05=6.62(Efforts)
• D=c(E)d
• D=2.5(6.62)0.38= 5 Months
2.7 Summary
In this chapter, project planning and management is described in Details. Analysis of the
project is represented in the next chapter
ANALYSIS
Proposed system provides a solution to existing system by extending its facilities. The
proposed study aims to explore the possibility of using chaotic or chaos-based encryption
techniques to protect remote sensing satellite images and provides high level of security
in efficient and reliable way. Chaos based crypto- graphic scheme provides high security
level, less computational time and power in reliable and efficient way to deal with balky,
difficult and intractable data that why many researchers recommends that it is more suitable
for multimedia data, especially for images. Chaos-based system have many properties to
achieve high security level, such as sensitivity to change initial conditions and parameters,
periodicity (a system that tends in probability to a limiting form that is independent of the
initial conditions), random behavior and unstable periodic orbits with long periods. It has
very high diffusion and confusion properties that are desirable for crypto-system.
Operating Environment
The user can have membership by concerning the administrator. The system dynami-
cally generates member id on presenting the user details. The user can have transac-
tions by having their member id. The user adds the image for encryption and encrypts
it for confidential images. Overall, system together consists of two server (Key-Server
and Decryption-Server) and three Client modules (WebClient, Desktop-Client and iOS
Client). Both mechanisms - Public Cryptography and Digital Signature requires public-
private key pair. One is used for data encryption – managed by Decryption-Server,
the other one for signing the data – managed by Key-Server. The keys can either be
transferred as file or as QR code. Student private-key can also be transferred through
webrequest authenticated via Shibboleth. The encryption key is to be used by the
admin whereas students use the signing key. The Key-Server’s key pair is used for
signing and verifying the data. One of the Java Server is used to encrypt the exam
data. Idea behind develop 3 different clients is to demonstrate the concept on different
platform / environment.
Assumptions
Security of data, while transferring over a network and stored on a shared location,
is arguably the vital aspect to be think about. In the software, BME for example,
student exam data need to be transfer over a network and will be stored at ASW S3 or
FTP. It is by law in many organizations or countries that data must be stored securely
on shared location. Encryption is the typical way of security to prevent falling data
into wrong hand. The POC presented below uses intuitively a simple but a strong
idea of encryption mechanism to secure the data. Basically, there are two types of
encryption are being used: Symmetric Encryption and Asymmetric Encryption (also
called public-key encryption). Symmetric key uses same key to encrypt-decrypt the
data whereas asymmetric key requires key pair (public-key and private-key). Though
Hardware Requirement
The minimum hardware requirement specifications for developing this project are as
follows:
Software Requirements
The minimum software requirement specifications for developing this project are as fol-
lows:
1. Administrator.
2. User.
3. Other (Guests).
1. Administrator:
Administrator is having all the rights to access this portal. Admin can view all the
images, and the status of the encrypting and decrypting process. He will have control
over the network whether to accept the servers request for receiving image. He will
provide all the benefits for image encryption and decryption.
2. User:
The people who use this system for providing security for confidential images are users.
There may be different set of users for this system. The users just load an image to
encrypt and encrypt it and enter the destination systems IP address to transfer the
image and he can view the status of the network for the sent image.
3. Guests:
Guest or the new user can only view the functionalities in the portal and they have no
access permissions unless they are registered.
• usability,reliability,performance,scalability.
3.4 Summary
In this chapter we have seen the all types of requirement gathering phases and Hardware
software requirement for system similarly, Functional and non-functional requirements of the
system. In next chapter Design part of the system is covered.
Design
The software design used to develop this project is object-oriented design is based on func-
tion and procedures. It can be said as the development of software by building self-contained
modules as objects that can be easily replaced, modified and reused. In this environment
software is a collection of discrete objects that encapsulate their data as well as the func-
tionality to model real world “objects”. Each object has attribute and methods. Objects
are grouped into classes. Here each object is responsible for itself.
This Chapter is About of six sections.These are as follow :
1. Administrator:
Administrator is having all the rights to access this portal. Admin can view all the
images, and the status of the encrypting and decrypting process. He will have control
over the network whether to accept the servers request for receiving image. He will
provide all the benefits for image encryption and decryption.
2. User:
The people who use this system for providing security for confidential images are users.
There may be different set of users for this system. The users just load an image to
encrypt and encrypt it and enter the destination systems IP address to transfer the
image and he can view the status of the network for the sent image.
3. Guests:
Guest or the new user can only view the functionalities in the portal and they have no
access permissions unless they are registered.
• Inputs to the overall system are shown together with data sources (as External entities).
• Outputs from the overall system are shown together with their destinations (as External
entities).
sequence Diagram
A sequence diagram is a type of interaction diagram because it describes how—and
in what order—a group of objects works together. These diagrams are used by
software developers and business professionals to understand requirements for a
new system or to document an existing process.
Implementation
Implementation of the proposed system involves the environment in which the system is
implemented and the overall system development. The overall development of the proposed
system requires suitable environment and proper resources for its successful completion.
Implementation of proposed system consists of various techniques and algorithms. Imple-
mentation of proposed system consists of various techniques and algorithms. Section5.1 talks
about the Algorithms used in model building. The implementation details is discussed in
Section5.2. Section5.3 discusses about the software and hardware development in details
and finally the overall summary is discussed in Section5.4.
5.1 Algorithm
NIST started working on developing AES in January 1997. AES is a symmetric key en-
cryption method that outperforms the DES algorithm. The number of algorithms has been
decreased from the original 15 types to just 4. Rijndael algorithm is another name for the
AES algorithm. when neither the encryption nor decryption of the text block is fixed. The
AES Encryption algorithm (also known as the Rijndael algorithm) is a symmetric block ci-
pher algorithm with a block/chunk size of 128 bits. It converts these individual blocks using
keys of 128, 192, and 256 bits. Once it encrypts these blocks, it joins them together to form
the ciphertext. The AES algorithm is widely used in a variety of applications, including
wireless security, processor security, file encryption, and SSL/TLS. AES encryption is used
regularly by federal government departments as well as non-government entities, commercial
firms, and organizations, to secure sensitive data.
• Servlet:- Servlet technology is used to create a web application (resides at server side
and generates a dynamic web page).
Servlet technology is robust and scalable because of java language. Before Servlet,
CGI (Common Gateway Interface) scripting language was common as a server-side
programming language. However, there were many disadvantages to this technology.
We have discussed these disadvantages below.
There are many interfaces and classes in the Servlet API such as Servlet, Generic-
Servlet, HttpServlet, ServletRequest, ServletResponse, etc. Servlet is a technology
which is used to create a web application. Servlet is an API that provides many in-
terfaces and classes including documentation. Servlet is an interface that must be
implemented for creating any Servlet. Servlet is a class that extends the capabilities
of the servers and responds to the incoming requests. It can respond to any requests.
Servlet is a web component that is deployed on the server to create a dynamic web
page.
• JSP:-technology is used to create web application just like Servlet technology. It can
be thought of as an extension to Servlet because it provides more functionality than
servlet such as expression language, JSTL, etc.
5.4 Summary
In this chapter, the implementation details, implementation environment are described. In
the next chapter, System Testing is discussed.
System Testing
Implementation of system testing is one of the important and difficult job and for testing
the system, there are various test cases which are applied and results are considered. System
testing is an empirical technical investigation conducted to provide stake holders with infor-
mation about the quality of the product or service under test, with respect to the context in
which it is intended to operate. This includes, but is not limited to, the process of executing
a program or application with the intent of finding errors. System Testing is a set of activi-
ties that can be planned in advance and conducted systematically. The proposed system is
tested in parallel with the software that consists of its own phases of analysis. Following are
the various types of testing:-
• Unit Testing:- Unit testing is a software development process in which the smallest
testable parts of an application, called units are individually and independently ex-
amined closely for proper operation. Unit testing can be done manually but is often
automated. During unit testing some errors were raised and all of them were rectified
and handled well. The result was quiet satisfactory and it worked well.
• Integration Testing:- Integration testing is the phase in software testing in which in-
dividual software modules are combined and tested as a group. It occurs after unit
testing and before validation testing. The system has been passed through the integra-
tion testing. The modules were combined and tested for their compatibility with other
modules. The test was almost successful. All the modules coexisted very well,with
almost no bugs.
• White Box Testing:-It is software testing technique in which internal structure, design
and coding of software are tested to verify ow 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. White box testing is done to find out the following information as
shown in below:-
6.2 Summary
In this chapter, the system testing details, testing environment are described. In the next
chapter, result and analysis are discussed.
Result Analysis
fig 7.3 Enter 16bit Encryption key and Choose Image Page
fig 7.7 Enter 16bit Decryption key and Choose Encrypted Image Page
7.2 Summary
In this chapter, the result and analysis details, test cases and test results are described. In
the next chapter, Conclusion and Future Scope are discussed.
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.
[1] Mauro Barni, Franco Bartolini, Enrico Magli and Gab-riella Olmo, “Watermarking tech-
niques for electronic delivery of remote sensing images”, Optical Engineer-ing, 41,No. 9,
pp. 2111-2119, September 2002.
[3] Klaus Holtz, “Advanced Data Compression promises the next big Leap in Network Per-
formance”, IST / SPIE EUROPTO Conference, Zurich, Switzerland, May 1998.
[4] R. J. Anderson and F. A. P. Petitcolas, ”On the limits of steganography,” IEEE Journal
on Selected Areas in Communications, vol. 16, no. 4, pp. 474-481, 1998
[5] Mohammad Zakir Hossain Sarker and Md. Shafiul Parvez, “A Cost Effective Symmetric
Key Crypto-graphic Algorithm for Small Amount of Data”, Pro-ceedings of the 9th IEEE
International Multi topic Conference, pp. 1-6, December 2005
[6] Xun Yi Chik How Tan Chee Kheong Slew Rahman Syed, M., ”Fast encryption for mul-
timedia,” IEEE Transactions on Consumer Electronics, vol. 47, no. 1, pp. 101-107, 2001.
[7] Yen J. C. and Guo J. I., “A new chaotic image encryp-tion algorithm,” Proceeding of
National Symposium on Telecommunications, pp. 358-362, December 1998.
[8] Jui-Cheng Yen and J. I. Guo, “A New Chaotic Mirror-Like Image Encryption Algorithm
and its VLSI Archi-tecture”, Pattern Recognition and Image Analysis, vol.10, no.2, pp.236-
247, 2000.
[9] 9. Jui-Cheng Yen and J. I. Guo, “Efficient Hierarchical Chaotic Image Encryption Algo-
rithm and Its VLSI Re-alization”. IEEE Proceeding Vis. Image Signal Process, vol. 147,
no. 2, pp. 167-175,2000
Abstract, 2
Scope, 4
Analyse, 9
SRS, 16
Non-Functional, 18
Component, 24
Summary, 27
Conclusion, 28
Appendix