Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Rajarshi Janak University

Project Proposal
On

Karma Encryption
Supervisor

Pappu Kumar Sah


Submitted by
Arnav Karn
Bikash Yadav
Raju Kumar Sah
Hemant Jha

Submitted to
Department of Computer Science and Technology
Rajarshi Janak University
Janakpurdham, Dhanusha, Nepal
1. Introduction
Digital communication witnesses a noticeable and continuous development in many
applications in the Internet. Hence, secure communication sessions must be provided.
The security of data transmitted across a global network has turned into a key factor
on the network performance measures. So, the confidentiality and the integrity of data
are needed to prevent eavesdroppers from accessing and using transmitted data.
Cryptography is the important techniques that are used to provide network security.
The aim of this project is to encrypt the text, image, audio and video file by taking
advantage of benefits of combining cryptography and Blowfish encryption algorithm.

2. Objective
The objective of this project is to design and implement a secure encryption
system that is capable of encrypting and decrypting data using a secure
encryption algorithm and providing users with the ability to store and manage
their encrypted data securely. The system will also provide user with the
ability to access and decrypt the encrypted data.

3. Problem Description

The purpose of this project is to provide the correct data with security to the users.
For some of the users the data might be lost during the transmission process in the
network and for some, the data might be changed by the unauthorized person in
the network and there are some other security problems in the network. Our
application will give you more Security to the data present in the network and
there will be able to reduce the loss of data in the network which will be
transmitted from the sender to the receiver using the latest technologies. Only the
Authorized persons i.e., who are using our application will be there in the
Network. The proposed algorithm is to encrypt the text, image, audio and video
file data effectively without any suspicion of the data being stolen. It is to work
against the attacks by using a distinct encryption and decryption algorithm. The
aim of the project is to encrypt the data using Blowfish and other Encryption
algorithm to ensure that the quality of concealing data must not be lost. We used a
method for encrypting the data in order to securely send over the network without
any suspicion the data being leaked. This algorithm, though requires a input such
as image, audio, video and text files which we can encrypt the data using keys and
sends it to authorized user.
4. Methodology

System Architecture

Input

Text files Image


Audio
Video

Blowfish
Algorithm

int key = 8
int byte value = 5

Key ∧ byte_val

Output of XOR Operation


13

Performing XOR operation


between output and key
13 ∧ key

byte_val
5
Proposed System: - In this section, we will discuss proposed method which
combines two different hiding techniques, which are Cryptography and Blowfish
Algorithm. In this proposed method, the message is encrypted by use Blowfish
algorithm. So, this technique combines the features of both cryptography and
Blowfish algorithm and provides a high level of security. It is better than either of the
technique used separately. There will be an agreement between the sender and the
receiver about the key for the concealment algorithm as well as the key for the
encryption algorithm or these keys may be exchanged by a secure communication
method.

Start Application

Encryption Decryption

Enter a key
Enter a key

Text + Image
Audio
Video Original Data

Encrypted Data

Encryption is the process of converting information or data into a secret code,


especially to prevent unauthorized access. In these cases also we will do the same, For
encryption, we will convert the data file into a byte array and after converting it we
will apply XOR operation on each value of the byte array and after performing XOR
operation on each and every value of byte array will be changed. After performing the
operation now we will write new data in Image due to which we are unable to open
the Encrypted Image. Here are key will act as a password to Encrypt and Decrypt the
Image.

XOR Operation
As we know that how to perform XOR operations now we will see how XOR
operation will work here. Let’s consider an example of sample input and output.
Input:
int key = 8
int byte_val = 5
Operation:

Performing XOR operation between key and byte_val

key ^ byte_val

Output:
Output of XOR operation
13
Operation:

Performing XOR operation between output and key

13 ^ key

Output:

byte_val
5
Example
Here, is the screenshot of the above example. Let’s have a look.

In the above example, we have clearly observed that our key = 8 and byte_val = 5,
and When we perform XOR operation on key and byte_val it gives the output as 13,
now if we again perform XOR operation on our output “13” and key, we get our
byte_val again. The same operation performed in the case of Encryption and
Decryption as well.
XOR operation performed between each and every value of byte array and key due to
which all data of file get change and due to which we are unable to open our Image.
Now, whenever we apply a Decryption operation with the same key-value byte array
value get the change to its original value and able to see our original file.

