Professional Documents
Culture Documents
Micro Project: Department of Computer Engineering
Micro Project: Department of Computer Engineering
Micro project
Department of Computer Engineering
Maharashtra State
Board of Technical Education, Mumbai
(Autonomous)(Iso-9001-2008)(ISO/IEC270012013)
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
VIDYA PRATISHTHAN’S POLYTECHNIC COLLEGE, INDAPUR
A
PROJECT REPORT
ON
" APPLY CRPPTOGRAPHIC ALGORITHM TO MAINTAIN
COMPUTER SECURITY "
Academic year: 2019-20
First and foremost we would like to thanks our H.O.D. prof. Bhuse S.H and our
project guide MR Deokate .S.T for their valuable guidance which provided us a
perfect path on which we were able to successful implement our ideas.
We heartily like our principal Prof. Veer sir for their valuable support. Last but
not least we would like to thank all our classmates and other staff’s for their
enthusiasm and great ideas.
Annexure IA
Part A
Micro-Project Proposal
APPLY CRPPTOGRAPHIC ALGORITHM
TO MAINTAIN COMPUTER SECURITY
1.0 Brief Introduction:
Data security is a major issue which we are facing today in this digital world of
communication. As we know that today hackers are almost at every corner in search of our
useful data which can be hacked by them for their different purposes. Even the risk gets
doubled when come to the data of any country’s government. So, a system or terminology is
must required to make that data safe forever by any means during communication.
Data protection can be accomplished by changing the original data by any means to some
other un useful data so that if someone gets that data by means of hacking then also it must
remain in un useful bits of data for that person. This process can be achieved by Encrypting
that data by some means of algorithms which are known to the sender and on the other side
the similar Decryption algorithms must be known to only the desired receiver so that it can
convert that encrypted data back to the user understandable form.
The goal of this project is to encrypt passwords using DES before it can be stored in the
database or file. Most of the web sites require users to register before they could use the website. As
a result, most websites store user’s password as plain text in the database or any file. Anyone with
some efforts can get to the password. This project will use file to store username and encrypted
passwords. This simple application will allow users to register with username and password. This
is used for the encryption and decription of the passeord or for the security purpose
4.0Modules:
Main screen consists of two.
Choosing option 1 will led to encryption and option 2 will led to decryption.
Code snippet is provided below so that one can easily understand how to design
Main screen. The feel of main menu is kept so simpler
so that if anyone who doesn't have prior knowledge about the concept of encryption
and decryption can also be able to use this application easily.
Encrypt Text: Encryption is a used to encodes a message or file so that it can be
only be read by certain people. Encryption uses an algorithm to scramble,
or encrypt, data and then uses a key for the receiving party to unscramble, or
decrypt, the information.
Decript Text : Decryption is the used for taking encoded or encrypted text or
other data and converting it back into text that you or the computer can read and
understand. This term could be used to describe a method of unencrypting the data
manually or unencrypting the data using the proper codes or keys
6.0 Advantages:
Security of data.
It Helps You Stay Safer When Working Remotely
It Supports Data Integrity.
Data Encryption Is a Privacy Safeguard
Data Encryption Could Provide a Competitive Advantage.
Greater efficiency.
Better security.
User friendliness and interactive.
Using Encryption Technology for Data Protection Could Increase Trust.
7.0 Limitations:
Forgetting Passwords. Encryption requires a password to encrypt and decrypt the
file.
Developing a False Sense of Security.
Raising Suspicions. If you use encryption to protect your information on your
computer at work or at home, it could raise suspicions
A strongly encrypted, authentic, and digitally signed information can be difficult
to access even for a legitimate user at a crucial time of decision-making.
8.0 Action Plan:
Planned Planned
Sr. Name of Responsible
Details of activity Start Finish
No. Team Members
date date
Collect data first we can
1. Girme Pruthviraj Hemant
1 search information about 2. Gore Shubham Anna
3.Hanjagikar Pratik Sanjay
the topic.
3.0 Introduction:
Data security is a major issue which we are facing today in this digital world of
communication. As we know that today hackers are almost at every corner in search of our
useful data which can be hacked by them for their different purposes. Even the risk gets doubled
when come to the data of any country’s government. The data is incrypted and decrypted in DES
algorithm
Data encryption standard (DES) has been found vulnerable against very powerful attacks and
therefore, the popularity of DES has been found slightly on decline.
DES is a block cipher, and encrypts data in blocks of size of 64 bit each, means 64 bits of plain
text goes as the input to DES, which produces 64 bits of cipher text. The same algorithm and key
are used for encryption and decryption, with minor differences. The key length is 56 bits.
This process can be achieved by Encrypting that data by some means of algorithms which are
known to the sender and on the other side the similar Decryption algorithms must be known to
only the desired receiver so that it can convert that encrypted data back to the user
understandable form. The goal of this project is to encrypt passwords using DES before it can
be stored in the database or fileAs a result, most websites store user’s password as plain text in
the database or any file. Anyone with some efforts can get to the password. This project will
use file to store username and encrypted passwords. This simple application will allow users to
register with username and password. This is used for the encryption and decription of the
passeord or for the security purpose
4.0 Purpose:
The aim of proposed system is to develop a system of improved facilities. The
system is ease to use .The proposed system can overcome all the limitations of the
existing system. The system provides proper encryption and decryption
5.0 Scope:
However, the central system functionalities of the restaurant management system
comprise generating reports, inventories, employee records, and managing orders.
The order management involves the creation and deleting of orders, removing and adding
food staff from a request, and closing the orders.
The primary scope of the Dairy management system project is well depicted on the user
case diagrams that are well showcased in this report.
All the orders made should be stored in the system's database and connected to the
significant project tasks, with testing and implementation that consume marginally more
time than design.
Security of data.
It Helps You Stay Safer When Working Remotely
It Supports Data Integrity.
Data Encryption Is a Privacy Safeguard
Data Encryption Could Provide a Competitive Advantage.
Greater efficiency.
Better security.
User friendliness and interactive.
Using Encryption Technology for Data Protection Could Increase Trust.
8.0 Proposed System
Hides the message and the your privacy is safe.
You can write whatever you want and however you want any theme any symbol for the
code to keep your code a secret by using encryption.
The proposed system can overcome all the limitations of the existing system.
The system is ease to use .. The system provides proper encryption and decryption.
11.0 Coding:
# import tkinter module
from tkinter import *
import random
import time
import datetime
# ==============================================
# TIME
# ==============================================
localtime = time.asctime(time.localtime(time.time()))
lblInfo.grid(row=0, column=0)
lblInfo.grid(row=1, column=0)
rand = StringVar()
Msg = StringVar()
key = StringVar()
mode = StringVar()
Result = StringVar()
def qExit():
root.destroy()
def Reset():
rand.set("")
Msg.set("")
key.set("")
mode.set("")
Result.set("")
#
lblReference = Label(f1, font=('arial', 16, 'bold'),
text="Name:", bd=16, anchor="w")
lblReference.grid(row=0, column=0)
txtReference.grid(row=0, column=1)
#
lblMsg = Label(f1, font=('arial', 16, 'bold'),
text="MESSAGE", bd=16, anchor="w")
lblMsg.grid(row=1, column=0)
txtMsg.grid(row=1, column=1)
lblkey.grid(row=2, column=0)
txtkey.grid(row=2, column=1)
lblmode.grid(row=3, column=0)
txtmode.grid(row=3, column=1)
lblService.grid(row=2, column=2)
txtService.grid(row=2, column=3)
import base64
for i in range(len(clear)):
key_c = key[i % len(key)]
enc_c = chr((ord(clear[i]) +
ord(key_c)) % 256)
enc.append(enc_c)
return base64.urlsafe_b64encode("".join(enc).encode()).decode()
enc = base64.urlsafe_b64decode(enc).decode()
for i in range(len(enc)):
key_c = key[i % len(key)]
dec_c = chr((256 + ord(enc[i]) -
ord(key_c)) % 256)
dec.append(dec_c)
return "".join(dec)
def Ref():
print("Message= ", (Msg.get()))
clear = Msg.get()
k = key.get()
m = mode.get()
if (m == 'e'):
Result.set(encode(k, clear))
else:
Result.set(decode(k, clear))
#
btnReset = Button(f1, padx=16, pady=8, bd=16,
fg="black", font=('arial', 16, 'bold'),
width=10, text="Reset", bg="green",
command=Reset).grid(row=7, column=2)
root.mainloop()
__________________________________________________________________
return hex
exp_d = [32, 1, 2, 3, 4, 5, 4, 5,
6, 7, 8, 9, 8, 9, 10, 11,
12, 13, 12, 13, 14, 15, 16, 17,
16, 17, 18, 19, 20, 21, 20, 21,
22, 23, 24, 25, 24, 25, 26, 27,
28, 29, 28, 29, 30, 31, 32, 1]
# Splitting
left = pt[0:32]
right = pt[32:64]
for i in range(0, 16):
right_expanded = permute(right, exp_d, 48)
sbox_str = ""
for j in range(0, 8):
row = bin2dec(int(xor_x[j * 6] + xor_x[j * 6 + 5]))
col = bin2dec(int(xor_x[j * 6 + 1] + xor_x[j * 6 + 2] + xor_x[j * 6 + 3]
+ xor_x[j * 6 + 4]))
val = sbox[j][row][col]
sbox_str = sbox_str + dec2bin(val)
#
if (i != 15):
left, right = right, left
print("Round ", i + 1, " ", bin2hex(left), " ", bin2hex(right), " ", rk[i])
pt = "123456ABCD132536"
key = "AABB09182736CCDD"
key = hex2bin(key)
#
left = key[0:28] # rkb for RoundKeys in binary
right = key[28:56] # rk for RoundKeys in hexadecimal
rkb = []
rk = []
for i in range(0, 16):
left = shift_left(left, shift_table[i])
right = shift_left(right, shift_table[i])
rkb.append(round_key)
rk.append(bin2hex(round_key))
print("Encryption")
cipher_text = bin2hex(encrypt(pt, rkb, rk))
print("Cipher Text : ", cipher_text)
print("Decryption")
rkb_rev = rkb[::-1]
rk_rev = rk[::-1]
text = bin2hex(encrypt(cipher_text, rkb_rev, rk_rev))
print("Plain Text : ", text)
12.0 Outputs:
1:
2:
D:\PROJECTS\CRYPTOGRAPHY\venv\Scripts\python.exe
D:/PROJECTS/CRYPTOGRAPHY/cryp.py
Encryption
Decryption
13.0 References:
13.1 Books:
1. http://www.iusmentis.com/technology/encryption/des/
2. http://www.thenextwave.com/page19.html
3. References from www.whatis.com
4. www.cisco.com
5. http://security.tao.ca/crypt.shtml
6. http://www.aci.net/kalliste/des.htm
7. http://www.counterpane.com/aes-comparison.html
8. https://www.tutorialspoint.com
9. https://www.w3schools.com
10. . https://www.w3schools.com/python/default.asp
11. https://www.programiz.com/python-programming
12. http://spoken-tutorial.org/