Final Doucmennt
Final Doucmennt
By
GEORGE BERNANDAS A
Register No. 921321622013
AUGUST 2023
BONAFIDE CERTIFICATE
Certified that this project report titled CIPHER AND DECIPHER USING
carried out the work under my supervision. Certified further that to the best of my
knowledge and belief, the work reported herein does not form part of any other project
COUNTERSIGNED
ii
ANNA UNIVERSITY - CHENNAI 600 025
iii
ABSTRACT
v
ACKNOWLEDGEMENT
Chairperson and Rtn. MPHF. R.S.K. RAGURAAM D.A.E., M. Com, Pro-Chairman for
his guidance and advice to shape myself for the future career.
Technology for his invaluable guidance, support and suggestions throughout the course of
Technology for her suggestions and constructive criticisms during the course of my
project.
TECHNOLOGIES, Chennai for his encouragement and more over for his timely
I am thankful to all teaching and non-teaching staff of this Department who helped
me in successfully completing my project work. Last but not the least, I am grateful to my
vi
TABLE OF CONTENTS
ABSTRACT v
ACKNOWLEDGEMENT vi
LIST OF TABLES ix
LIST OF FIGURES x
LIST OF ABBREVIATIONS ix
1 INTRODUCTION 1
1.1 PROBLEM STATEMENT 1
1.2 CHALLENGES 2
2 SYSTEM ANALYSIS 4
2.1 EXISTING STSTEM 4
3 SYSTEM DESIGN 8
3.1 UML DIAGRAM 8
3.2 MODULES 16
4 IMPLEMENTATION 22
4.1 BACKGROUND STUDY 22
4.2 IMPLEMENTATION 22
vii
5 SYSTEM TESTING 25
5.1 TESTING 25
5.2 TEST CASE 28
5.3 OUTCOME OF THE TEST 29
6 CONCLUDION 30
6.1 CONCLUSION 30
6.2 FUTURE ENHANCEMENT 30
viii
LIST OF TABLES
ix
LIST OF FIGURES
x
LIST OF ABBREVIATIONS
ACRONYM ABBREVIATIONS
HTML Hypertext Markup Language
HMAC Hash Based Message Authentication Code
SETL State Eligibly Test Language
ATM Automated Teller Machine
AES Advanced Encryption Standard
UML Unified Modeling Language
ABC American Broadcasting Company
MFA Master Of Fine Art
HSM Hardware Security Module
ERD Entity Relationship Diagram
WSGI Web Server Gateway Interface
BSD Berkeley Software Distribution
ISO International Organization for Standardization
CMS Content Management System
DSF Differential Scanning Fluorimetry
MVC Model View Controller
HMAC Hash based Message Authentication Code
CBC Complete Blood count
xi
CHAPTER 1
INTRODUCTION
Cryptography is the name of the field that studies information security. The word is a
translation of the hidden-meaning Greek word kryptos. The techniques employed in
cryptography include employing microdots, combining words and images, and other means of
disguising information while it is being stored or transported. Modern cryptography combines
elements of mathematics, computer science, and electrical engineering. Computer passwords,
ATM cards, and electronic commerce are a few applications for cryptography. There are efforts
for open source cryptography that offer security for many purposes. In our project, this suggest
using a cryptography technique that is employed for security purposes when the data is
received, the data is further encrypted, and the information is secured until the data is decoded
when the situation calls for it. In our project, this suggest putting a cryptography method into
practise to protect sensitive data within an enterprise. In this instance, this suggest using fernet
technology to implement a cryptography technique to secure the biofuel production process
that the client requested in order to prevent data breaches, as well as a classification algorithm
to lessen the workload of humans by giving the requested client a secret fuel type. The
cryptographic techniques and protocols used in these projects are intended to prevent
communicates Aons and data from being intercepted or altered. The fernet algorithm assures
that "when the decryption read without the key also support the implementation of key rotation
via multi fernet . The cryptographic techniques and protocols used in these projects are intended
to prevent communications and data from being intercepted or altered.
1
1.2 CHALLENGES
The aim of the project to implement encryption and decryption using the cryptography
library and Fernet application is to ensure secure communication and data protection. By using
encryption, sensitive information can be transformed into an unreadable format, making it
difficult for unauthorized individuals to access or understand the data. Decryption allows
authorized individuals to retrieve the original data from the encrypted format. The Fernet
application, which is part of the cryptography library, utilizes symmetric encryption, where the
same secret key is used for both encryption and decryption. This approach provides a simple
and efficient way to secure data.
Chapter Introduction deals with overview of the project which comprises of problem
statement, challenges faced in the project and aim of the project. Chapter 2, System analysis is
followed by chapter 1 which deals with requirement gathering, existing system of our project
and proposed system of our project. Chapter 3, System design is followed by chapter 2 which
depicts module description, database design and UML diagram. Next Chapter 4,
implementation depicts frontend, backend software and steps to install the proposed software.
Last Chapter, Chapter 5 – Testing deals with testing and future proposal of our project.
2
Here are the key steps involved in conducting a literature survey
Define the Research Question: Clearly define the scope and objectives of your literature
survey. Decide on the specific topic or research question you want to explore.
Search for Relevant Literature: Use academic databases, digital libraries, and search
engines to find peer-reviewed research papers, conference proceedings, books, and
other scholarly sources related to your topic.
Evaluate the Sources: Assess the quality and credibility of the sources you find. Focus
on reputable journals and publications from recognized researchers and institutions.
Read and Summarize: Read the selected literature thoroughly and take notes.
Summarize the main findings, methodologies used, and any relevant conclusions or
implications.
While literature surveys have numerous benefits, they also come with some drawbacks
and limitations.
Here are some of the drawbacks associated with conducting a literature survey
3
CHAPTER 2
SYSTEM ANALYSIS
System analysis is a critical process that involves studying, understanding, and defining
the requirements and components of a system to design an effective solution. In the context of
building a secure data application that uses cryptography-Fernet for ciphering and deciphering,
system analysis.
Any computer system that is connected to the internet is vulnerable to attacks from
hackers who might try to take control the system in order to steal information for illicit
purposes. In an effort to undermine a company's business activities, they can potentially try to
crash a system [7].
The existing system has several disadvantages that need to be addressed. These
drawbacks include
4
Requiring cooperation- Using encrypted files that are designed to be opened and
shared by two or more people can be disadvantageous when one or more participants
finds it a burden to use encryption.
Slow performances- each recipient receive the key through different channel.
Due to the recent increase in demand for digital signal transmission, the issue of
massive losses from unauthorized data access has emerged as a pressing concern. As a result,
data security has emerged as a crucial and pressing issue in applications for multimedia data
transfer. Various sorts of cryptographic systems are required to secure sensitive information
from unwelcome users or against unauthorized duplication and modification.
In our project this used the Cryptography method using the fernet Algorithm as to
prevent the massive losses data from unauthorized data access and transmitting a data in a
secure way using symmetric way, the symmetric cryptography is normally used to encrypt
private data for its high performance the use of single shared secret to share encrypt data
between parties comparatively symmetric Encryption is usually faster than asymmetric
Encryption because of the single key encryption and for to reduce the work load in an industry
we use an classification technique to predict and suggest fuel type by the details of the client
by using mentioned classification technique called gradient boosting algorithm. There have
been various data encryption techniques on multimedia data proposed [4].
Confidentiality - Confidentiality ensures that only the recipient can decrypt the
message and read its content.
Integrity- Integrity focuses on the ability to ensure the information contained in the
message cannot be modified
Authenticity - Authenticity ensures the sender and recipient can verify each other’s
identities and the destination of the message.
Simple- The provided result helps encryption and decryption easily.
5
2.3 REQUIREMENT GATHERING
IDE : PyCharm
Database : MySQL
Shiash Info Solutions is an IT services, Digital and Business solutions company based
in Chennai (India) providing Customized Software Development, Web Application
Development, Mobile Application Development and IT Consulting Services. We have earned
the pride of being one of the leading desktop & web based software solution provider in India,
we develop software solution that helps our customers to outperform the competition and stay
ahead in today’s competitive business environment. We firmly believe that business needs can
be only met when technology is in sync with business process. At Shiash Info Solution , we
provide multi- dimensional IT services that cater to high-end internet strategy, software
development and design solutions for corporate clients all across the globe.We have a wide and
varied range of products & services that can suit the divergent needs of our large client base.
We understand that for the success of any project Time, Quality and Support has to be top class,
for this our planning & quality control team make sure that your projects are very planned &
designed to be delivered on time & also the quality of the project is more than what you have
expected. We rapidly transform our self- motivated ideas and concepts into new products and
applications along with improving application performance, thus, reducing the complexities of
business operations and accelerating the business output or efficiency of our clients.
6
To provide the best in class, creative, unique Software Solutions that can solve all our
client’s business problems that they face on day-to-day bases. We provide software & solutions
for companies of all sizes and all industry sectors. We thrive in achieving excellence in
providing the best IT solutions to our clients so that they can meet their business needs in the
most effective and efficient way. At Shiash Info Solutions we focus on high quality & timely
delivery of our Services.
Our dedicated team provides you solutions that make achieving business objectives
easier and in a much efficient way. We provide the highest standard of products to our client
base belonging to all verticals. We outsource IT services to different industries across the globe
which includes Complex Software Solutions, web application & Other IT services. Our team
members are young and trained. We listen and provide services to our clients that are tailor
made for their business. We have sustainable base of clients who trust us for our quality service
in the field of Software & Web Application development.
The system analysis lays a solid foundation for building a secure data application that
utilizes cryptography-Fernet. Addressing security risks, implementing strong encryption
measures, and considering user experience, the application can provide a secure and user-
friendly environment for encrypting and decrypting sensitive data, meeting both functional and
security requirements. This introduction has been completed and system Design is be discussed
in the next chapter
7
CHAPTER 3
SYSTEM DESIGN
A UML diagram is a diagram based on the UML (Unified Modelling Language) with
the purpose of visually representing a system along with its main actors, roles, actions, artifacts
or classes, in order to better understand, alter, maintain, or document information about the
system [4].
8
USE CASE DIAGRAM
Figure 3.1 The Use Case Diagram Registration, Login, Client details, Fuel, Admin,
Approve client, Distributor, Process, Raw Materials, Payslip Logout. The Manger and
processing team, Distributor the above use case diagram.
9
SYSTEM ARCHITECTURE
Figure 3.2 System Architecture Diagram represents the entire database to store the
client, admin, management, process team, encrypt files.
10
ER DIAGRAMS
The relation upon the system is structured through a conceptual ER-Diagram, which
not only specifics the existing entities, but also the standard relations through which the system
exists and the cardinalities that are necessary for the system state to continue. The Entity
Relationship Diagram (ERD) depicts the relationship between the data objects [5]. The ERD is
the notation that is used to conduct, the date modelling activity the attributes of each data object
noted, is the ERD can be described resign a data object description.
The set of primary components that are identified by the ERD are,
Data object
Relationships
Attributes
Various types of indicators.
The primary purpose of the ERD is to represent data objects and their relationships.
11
DATA FLOW DIAGRAM
Figure 3.4 This Level is contain Client Login From With The Management Queries
Client Requirement Processing team, Distributor Response Database.
Figure 3.5 This Level Executes The process team to raw material ,Dropped material
process and All Process Complete to Client Request
12
Figure 3.6 Data Flow Diagram For Logout
Figure 3.6 This Level Executes The Management Client Requirement To Identify
Process Team Receive Fuel, Raw Material Distributor View Company Details All Process
Finally Log Out.
13
SEQUENCE DIAGRAM
Figure 3.7 Sequence Diagram Represents the upload data details to be dropped encrypt
data and decrypt data view result.
14
3.8 CLASS DIAGRAM
Figure 3.8 Class diagram represents the data process manager model and process model
send data in distributor.
15
3.2 MODULES
• Client
• Admin
• Management
• Process Team
• Distributor
3.2.1 Client
Clients are the more crucial one the business, firm or any organization which are the
revenue resources, Clients require projects for personal or corporate reasons and wish to
contact the company by registering their company details include their organization name,
contacts, address and city what type of company in the application Client initially uploading
their company details to the company waiting until to accept if the company rejects they send
mail along with the reason and query after the filling up with the query client upload their need
to the company , after the company process and they suggest the best fuel to the client according
to their request and requirement consist of the following what the company type, and their
purpose of fuel and the quantity according with this detail the company will find and suggest
the best fuel to the client after viewing the client , if client having any queries they intimate the
reason with the company after successfully selecting the fuel type next process is payment after
completing the payment process the fuel will deliver in the schedule time [1].
3.2.2 Admin
Initially admin logs into the application with the specified user name and password only
specified for admins and then views the client company if the client meet with the company
requirements the admin will accept the client company or else the client doesn’t suit with the
company policy the admin send mail along with mentioned reason to the client if the reason
was satisfies with the client the next process is fuel production for that the processing team will
buy the specific raw materials with the distributor for that the admin should will approve the
distributor company after inspecting distributor company, after the requirement is satisfied the
admin will receive the pay slip from the distributor after the successful payment with the
distributor the distributor company will drop the raw materials to business firm[1].
16
3.2.3 Manager
The role of manger in the company or organization in this company was after
completion of admin accepting the required client for the firm the manager should need to be
check the requirement of the client which was uploaded along with the client details with
include company type, and their purpose of fuel and the quantity With the received details from
the client the manager will helps the client by finding the right type fuel that should suitable
for the client requirements with the classifier algorithm after finding the fuel type with given
of requirement, then fuel type will be forwarded back to the specific client, after receiving the
fuel type the client share the if there any queries with the manager, after the solving the query
process with the client the manager will finalize the fuel type and the fuel type will be
forwarded to the processing team with the alteration that made by the client for the further
process [6].
3.2.4 Processing Team
The role of Processing team in this industry was to produce the right type of fuel with
client requirement forwarded by the manager in the industry initially process team will receive
fuel detail from the manager after the query acceptance with the client and to manufacture the
right type of fuel they should buy the needed raw materials from the vendor to manufacture the
mentioned fuel so the process team will put the request after selection of distributor company
by the admin the distributor will drop the materials after the payment process with the admin
the required raw materials that need to produce the fuel and the process team will start to
manufacture the fuel type with process like hydrolysis, fermentation and Distillation these
process method will vary from firm to firm so process team need to secure the data, to protect
the process they use the cryptography method was used to secure the data by generating using
the key for encrypting and decrypting the key for the encode process after the mentioned the
process is completed the fuel will be delivered to the client with the given schedule time [3].
3.2.5 Distributor
The role of distributor is to supply the demand or request from the process team in the
organization, hence there are various process team and requests, and hence the distributor must
satisfy all the demand request that was made by the process team and the raw materials that
include (Fruit Pits, cassava, and dungs) that vendor should verify and supply the demand
product where the raw material’s supplies to the process team required at first the vendor must
upload their company details that include (company email, address, company type, contact and
17
CIN number)to the organization for which the manager could accept distributor according to
their policy , when the company approves the distributor, then the further process will be
proceed and the distributor also share the pay slip with the manager after the payment process
the demand raw materials will be delivered to the process team with in the given time to the
manager [7].
Input Design
Designing the input process for a system that uses cryptography (Fernet) for secure data
encryption and decryption involves ensuring that sensitive data is handled securely throughout
the input phase. Here are some guidelines for designing the input process:
User Input Validation: Ensure that all user inputs are properly validated to prevent any
malicious data or unexpected inputs from causing issues in the encryption process.
Validate the data format, length, and content before proceeding with encryption or
decryption.
Secure Communication: If the data is being received over a network, use secure
communication protocols (such as SSL/TLS) to encrypt the data during transit. This
prevents eavesdropping and data interception during the input phase.
Authentication and Authorization: Implement proper authentication and authorization
mechanisms to ensure that only authorized users have access to sensitive data and the
encryption/decryption functionalities.
Logging and Auditing: Implement logging and auditing mechanisms to record all input
activities, including encryption and decryption operations. This provides an audit trail
for security analysis and potential incident investigation.
Input Sanitization: Sanitize all input data to remove any potential malicious code or
harmful characters. This is crucial for preventing injection attacks.
18
Table 3.1 Client Home
Table 3.1 This client home table describes the customer details to create the id ,user
name, email, phone number, password, gender.
Table 3.2 Admin Table Describes the to check the customer id then the fuel type item
and quantity check and distribute the customer.
Output Design
Designing the output process for a system that uses cryptography (Fernet) for secure
data encryption and decryption is equally important to ensure the confidentiality and integrity
of sensitive data. Here are some guidelines for designing the output process:
19
Data Integrity Verification: After decrypting the data using Fernet, perform data
integrity checks to ensure that the decrypted data has not been tampered with during
transit or storage. One common approach is to use message authentication codes
(MACs) to verify the data's integrity.
Secure Communication: If the decrypted data needs to be transmitted over a network,
use secure communication protocols (such as SSL/TLS) to encrypt the data during
transit to protect against eavesdropping and data interception.
Authentication and Authorization: Implement proper authentication and authorization
mechanisms for accessing and viewing decrypted data. Ensure that only authorized
users can access sensitive information.
Secure Key Management: Continuously protect and manage encryption keys
throughout the output process. Ensure that the decryption key (used in Fernet) is
securely stored and accessible only to authorized personnel.
Secure Storage: If the decrypted data needs to be stored, ensure it is stored in a secure
manner, using proper access controls and encryption at rest, to protect against
unauthorized access.
Secure Logging: If any sensitive data is logged or recorded, ensure that logs are
protected and access is restricted to authorized personnel only.
Table 3.3 Manager Table describes the company details like, vendor name, company
name, mail, country, address, contact and approve the id
20
Table 3.4 Processing Team
Table 3.4 Processing team provides the customer purpose, Quantity, Reason, changes,
new quantity, satisfied and Date
Table 3.5 The Distributor team describes the company details distributed to customer
like us company name, company type, purpose, fuel, and Boolean
The system design for the secure data application using cryptography-Fernet has been
well-planned and thought-out, taking into consideration the essential aspects of data security,
user experience, and system performance. This introduction has been completed and
implementation will be discussed in the next chapter.
21
CHAPTER 4
IMPLEMENTAION
The study delves into the inner workings of Fernet encryption, including the AES
encryption process, CBC mode, and the role of HMAC in ensuring message integrity.
Exploring key management practices is crucial, as the security of the encryption keys is
paramount to safeguarding sensitive data[4]. The study analyzes methods for key generation,
storage, and distribution. Assessing the security features and strengths of Fernet encryption is
essential to understand its suitability for secure data applications. The study examines potential
vulnerabilities and countermeasures. The study investigates how Fernet encryption can be
integrated into a secure data application effectively. It explores the design considerations, user
interface, and data flow to ensure seamless implementation. Evaluating the performance impact
of Fernet encryption and the overall usability of the secure data application is crucial for user
satisfaction and adoption [2].
4.2 IMPLEMENTATION
The implementation of Fernet encryption ensures that sensitive data remains secure
both during transmission and storage. The symmetric key approach guarantees that only
authorized parties possessing the secret key can decrypt the data, providing a robust layer of
protection against unauthorized access[5].
22
Django
Flask
Werkzeug
Werkzeug is a utility library for the Python programming language, in other words a
toolkit for Web Server Gateway Interface (WSGI) applications, and is licensed under a BSD
License. Werkzeug can realize software objects for request, response, and utility functions. It
can be used to build a custom software framework on top of it and supports Python 2.7 and 3.5
and later.
Jinja
Jinja, also by Ronacher, is a template engine for the Python programming language and
is licensed under a BSD License. Similar to the Django web framework, it handles templates
in a sandbox [12].
23
HTML, JAVASCRIPT
Hypertext Markup Language (HTML), the languages of the World Wide Web (WWW),
allows users to produce web pages that included text, graphics and pointer to other web pages
(Hyperlinks).
MYSQL
MySQL is popular among all databases, and is ranked as the 2nd most
popular database, only slightly trailing Oracle Database. Among open source databases,
MySQL is the most popular database in use today. MySQL uses standalone clients that allow
users to interact with MySQL, and also to use it with other programs for applications that need
relational database capabilities. MySQL's reputation for reliability has led to its inclusion in
the popular LAMP stack (Linux, Apache, MySQL, Python/Perl/PHP) and is also used as the
default DBMS in popular CMS options like Drupal, Joomla, phpBB, and WordPress.
24
CHAPTER 5
SYSTEM TESTING
Software testing is a critical element of software quality assurance and represents the
ultimate review of specification, design and coding. In fact, testing is the one step in the
software engineering process that could be viewed as destructive rather than constructive.
5.1 TESTING
The software engineering process can be viewed as a spiral. Initially system engineering
defines the role of software and leads to software requirement analysis where the information
domain, functions, behavior, performance, constraints and validation criteria for software are
established. Moving inward along the spiral, we come to design and finally to coding. To
develop computer software we spiral in along streamlines that decrease the level of abstraction
on each turn [8].
A strategy for software testing may also be viewed in the context of the spiral. Unit
testing begins at the vertex of the spiral and concentrates on each unit of the software as
implemented in source code. Testing progress is done by moving outward along the spiral to
integration testing, where the focus is on the design and the construction of the software
architecture [7]. Talking another turn on outward on the spiral we encounter validation testing
where requirements established as part of software requirements analysis are validated against
the software that has been constructed. Finally, we arrive at system testing, where the software
and other system elements are tested as a whole.
UNIT TESTING
MODULE TESTING
SUB-SYSTEM TESING
SYSTEM TESTING
ACCEPTANCE TESTING
25
Figure 5.1 Testing Users
Figure 5.1 the user can request on the process to integration the manager approve and
client request to component testing to user will be approve test.
Unit testing focuses verification effort on the smallest unit of software design, the
module. The unit testing we have is white box oriented and some modules the steps are
conducted in parallel.
• All logical decisions have been exercised on their true and false sides
• All loops are executed at their boundaries and within their operational bounds.
• All internal data structures have been exercised to assure their validity.
To follow the concept of white box testing we have tested each form. We have created
independently to verify that Data flow is correct, All conditions are exercised to check their
validity, All loops are executed on their boundaries.
26
5.1.3 Base Path Testing
The established technique of flow graph with Cyclamate complexity was used to derive
test cases for all the functions. The main steps in deriving test cases were:
Use the design of the code and draw correspondent flow graphs.
Determine the Cyclamate complexity of the resultant flow graph, using formula: V(G) =E-N+2
or
V(G) =P+1 or
In this part of the testing each of the conditions were tested to both true and false
aspects. And all the resulting paths were tested. So that each path that may be generated on
particular condition is traced to uncover any possible errors.
This type of testing selects the path of the program, according to the location of the
definition and use of variables. This kind of testing was used only when some local variables
were declared. The definition-use chain method was used in this type of testing. These were
particularly useful in nested statements.
In this type of testing all the loops are tested to all the limits possible. The following
exercise was adopted for all loops:
• All the loops were tested at their limits, just above them and just below them.
• For nested loop test the innermost loop first and then work outwards.
27
5.2 TEST CASE
The test environment is collection of hardware and software, which helps us to execute
the test case. Once we get the client request, the login user id &password. The developer starts
developing the code. The following test client requirement to request used to test the secure
data system.
Test
Case Test Case Test Case Description Expected Output Actual
ID Result
The client to create a Predicted login page
1 Client Testing registration and and requirement details As Expect
Requirement details created or not
To Approve client Predicted payment
2 Admin Testing details and make details created or not As Expect
payment
To approve client Predicted receive fuel
3 Manager Testing details and accept fuel details created or not As Expect
details
4 Processing To request raw Predicted raw materials
Testing materials process created or not As Expect
To view raw materials Predicted company
5 Distributor and company details details and payslip As Expect
Testing then to proceed the details are created or not
payslip details
Table 5.1 The Test case table describes the testing are client testing, admin testing,
manager testing, processing testing, distributor testing.
28
5.3 OUTCOME OF THE TEST
__
The system testing phase for the secure data application using cryptography-Fernet has
been successfully completed, validating the functionality, security, and performance of the
application. This system testing has been completed and conclusion& future enhancement is
be discussed in the next chapter.
29
CHAPTER 6
CONCLUSION
6.1 CONCLUSION
30
APPENDIX A: Output Screen
31
A3: Requirement Client
32
A5: Classy Register From
33
APPENDIX B: Sample Coding
<!DOCTYPE html>
<html lang="en">
{% extends 'client/client_home.html' %}
{% load static %}
{% block content %}
<head>
<script>
{% endfor %}
</script>
form widgets, Sign up Web forms , Login signup Responsive web form,Flat Pricing table,Flat
34
function hideURLbar(){ window.scrollTo(0,1); } </script>
href="//fonts.googleapis.com/css?family=GFS+Neohellenic:400,400i,700,700i&subset
=greek" rel="stylesheet">
<style>
<div class="center-container">
<!--header-->
<div class="header-w3l">
<h1>REQUIREMENT</h1>
</div>
<!--//header-->
<!--main-->
35
<div class="agileits-register">
<option value="null">Select</option>
<option value="suzuki">suzuki</option>
<option value="tata">tata</option>
<option value="bmw">bmw</option>
<option value="honda">honda</option>
<option value="boeing">boeing</option>
</div>
class="clear"> </div>
</div>
</div>
36
<div class="w3_modal_body_grid w3_modal_body_grid1">
class="clear"> </div>
</div>
</div>
name="reason"> value="RAILWAY">RAILWAY</option>
</select>
</div>
<div class="w3_modal_body_grid">
<span>Purposes :</span>
<option value="null">Select</option>
<option value="best organic and high efficiency and low pollution">best organic and high
37
<option value="AIRCRAFT,reduce green house and efficiency and low
</div>
class="clear">
</div>
</div>
:</span>-->
</div>
</div>
<div class="w3_modal_body_grid">
38
<input type="text" name="customer" placeholder="purpose" required=""/> <div
class="clear"> </div>
</div>
<div class="w3_modal_body_grid">
<div class="clear"></div>
</form/>
Backend Code:
.models import * from django.http import HttpResponse from django.contrib import messages
import string
class Encryptor():
def key_create(self):
39
key = Fernet.generate_key() return key
original = file.read()
encrypted = f.encrypt(original)
file.write(encrypted)
f = Fernet(key)
encrypted = file.read()
decrypted = f.decrypt(encrypted)
file.write(decrypted)
40
def process_index(request):
if request.method == 'POST':
request.POST['password']
address = request.POST['address']
phonenumber=phonenumber, gender=gender,
address=address).save()
except:
datas = send_procees.objects.all()
41
return render(request, 'process_team/view_fuel.html', {'datas': datas}) def
request_raw_materials(request):
if request.method == 'POST':
request.POST['quantaity3']
if request.method == 'POST':
request.POST['quantaity']
time_duration = request.POST['time_duration']
original = file.read()
encrypted = f.encrypt(original)
42
with open(encrypted_file, 'wb') as file: file.write(encrypted)
decrypted = f.decrypt(encrypted)
def encryption(request,id):
location = f'{settings.MEDIA_ROOT}/{file}'
encryptor = Encryptor()
encryptor.key_load('mykey.key')
decirption(request,id):
def process_logout(request):
if 'process' in request.session:
43
successfully') return redirect('/')
else:
def enc1(request,id):
sa=send_process.objects.filter(id=r).update(key=key) f = Fernet(key)
for i in alpha:
encrypted_data = f.encrypt(i.encode())
enc.append(encrypted_data) print(enc)
x1=enc[0]
x2=enc[1] x4=enc[3]
ss=send_process.objects.filter(id=r).update(process1=x1,process2=x2,process3=x3,qu antaity
=x4)
datas = send_process.objects.all()
view_dropped(request):
datas=send_payslip.objects.all()
44
return render(request, 'process_team/dropped.html', {'datas': datas}) from django.shortcuts
import render,redirect
from django.http import HttpResponse from django.contrib import messages import numpy as
np
warnings.filterwarnings('ignore')
address = request.POST['address']
phonenumber=phonenumber, gender=gender,
redirect('/login/')
if request.method == 'POST':
45
email = request.POST['email'] password = request.POST['password'] try:
redirect('/manager_index/')
except:
datas=requirements.objects.all()
request.POST['gender']
address = request.POST['address']
phonenumber=phonenumber, gender=gender,address=address).save()
if request.method == 'POST':
request.session['manager'] = emp.email
except:
46
return render(request, 'manager/manager_login_register.html') def requirement_view(request):
datas=requirements.objects.all()
request.POST['gender']
address = request.POST['address']
phonenumber=phonenumber, gender=gender,
address=address).save()
if request.method == 'POST':
redirect('/manager_index/')
except:
for i in string_datas:
47
z = LabelEncoders[l] value[i] = z.transform([value[i]])[0] l += 1
print(12334455) if ylabel_encoder:
# if 'user' in request.session:
inputvar = []
get.save();
ka = algo(inputvar,r) print('OUTPUT:',ka)
def send_p(request):
if request.method == 'POST':
send_procees(company_name=company_name,
company_type=company_type, purpose=purpose,fuel=fuel,
48
).save()messages.info(request, "successfully Send To admin")
# data = requirements.objects.get(id=id)
def manager_logout(request):
if'manager'in equest.session:
request.session.pop('manager',None)
else:
49
REFERENCES
[1] Boyen X, Reusable cryptographic fuzzy extractors, in Proceedings of the 11th ACM
conference on Computer and communications security. ACM,2004.
[2] Gao C.-Z., Cheng Q, Li X, and S.-b. Xia, “Cloud-assisted privacy preserving profile-
matching scheme under multiple keys in mobile social network,” Cluster Computing,
vol. 22, no. 1, pp. 1655– 1663, 2019.
[4] Lindell Y, How to simulate it–a tutorial on the simulation proof technique, in Tutorials
on the Foundations of Cryptography. Springer, 2017.
[6] Uludag U, Pankanti S, Prabhakar S, and Jain A.k, Biometric cryptosystems: issues and
challenges, Proceedings of the IEEE, vol. 92, no. 6, pp. 948–960, 2004.
[7] Zhang J, Wang X, Yiu S.-M, Jiang Z.L, and Li J, Secure dot product of outsourced
encrypted vectors and its application to svm, in Proceedings of the Fifth ACM
International Workshop on Security in Cloud Computing, pp.75–82,2017.
[8] Zhuang D, Wang S, and Chang J.M, “Fripal: Face recognition in privacy abstraction
layer,”in Dependable and Secure Computing, 2017 IEEE Conference on. IEEE, 2017.
[11] http://vip.ifaa.org.cn/en/specifications.html.com
50