Blowfish is an encryption technique designed by Bruce Schneier in 1993 as an


alternative to DES Encryption Technique. It is significantly faster than DES and
provides a good encryption rate with no effective cryptanalysis technique found to
date. It is one of the first, secure block ciphers not subject to any patents and hence
freely available for anyone to use.
blockSize: 64-bits
key Size: 32-bits to 448-bits variable size
number of sub keys: 18 [P-array]
number of rounds: 16
number of substitution boxes: 4 [each having 512 entries of 32-bits each]
Blowfish Encryption Algorithm
The entire encryption process can be elaborated as:

Let’s see each step one by one:

Step 1: Generation of sub keys:

18 sub keys {P[0]…P[17]} are needed in both encryption as well as decryption


process and the same sub keys are used for both the processes.
These 18 sub keys are stored in a P-array with each array element being a 32-bit
entry.
It is initialized with the digits of pi(?).
The hexadecimal representation of each of the sub keys is given by:
P[0] = "243f6a88"
P[1] = "85a308d3"
.
.
.
P[17] = "8979fb1b"

Now each of the sub key is changed with respect to the input key as:
P[0] = P[0] xor 1st 32-bits of input key
P[1] = P[1] xor 2nd 32-bits of input key
.
.
.
P[i] = P[i] xor (i+1)th 32-bits of input key
(roll over to 1st 32-bits depending on the key length)
.
.
.
P[17] = P[17] xor 18th 32-bits of input key
(roll over to 1st 32-bits depending on key length)
The resultant P-array holds 18 sub keys that is used during the entire encryption
process

Step 2: Initialize Substitution Boxes:

4 Substitution boxes(S-boxes) are needed{S[0]…S[4]} in both encryption as well as


decryption process with each S-box having 256 entries{S[i][0]…S[i][255],
0&lei&le4} where each entry is 32-bit.
It is initialized with the digits of pi(?) after initializing the P-array.

Step 3: Encryption:

The encryption function consists of two parts:


a. Rounds: The encryption consists of 16 rounds with each round(Ri) taking inputs the
plaintext(P.T.) from previous round and corresponding sub key(Pi). The description
of each round is as follows:

The description of the function ” F ” is as follows:


Here the function “add” is addition modulo 2^32.

b. Post-processing: The output after the 16 rounds is processed as follows:

Decryption
The decryption process is similar to that of encryption and the sub keys are used in
reverse{P[17] – P[0]}. The entire decryption process can be elaborated as:
Let’s see each step one by one:

Step1: Generation of sub keys:


18 sub keys{P[0]…P[17]} are needed in decryption process.
These 18 sub keys are stored in a P-array with each array element being a 32-bit
entry.
It is initialized with the digits of pi(?).
The hexadecimal representation of each of the sub keys is given by:
P[0] = "243f6a88"
P[1] = "85a308d3"
.
.
.
P[17] = "8979fb1b"
Note: See encryption for the initial values of P-array.
Now each of the sub keys is changed with respect to the input key as:
P[0] = P[0] xor 1st 32-bits of input key
P[1] = P[1] xor 2nd 32-bits of input key
.
.
.
P[i] = P[i] xor (i+1)th 32-bits of input key
(roll over to 1st 32-bits depending on the key length)
.
.
.
P[17] = P[17] xor 18th 32-bits of input key
(roll over to 1st 32-bits depending on key length)
The resultant P-array holds 18 sub keys that is used during the entire encryption
process

Step 2: Initialize Substitution Boxes


4 Substitution boxes(S-boxes) are needed{S[0]…S[4]} in both encryption as well as
decryption process with each S-box having 256 entries{S[i][0]…S[i][255],
0&lei&le4} where each entry is 32-bit.
It is Initialized with the digits of pi(?) after initializing the P-array.

Step3: Decryption:

The Decryption function also consists of two parts:


Rounds: The decryption also consists of 16 rounds with each round(Ri) (as explained
above) taking inputs the cipher Text(C.T.) from previous round and corresponding
sub key(P[17-i]) (i.e. for decryption the sub keys are used in reverse).
Post-processing: The output after the 16 rounds is processed as follows:
5. Project Scope

