Professional Documents
Culture Documents
Cryptography
Cryptography
Cryptography
MINI PROJECT ON
”Cryptography”
Submitted in partial fulfillment of the requirements for
Abstract:
The present century has been one of many scientific discoveries and technological
advancements. With the advent of technology came the issue of security. As computing
systems became more complicated, there was an increasing need for security. Network
Security is becoming more and more crucial as the volume of data being exchanged on the
Internet increases. Security is a broad topic and covers a multitude of sins. Malicious people
trying to gain some benefit, get attention or to harm someone intentionally cause most
security problems. A cryptographic algorithm, or cipher, is a mathematical function used in
the encryption and decryption process. A cryptographic algorithm works in Combination with
a key—a word, number, or phrase—to encrypt the plaintext. The same plaintext encrypts to
different cipher text with different keys. The security of encrypted data is entirely dependent
on two things: the strength of the cryptographic algorithm and the secrecy of the key.
DEPT OF CSE(GECR) 2
CRYPTOGRAPHY
Chapter-1
INTRODUCTION
For the few decades of their existence, computer networks were used for simple
tasks. Under these conditions, security did not get much attention. But now due to the wide
spread application of computers in various fields, network security is a looming horizon as a
potentially massive problem. Security is a broad topic and covers a multitude of sins. In its
simplest form it is concerned with making sure that nosy people cannot read or the worse yet,
modify messages intended for other recepients.it is concerned with people trying to access
remote services that they are not authorized to use. Most security problems are intentionally
caused by malicious people trying to gain some benefit or harm someone.
Historically three people have contributed to the art of cryptography:
Military, the diplomatic corps, diarists .Of these due to the strategic importance of their work
military has the most important role .Until the advent of computers one of the main
constraints on cryptography is the ability of the code clerk to perform the necessary
transformations, often on a battle field with little equipment An additional constraint has been
the difficulty in switching from one cryptographic method to another, since the entails
retaining a large number of people. However the danger of acodeclerk being captured by the
enemy has made it essential to be able to change the cryptographic methods instantly.
The messages to be encrypted, known as the plain text, are transformed by a function that is
parameterized by a key. The o/p of the encryption process, known as the cipher text, is then
transmitted, often by messenger or radio. We assume that the enemy, or intruder, hears and
accurately copies down the complete cipher text. However, unlike the intended recipient, he
does not know what the decryption key is and so
Cannot decrypt the cipher text easily. Sometimes the intruder can, not only listen to the
communication channel (Passive intruder) but can also record messages and play them back
later, inject his own messages, or modify legitimate messages before they get them to the
receiver (Active intruder).
DEPT OF CSE(GECR) 3
CRYPTOGRAPHY
Cryptography has a long and fascinating history. Centuries ago, cryptography was used as a
tool to protect national secrets and strategies. Today, network engineers focus on
cryptography methods for computer communication networks. Cryptography is the process of
transforming a piece of information or message shared by two parties into some sort of code.
The message is scrambled before transmission so that it is undetectable by outside watchers.
This kind of message needs to be decoded at the receiving end before any further processing.
The main tool that network security experts are using to encrypt a message M is a secret key
K; the fundamental operation often used to encrypt a message is the Exclusive-OR ( ).
Suppose that we have one bit, M, and a secret bit, K. A simple encryption is carried out using
M K. To decrypt this message, the second party if he/she has the key, K can easily detect M.
The two types of encryption techniques are secret-key encryption and public-key encryption.
In a secret-key model, both sender and receiver conventionally use the same key for an
encryption process. In a public-key model, a sender and a receiver each use a different key.
The public-key system is more powerful than the secret-key system and provides better
security and message privacy. But the biggest drawback of public-key encryption is speed.
The public-key system is significantly more complex computationally and may not be
practical in many cases. Hence, the public-key system is used only to establish a session to
exchange a session key. Then, this session key is used in a secret-key system for encrypting
messages for the duration of the session.
DEPT OF CSE(GECR) 4
CRYPTOGRAPHY
Chapter 2
Literature survey:
ii. http://www.geeksforgeeks.org
iv. http://ptgmedia.pearsoncmg.com
v. http://jcryptool.software.informer.com
vi. A Method for obtaining Digital Signatures and Public Key Cryptographic Systems.
---Rivesp.R, Shamir. A and Adleman.L
DEPT OF CSE(GECR) 5
CRYPTOGRAPHY
Chapter 3
REQUIREMENTS SPECIFICATIONS:
Functional requirements:
DEPT OF CSE(GECR) 6
CRYPTOGRAPHY
User Interface:
In this software, have three main button (Encrypt, decrypt, send)
First tab i.e. encrypt tab will allow a user to select the algorithm in which they wish to
encrypt the file and browse the file from hard disk and provide the public key to help in
encryption.
Second tab i.e. decrypts option, will allow a user to decrypt the encrypted file in other end
providing private key.
Third tab i.e. send option, will allow user to send a file to another user.
Hardware Requirements:
DEPT OF CSE(GECR) 7
CRYPTOGRAPHY
Chapter 4
DESIGN
Cryptography Technique
Cryptography has a long and fascinating history. Centuries ago, cryptography was used as a
tool to protect national secrets and strategies. Today, network engineers focus on
cryptography methods for computer communication networks. Cryptography is the process of
transforming a piece of information or message shared by two parties into some sort of code.
The message is scrambled before transmission so that it is undetectable by outside watchers.
This kind of message needs to be decoded at the receiving end before any further processing.
The main tool that network security experts are using to encrypt a message M is a secret key
K; the fundamental operation often used to encrypt a message is the Exclusive-OR ( ).
Suppose that we have one bit, M, and a secret bit, K. A simple encryption is carried out using
MK. To decrypt this message, the second partyif he/she has the key, Kcan easily detect M
by performing the following:
Equation 10.1
(MK)K=M
In computer communication networks, data can travel between two users while it is encrypted
two servers are exchanging data while two types of encryption devices are installed in their
communication network. The first encryption device is end-to-end encryption, whereby secret
coding is carried out at both end systems
DEPT OF CSE(GECR) 8
CRYPTOGRAPHY
2. Each incoming 64-bit message is broken into two 32-bit halves denoted by Li and Ri,
respectively.
3. The 56 bits of the key are also broken into two 28-bit halves, and each half is rotated
one or two bit positions, depending on the round.
4. All 56 bits of the key are permuted, producing version ki of the key on round i.
5. In this step, is a logic Exclusive-OR, and the description of function F() appears next.
Then, Li and Ri are determined by
Equation 10.2
Li=Ri-1
and
Equation 10.3
DEPT OF CSE(GECR) 9
CRYPTOGRAPHY
4. The corresponding eight chunks of Ri-1 and eight chunks of ki 4. are combined as
follows:
Equation 10.4
Ri-1= Ri-1 ki.
At the receiver, the same steps and the same key are used to reverse the encryption. It is now
apparent that the 56-bit key length may not be sufficient to provide full security.
This argument is still controversial. Triple DES provides a solution for this controversy: three
keys are used, for a total of 168 bits. It should also be mentioned that DES can be
implemented more efficiently in hardware than in software.
A single block of 128-bit plaintext (16 bytes) as an input arrives from the left. The plaintext is
formed as 16 bytes m0 through m15 and is fed into round 1 after an initialization stage. In
this round, substitute units indicated by S in the figure perform a byte-by-byte substitution of
blocks. The ciphers, in the form of rows and columns, move through a permutation stage to
shift rows to mix columns. At the end of this round, all 16 blocks of ciphers are Exclusive-
DEPT OF CSE(GECR) 10
CRYPTOGRAPHY
ORed with the 16 bytes of round 1 key k0 (1) through k15(1). The 128-bit key is expanded
for ten rounds. The AES decryption algorithm is fairly simple and is basically the reverse of
the encryption algorithm at each stage of a round. All stages of each round are reversible.
RSA Algorithm:
Rivert, Shamir, and Aldeman developed the RSA public-key encryption and signature
scheme. This was the first practical public-key encryption algorithm. RSA is based on the
intractability of factoring large integers.
Assume that a plaintext m must be encrypted to a ciphertext c. The RSA algorithm has three
phases for this: key generation, encryption, and decryption.
Authentication:
Authentication techniques are used to verify identity. Message authentication verifies the
authenticity of both the message content and the message sender. Message content is
authenticated through implementation of a hash function and encryption of the resulting
message digest. The sender's authenticity can be implemented by use of a digital signature.
Authentication and Digital Signature:
The technical method of providing a sender's authentication is performed through
cryptography. Many cryptographic mechanisms have been developed. Among them, the RSA
algorithm implements both encryption and digital signature. When RSA is applied, the
message is encrypted with the sender's private key. Thus, the entire encrypted message serves
as a digital signature. This means that at the receiving end, the receiver can decrypt it, using
the public key. This authenticates that the packet comes from the right user.
DEPT OF CSE(GECR) 11
CRYPTOGRAPHY
Chapter 5
IMPLEATION
Select File New Empty File in Text Editor Text Editor Will Be Opened Write
The Message (Plain Text) In Text Editor.
DEPT OF CSE(GECR) 12
CRYPTOGRAPHY
Sender:-
Click on Algorithms Menu Symmetric Select AES (Advance Encryption Standard)
Click On It.
DEPT OF CSE(GECR) 13
CRYPTOGRAPHY
Encryption:
Select Encrypt Click on Create a new key in the key store Create the key Enter the
password Confirm the password.
DEPT OF CSE(GECR) 14
CRYPTOGRAPHY
Key Generation:
Rename the Contact name Enter the Password Confirm the Password Click on
Finish Click on Finish Again.
DEPT OF CSE(GECR) 15
CRYPTOGRAPHY
DEPT OF CSE(GECR) 16
CRYPTOGRAPHY
After Entering the Password and See the Result in Output bin File with Hexadecimal
Values and Cipher Text.
DEPT OF CSE(GECR) 17
CRYPTOGRAPHY
Decryption:
Select Algorithms Symmetric AES (Advance Encryption Standard) Decrypt Select
the Key which you have created and Click on Finish.
DEPT OF CSE(GECR) 18
CRYPTOGRAPHY
Enter The Password and See the Result in Output bin File with Hexadecimal Values and
Plain Text.
DEPT OF CSE(GECR) 19
CRYPTOGRAPHY
Select File New Empty File in Text Editor Text Editor Will Be Opened Write
The Message (Plain Text) In Text Editor.
DEPT OF CSE(GECR) 20
CRYPTOGRAPHY
Sender:-
Click on Algorithms Menu Asymmetric Select RAS (Rivest,Shamir,Adleman) Click
On It.
DEPT OF CSE(GECR) 21
CRYPTOGRAPHY
Encryption:
Select Encrypt Click on Create a new key pair and type in the contact name Create the
key pair enter the password Confirm the password Click on finish again.
DEPT OF CSE(GECR) 22
CRYPTOGRAPHY
After Entering the Password and See the Result in Output bin File with Hexadecimal
Values and Cipher Text.
DEPT OF CSE(GECR) 23
CRYPTOGRAPHY
Decryption:
Click on Algorithms Menu Asymmetric Select RAS (Rivest,Shamir,Adleman)
Decrypt Select Key name you have declared earlier and click finish.
DEPT OF CSE(GECR) 24
CRYPTOGRAPHY
Enter The Password to Decrypt and See the Result in Output bin File with Hexadecimal
Values and Plain Text.
DEPT OF CSE(GECR) 25
CRYPTOGRAPHY
Select File New Empty File in Text Editor Text Editor Will Be Opened Write
The Message (Plain Text) In Text Editor.
DEPT OF CSE(GECR) 26
CRYPTOGRAPHY
Click on Algorithms Menu Click on Signature Select DSA and click on it.
DEPT OF CSE(GECR) 27
CRYPTOGRAPHY
DEPT OF CSE(GECR) 28
CRYPTOGRAPHY
Rename contact name Create the key pair enter the password Confirm the password
Click on finish again.
DEPT OF CSE(GECR) 29
CRYPTOGRAPHY
DEPT OF CSE(GECR) 30
CRYPTOGRAPHY
Save The File Name Give Some Name to Filename and save it.
DEPT OF CSE(GECR) 31
CRYPTOGRAPHY
DEPT OF CSE(GECR) 32
CRYPTOGRAPHY
DEPT OF CSE(GECR) 33
CRYPTOGRAPHY
After signing the file Verify it File is modified or what Select Verify choose the file
where we saved the file.
DEPT OF CSE(GECR) 34
CRYPTOGRAPHY
DEPT OF CSE(GECR) 35
CRYPTOGRAPHY
DEPT OF CSE(GECR) 36
CRYPTOGRAPHY
The Signature Is Valid Means That The Data Sended By The Sender Is Not Modified By
Unauthorized Person (Hackers) It Verified.
DEPT OF CSE(GECR) 37
CRYPTOGRAPHY
If The Data Sended By the Sender Is Modified By the Hackers While Transmitting Into
Receiver While Receiver Received the Message Then He Should verified its valid or not
The Signature Is Not Valid Because The Data Is Modified So The Signature Is Not Valid
DEPT OF CSE(GECR) 38
CRYPTOGRAPHY
HASH FUNCTION
Select File New Empty File in Text Editor Text Editor Will Be Opened Write
The Message (Plain Text) In Text Editor.
DEPT OF CSE(GECR) 39
CRYPTOGRAPHY
Click on Algorithms Menu Select Hash Select MD5 (Message Digest) Click On
Finish.
DEPT OF CSE(GECR) 40
CRYPTOGRAPHY
Hash Algorithm is the one way Function This Function Does Not Need Any Further Input
Click the Finish Button.
DEPT OF CSE(GECR) 41
CRYPTOGRAPHY
DEPT OF CSE(GECR) 42
CRYPTOGRAPHY
Select File New Empty File in Text Editor Text Editor Will Be Opened Write
The Message (Plain Text) In Text Editor.
DEPT OF CSE(GECR) 43
CRYPTOGRAPHY
DEPT OF CSE(GECR) 44
CRYPTOGRAPHY
Type The Output Size [Default 128 bits] or your choice Click on Finish.
We Can Obtain Various Size And Fitter To Binary Output Or Output As Character Or Output
As Number.
DEPT OF CSE(GECR) 45
CRYPTOGRAPHY
The Output bin SHA-1 file is generated and displayed on Above Screen.
DEPT OF CSE(GECR) 46
CRYPTOGRAPHY
Chapter 6
RESULT AND DISCUSSION
This project is mainly intended to enhance security of a system. So our main motive is
maximizing the security by making cipher text in a confusing way. Each time we encrypt a
same word, we are supposed to get a different cipher text. This will surely confuse hacker’s
and cryptanalyst’s. Another thing we kept in mind is to minimize complexity of algorithms.
This will enhance speed of execution and in turn increase performance of our project. This
allows our XMODES to be incorporated with different kinds of other systems. Since the
speed is quite good, it can be even used in online and cloud computing systems very
effectively.
TESTING- Our project has been tested with a variety of words and images. Almost all
keyboard inputs were successfully working in this software. Even out of keyboard characters
are working as this project treats characters as ascii codes so there is nothing to be confused
about them. In case of images, this projects performance degrades as size of the image
increases. For smaller images this works out very fine. But for larger images the time taken is
too large.
SYSTEM EVALUATION BASED ON TESTING- As far as texts are concerned
this works similar in all computes in the present day. Time required for encrypting text is too
small the performance of a system is not much clear and vivid. But for images, the
performance of image encryption is based on performance of system. For lower processor it
takes more time to encrypt.
ACCURACY- Our project has high degree of accuracy. A small change in one character at
any phase of processing will bring about a big change in outcome, whether it be concerned
with encryption or decryption. There is no question about any word changing its form as this
project is carefully created keeping all the accuracy conservative measures. A small change in
any word will change the image and the image becomes in a form that cannot be viewed. The
image thus gets damaged. But since the accuracy is high this problem was Environment in
testing phase. All images were successfully viewed and the encryption and decryption
process was so successful. But when it comes to hackers a small change in any of the portion
of image string, the out become becomes weird, so intrusion and hacking is very difficult.
DEPT OF CSE(GECR) 47
CRYPTOGRAPHY
CONCLUSION
As we toward a society where automated information resources are increased and
cryptography will continue to increase in importance as a security mechanism. Electronic
networks for banking, shopping, inventory control, benefit and service delivery, information
storage and retrieval, distributed processing, and government applications will need improved
methods for access control and data security. The information security can be easily achieved
by using Cryptography technique. DES is now considered to be insecure for some
applications like banking system. There are also some analytical results which demonstrate
theoretical weaknesses in the cipher. So it becomes very important to augment this algorithm
by adding new levels of security to make it applicable. By adding additional key, modified S-
Box design, modifies function implementation and replacing the old XOR by a new operation
as proposed by this thesis to give more robustness to DES algorithm and make it stronger
against any kind of intruding. DES Encryption with two keys instead of one key already will
increase the efficiency of cryptography.
DEPT OF CSE(GECR) 48