In this project, we deal with the concepts of security of digital data communication
across the network. This project is designed for combining the Cryptography and
Blowfish encryption algorithm features for better performance. We performed a new
encryption and decryption technique by Cryptography method and combined it with
Blowfish algorithm. The data is encrypted so there will be no chances for the attacker
to know that data. We performed our method on image, audio, video and text files by
implementing a program written in Java language. The method proposed has proved
successful in encrypting various types of text, images, and audio and videos files. This
work presents a scheme that can transmit large quantities of secret information and
provides secure communication between two private parties. Any kind of text data
can be employed as secret msg. The secret message employing the concept of
Cryptography is sent over the network. In addition, the proposed procedure is simple
and easy to implement. The Encryption of data is done on Audio, Video, Image and
Text files which can prevent the chance for the attacker to decrypt the data. Results
achieved indicate that our proposed method is encouraging in terms of security, and
robustness.

6. Feasibility Study
Risks Involved: Apart from certain parts of the follow-up phase, we have, through
the trial, instantiated the entire approach. Application of the approach on a case with
limited empirical evidence has clear limitations in terms of representativeness of the
target of the analysis. Still, the results of the trial indicate feasibility of applying the
approach. The fact that new knowledge was gained about the target of analysis
and its security risks, suggests usefulness of the approach. Correctness and relevance
of the results are partially evaluated through the close interaction with the industry
pilot, and through the future scenarios. A retrospective evaluation would have been
appropriate, but the industry pilot has not been running for long enough in order to
have sufficient retrospective picture of security risks. Instead, we have relied on the
analysis group as well as the industry partner, together representing relevant and
broad domain knowledge. There is a need for a baseline for comparing this
approach with the alternative risk identification methods, in order to assess
characteristics such as usability, scalability, usefulness and cost-effectiveness of our
approach compared to the alternative ones. Further empirical evaluation in other
realistic settings is, however, still needed due to threats to validity and reliability.
Overall, we have drawn important findings and Learned lessons from developing this
smart-grid-customized approach to cyber security risk Identification, and from trying
it out in the industrial case. Although the mentioned threats to validity and reliability
are present in the study, we argue that the results indicate feasibility and usefulness of
the approach. Important findings are also obtained on strengths and weaknesses of the
approach, and they will guide the directions for our future work

7. Literature Review

As we said the significance of network security is increased day by day as the size of
data being transferred across the Internet. This issue pushes the researchers to do
many studies to increase the ability to solve security issues. A solution for this issue is
using the advantage of cryptography and Blowfish combined in one system. This
Project has been implemented on the basis of the requirements of security i.e.
authentication, confidentiality, and robustness.

There has been a continuous rise in the number of data security threats in the recent
past and it has become a matter of concern for the security experts. Cryptography and
algorithm like Blowfish are the best techniques to nullify this threat. The researchers
today are proposing a blended approach of both techniques because a higher level of
security is achieved when both techniques are used together.

It uses Symmetric key method where both sender and receiver share the Secret key for
encryption and decryption. We present a method based on combining both the strong
encrypting algorithm and Cryptographic technique to make the communication of
confidential information safe, secure and extremely hard to decode. An encryption
technique is employed for encrypting a secret message into a Cipher text using the
symmetry key.

8. Expected Outcome
The proposed model introduced above is a combination of cryptography and Blowfish
algorithm. The goal of the technique is to put the unauthorized person in a difficult
position to determine the presence of information. The dual security makes the
information more secure. With this model any one can easily send multiple
information to the receiver using public network. This model is very useful for
defense, corporate, banking, communication and different government portals where
information exchange is more crucial. The data hiding capacity in audio and video is
more than image, so in future using audio or video Blowfish and Cryptography
Technology.
9. HW/SW tools/technologies required for the project

Hardware Requirements:  Processor: Pentium IV


 Hard Disk: at least 40GB
 RAM: at least 4 GB or more

Software Requirements:  Operating System: Window 7/10


Front End: Java Swing
 Back end: java, Java Swing

10. Project Schedule:


Estimated time to be spent in the development of this system is around 3 months and
scheduled as:

Weeks 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th 11th 12th
Planning
Requirement
Analysis
System Design
Implementation
Testing
Documentation

11. References

[1] https://www.geeksforgeeks.org/encrypt-and-
decrypt-image-using-java/

[2] https://www.knowledgefactory.net/2019/10/java-blowfish-encryption-and-
decryption-with-
example.html#:~:text=Blowfish%20is%20a%20symmetric%2Dkey,has%20been%20f
ound%20to%20date

You might also like