0% found this document useful (0 votes)
5 views

Mini-project_Report

The document is a mini project report for the 'Food Ingredient Reviewer' web application developed by students at Mangalore Institute of Technology & Engineering, aimed at providing users with detailed information about food ingredients using OCR technology. The project addresses the growing demand for dietary transparency and aims to help users make informed choices regarding their health. The report includes acknowledgments, an abstract, and outlines the project's objectives, system requirements, and proposed enhancements for future development.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Mini-project_Report

The document is a mini project report for the 'Food Ingredient Reviewer' web application developed by students at Mangalore Institute of Technology & Engineering, aimed at providing users with detailed information about food ingredients using OCR technology. The project addresses the growing demand for dietary transparency and aims to help users make informed choices regarding their health. The report includes acknowledgments, an abstract, and outlines the project's objectives, system requirements, and proposed enhancements for future development.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belagavi– 590018

Mini Project Report


On

“FOOD INGREDIENT REVIWER”


Submitted in partial fulfillment of the requirement for the award of the degree of

BACHELOR OF ENGINEERING
In
INFORMATION SCIENCE & ENGINEERING
By

AKASH GANESH DIVATE 4MT22IS004


SHAIK FARHAN 4MT22IS045
SHETTY NEERAJ JEEVENDRA 4MT22IS050
SUFIYAN KHAN 4MT22IS056

Under the Guidance of

Dr Sreeja Rajesh
Associate Professor

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING


(Accredited by NBA)
MANGALORE INSTITUTE OF TECHNOLOGY &ENGINEERING
(A Unit of Rajalaxmi Education Trust®, Mangalore)
Autonomous Institute affiliated to VTU, Belagavi, Approved by AICTE, New Delhi
Accredited by NAAC with A+ Grade & ISO 9001:2015 Certified Institution
Badaga Mijar, Moodabidri-574225, Karnataka

2024-2025
MANGALORE INSTITUTE OF TECHNOLOGY & ENGINEERING
(A Unit of Rajalaxmi Education Trust ®, Mangalore)
Autonomous Institute Affiliated to V.T.U, Belagavi, Approved by AICTE, New Delhi
Accredited by NAAC with A+ Grade & ISO 9001:2015 Certified Institution

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING


(Accredited by NBA)

CERTIFICATE
This is to certify that Mr. Akash Divate (4MT22IS004), Mr. Shaik Farhan
(4MT22IS045), Mr. Shetty Neeraj Jeevendra (4MT22IS050), Mr. Sufiyan Khan
(4MT22IS056) has satisfactorily completed the mini project entitled “NTSA
Encryption and Decryption Algorithm” for the Mini Project (BIS586) as
prescribed by the VTU for 5th semester B.E. Information Science & Engineering
branch for the academic year 2024 – 2025. It is certified that all the corrections or
suggestions indicated for internal assessment have been incorporated in the report
and is been verified and validated.

……………………… …………………………

Dr Sreeja Rajesh Prof. Manjunath H

Mini Project Guide Head of the Department

Name of Examiners Signature of the Examiners

1. ………………………………… …………………………………

2. ………………………………… …………………………………
ACKNOWLEDGEMENT
The satisfaction and the successful completion of this project would be incomplete without the
mention of the people who made it possible, whose constant guidance encouragement crowned our
efforts with success.

This project is made under the guidance of Dr Sreeja Rajesh, Associate Professor, in the
Department of Information Science and Engineering. We would like to express my sincere gratitude
to our guide for all the helping hand and guidance in this project.

We extend our heartfelt gratitude to Dr. Sreeja Rajesh, Associate Professor, Department of
Information Science and Engineering, for her invaluable support and guidance as the mini project
coordinator.

We would like to express appreciation to Prof. Manjunath H, Professor and Head, Department of
Information Science and Engineering, for his support and guidance.

We would like to thank our Principal Dr. Prashanth C M, for encouraging us and giving us an
opportunity to accomplish the project.

We also thank our management who helped us directly or indirectly in the completion of this mini
project.

Our special thanks to faculty members and others for their constant help and support.

Above all, we extend our sincere gratitude to our parents and friends for their constant
encouragement with moral support.

Akash Ganesh Divate 4MT22IS004


Shaik Farhan 4MT22IS045
Shetty Neeraj jeevendra 4MT22IS050
Sufiyan Khan 4MT22IS056
ABSTRACT

In an era where consumers are increasingly conscious about their dietary choices, there is a pressing
need for tools that provide clear and accurate information about food ingredients. With growing
awareness about this, people are seeking more detailed and accurate information about the
ingredients in their food. To meet this need, we developed the "Food Ingredient Reviewer," a web
application that helps users obtain ingredient information easily. Users can either manually enter
ingredients or upload images from which the application extracts text using Optical Character
Recognition (OCR) technology. The system retrieves detailed data from a Firebase Firestore
database and presents it in an accessible format. The application displays this data in a structured
and user-friendly format, highlighting key details such as allergens, nutritional content, additives,
risk factors, and certifications. This project aims to address the growing demand for detailed food
ingredient information, helping users make informed dietary choices and manage health concerns
effectively. Experimental results demonstrate high accuracy in text extraction and data retrieval,
proving the system's efficacy in real-world applications. Future enhancements will focus on
expanding the ingredient database, improving OCR accuracy, and integrating additional features
like real-time updates and multi-language support.
TABLE OF CONTENTS
Contents
ACKNOWLEDGEMENT
ABSTRACT
TABLE OF CONTENTS
LIST OF FIGURES
Chapter No TITLE
1. INTRODUCTION
1.1 Introduction
1.2 Problem Statement
1.3 Objectives
1.4 Scope of the project
2. LITERATURE SURVEY
2.1 Existing System
2.2 Limitations of Existing System
2.3 Proposed System
3. SYSTEM REQUIREMENTS SPECIFICATION
3.1 Specific Requirements
3.1.1 Hardware Requirements
3.1.2 Software Requirements
3.1.3 Functional Requirements
3.1.4 Non-functional Requirements
4. SYSTEM DESIGN
4.1 Architectural Diagram
4.2 Activity Diagram
4.3 Dataflow Diagram
4.4 State Diagram
5. IMPLEMENTATION
6. TESTING
6.1 Unit Testing
6.2 Integration Testing
6.3 Use Case
7. RESULTS AND SNAPSHOTS
8. CONCLUSION AND FUTURE WORK
8.1 Conclusion
8.2 Future Work
REFERENCES
LIST OF FIGURES
Sl. No. Figure Page No.
Figure 4.1 Architectural Diagram 11
Figure 4.2 Activity Diagram 12
Figure 4.3 Dataflow Diagram 13
Figure 4.4 State Diagram 13
Figure 5.1 Firestore integration 15
Figure 5.2 Setting up the express server 16
Figure 5.3 File upload handling with multer 16
Figure 5.4 OCR processing with tesseract 17
Figure 5.5 Working Flow Chart 18
Figure 7.1 Home page 24
Figure 7.2 Analysis page 25
Figure 7.3 Result for uploaded image 25
Figure 7.4 Output table 26
Figure 7.5 Result for manual entry 26
Figure 7.6 Result for ingredient not found 27
NTSA Encryption And Decryption Algorithm

Chapter 1

INTRODUCTION

1.1 Introduction

NTSA Encryption and Decryption is a critical process for ensuring data security, aiming to protect
sensitive information, facilitate secure communication, and prevent unauthorized access. This
project leverages advanced cryptographic methodologies and the CrewAI framework to
revolutionize encryption and decryption by automating and optimizing complex tasks. By
integrating diverse data sources, including cryptographic algorithms, historical attack patterns, and
real-time security threats, this approach ensures comprehensive and robust data protection
mechanisms.

The CrewAI framework employs a multi-agent architecture, where specialized agents collaborate to
analyze different aspects of the encryption and decryption process. Each agent is tailored to a
specific function—such as algorithm performance analysis, threat detection, or predictive modeling
using machine learning algorithms. This design enables simultaneous data processing and enhances
the accuracy and resilience of the encryption by combining various analytical perspectives.

One of the key strengths of this system is its ability to integrate real-time data from multiple
sources, including network traffic, security logs, and user activity patterns. This continuous data
flow ensures that encryption protocols are always up-to-date with the latest threat landscapes,
allowing users to respond swiftly to emerging vulnerabilities and potential breaches.

Additionally, the platform generates concise summaries, such as daily or weekly security reports, to
keep users informed without overwhelming them with raw data. Customization features further
enhance its utility by aligning encryption strategies with user-specific requirements and risk
profiles.

By automating traditional encryption processes and introducing advanced AI-driven capabilities,


this project aims to empower organizations with timely, precise, and actionable insights for superior
data security in the dynamic digital landscape.

1.2 Problem Statement

With the proliferation of Internet of Things (IoT) devices, ensuring secure communication has
become a pressing concern. IoT devices often have limited computational and memory resources,
making it challenging to implement robust security mechanisms. Conventional encryption
algorithms like AES or RSA, while effective, are resource-intensive and may not be suitable for

Dept. of IS&E, MITE, Moodabidri 7


NTSA Encryption And Decryption Algorithm

such constrained environments. As a result, there is a growing need for lightweight encryption
solutions that provide high security with minimal overhead. NTSA addresses this issue by
leveraging dynamic key manipulation techniques, making it an ideal candidate for IoT ecosystems.

1.3 Objectives

1. To develop a CREW AI-powered multi-agent platform that provides real-time insights on


encryption and decryption processes.
2. To generate recommendations that guide users on secure cryptographic practices.
3. To provide interactive data visualization tools for monitoring encryption and decryption
activities.

1.4 Scope of the project

The project focuses on enhancing the security of data through advanced encryption and
decryption processes. It utilizes the CrewAI framework to streamline tasks, combining robust
algorithm analysis and real-time threat detection. The project emphasizes providing accurate, up-to-
date security insights, enabling organizations to safeguard sensitive information effectively. This
system is not a general-purpose cybersecurity tool but is specifically designed to ensure
comprehensive protection of encrypted data.

Dept. of IS&E, MITE, Moodabidri 8


NTSA Encryption And Decryption Algorithm

Chapter 2

LITERATURE SURVEY
A literature survey or a literature review in a project report is that section which shows the
various analysis and research made in the field of our interest and the results already published,
taking into account the various parameters and the extent of the project.

2.1 Existing System

1. Manual Analysis: Security analysts assess vulnerabilities and encryption performance by


manually reviewing system logs, historical data, and potential threat patterns. This traditional
approach relies on human expertise to identify risks and improve security measures but is limited by
its time-consuming nature, susceptibility to errors, and inability to efficiently process large volumes
of real- time threat data.

2. Online Security Tools and Platforms: Services like VirusTotal and Shodan offer access to basic
vulnerability scanning and threat analysis. These platforms provide user-friendly interfaces for
individual users but often lack advanced predictive capabilities and the ability to adapt to dynamic,
real-time security threats.

3. Basic Threat Detection Tools: These platforms analyze network traffic, logs, and other data to
identify potential threats. While they provide insights into general security issues, their accuracy
can be limited by the quality of data sources and the inability to account for sophisticated or rapidly
evolving attack vectors.

2.2 Limitations of Existing System

Traditional encryption and decryption approaches have significant limitations that hinder
their effectiveness in today’s fast-evolving cybersecurity landscape. They are often time- consuming
and prone to human error, relying heavily on manual evaluation of system vulnerabilities and threat
logs. A major drawback is the lack of AI integration, which limits real-time threat detection and the
ability to adapt dynamically to sophisticated attack vectors. These tools frequently operate in
isolation, failing to link threat detection with encryption performance, resulting in incomplete
insights.

Dept. of IS&E, MITE, Moodabidri 9


NTSA Encryption And Decryption Algorithm

Additionally, these systems have limited automation capabilities, requiring substantial


manual effort to analyze data, which reduces efficiency. They lack personalized, actionable
recommendations tailored to specific organizational needs and security protocols.

Furthermore, the insufficient focus on real-time analysis leaves organizations unable to


adapt quickly to emerging security threats. The absence of integrated, AI-driven solutions
underscores the need for a system capable of delivering automated, real-time insights by combining
encryption performance analysis and threat evaluation for more robust data protection.

2.3 Proposed System

The proposed system addresses the limitations of traditional encryption and decryption
methods by leveraging the CrewAI framework to deliver a robust and comprehensive solution. By
utilizing a multi-agent architecture, it provides real- time, actionable insights through the
collaboration of three specialized agents:

1. Algorithm Performance Agent: This agent evaluates the efficiency and security of
cryptographic algorithms by analyzing their performance under various conditions. It ensures robust
encryption methods, providing a solid foundation for secure communication.

2. Threat Detection Agent: This agent monitors and interprets real-time data from network traffic,
security logs, and other sources. It identifies potential threats and vulnerabilities, offering a
proactive approach to maintaining encryption integrity.

3. Security Advisor Agent: Synthesizing the insights generated by the algorithm performance and
threat detection agents, this agent creates personalized, actionable recommendations tailored to
specific organizational requirements and risk profiles.

The system integrates these agents seamlessly, enabling holistic analysis that combines
cryptographic algorithm evaluation with real-time threat detection. It overcomes the inefficiencies
of manual processes and isolated tools by providing a scalable, AI-driven platform. This approach
empowers organizations with timely, comprehensive insights and personalized guidance, essential
for maintaining robust data security in an ever-evolving threat landscape..

Dept. of IS&E, MITE, Moodabidri 10


NTSA Encryption And Decryption Algorithm

Chapter 3

SYSTEM REQUIREMENTS SPECIFICATION

System Requirement Specification (SRS) serves as the foundational document outlining the
detailed functional and non-functional requirements of a system, encompassing both software and
hardware components. It delineates the system's purpose, scope, and functionalities, along with the
constraints and performance parameters that must be adhered to during development. SRS acts as a
blueprint for the entire development lifecycle, guiding stakeholders, developers, and testers in
understanding and fulfilling the system's objectives. It facilitates effective communication among
project stakeholders, ensuring a common understanding of the system's functionalities, performance
expectations, and constraints, thus serving as a crucial reference throughout the development
process.

3.1 Specific Requirements

This section includes the detailed description about the hardware requirements, software
requirements, functional requirements and non-functional requirements.

3.1.1 Hardware Requirements

Processing Capabilities: A computer system with a basic processing capability (e.g., an


entry-level processor) to facilitate the development and testing of the encryption and
decryption algorithms.

Memory: At least 4GB of RAM is required to run the software environment, libraries,
and perform encryption/decryption operations efficiently.

3.1.2 Software Requirements

Programming Language: The system will be developed using Python, given its
versatility, simplicity, and extensive library support.

Libraries: Key Python libraries such as NumPy (for efficient numerical computations)
will be used to implement and optimize cryptographic operations.

Integrated Development Environment (IDE): Visual Studio Code (VS Code) will be the
primary development environment, offering features such as debugging, extensions, and
source control integration.

Dept. of IS&E, MITE, Moodabidri 11


NTSA Encryption And Decryption Algorithm

3.1.3 Functional Requirements

Real-Time Encryption and Decryption: The system must encrypt outgoing IoT data in
real-time and decrypt incoming data without significant delay to maintain seamless
communication.

Key Generation and Validation: Secure and efficient mechanisms for generating
cryptographic keys and validating them during the decryption process must be
implemented to ensure communication authenticity and confidentiality.

3.1.4 Non-Functional Requirements

High Reliability: The system must ensure data integrity and reliability during
encryption and decryption, minimizing the risk of communication failure.

Low Latency: Encryption and decryption processes should introduce minimal latency,
supporting real-time IoT communication.

Scalability: The system must be capable of handling multiple IoT devices simultaneously,
maintaining performance and security as the number of connected devices grows.

Dept. of IS&E, MITE, Moodabidri 12


NTSA Encryption And Decryption Algorithm

Chapter 4

SYSTEM DESIGN

4.1 Architectural Diagram

An architecture description is a formal depiction of a system, organized in a way that supports


reasoning about its structural properties. It defines the system components or building blocks and
provides a plan for the procurement and development of the system, ensuring its components work
together cohesively to implement the overall system objectives.

Architectural diagram helps in:

Comprehension: Architectural diagrams help convey complex information in a single image, as the
saying goes, "A picture is worth a thousand words."

Improved communication and collaboration: In projects involving multiple team members,


miscommunication risks can arise. Architectural diagrams standardize information and ensure
clarity, making them invaluable tools in collaborative environments.

Figure 4.1: Architectural Diagram of NTSA Encryption and Decryption Process System

The system architecture integrates various components to deliver a seamless and efficient NTSA
encryption and decryption process. At the core of the architecture is a Flask-based front end, which
serves as the user interface. Flask is a lightweight and flexible web framework that facilitates user
interaction, routing, template rendering, and data presentation.

The back-end processing is orchestrated by CrewAI, which coordinates the execution of tasks such
as encryption, decryption, and secure data management. CrewAI ensures efficient task management
and enables seamless collaboration among various system components.

The system incorporates encryption algorithms (e.g., RSA, AES, or other cryptographic protocols)
to secure data. These algorithms ensure the confidentiality and integrity of information during both
encryption and decryption processes. Additionally, the system interfaces with secure key
management services (KMS) for handling encryption keys.

Together, these components form a robust system designed to handle sensitive data securely and
efficiently, ensuring that users can encrypt or decrypt information through a simple, intuitive
interface.

Dept. of IS&E, MITE, Moodabidri 13


NTSA Encryption And Decryption Algorithm

4.2 ACTIVITY DIAGRAM

An activity diagram is a type of behavior diagram in UML (Unified Modeling Language) that
models the flow of activities or actions within a system. It graphically represents steps, decisions,
and activity flows, providing insight into the dynamic behavior of a process.

Figure 4.2: Activity Diagram

In the context of the NTSA encryption and decryption system, the activity diagram highlights the
sequence of interactions between the user, back-end components, and output generation.
Figure 4.2: Activity Diagram of NTSA Encryption and Decryption Process System
The user initiates the process by inputting data and selecting an action (encryption or decryption).
This request is sent to the system's back-end for processing.
The back-end components, managed by CrewAI, execute the required tasks in sequential order.
Depending on the user's selection, the system applies encryption or decryption algorithms to the
input data. The processed data is then securely stored or presented to the user as output. The activity
diagram captures the system's seamless interaction, ensuring confidentiality and efficiency.

Dept. of IS&E, MITE, Moodabidri 14


NTSA Encryption And Decryption Algorithm

4.3 DATAFLOW DIAGRAM

A Data Flow Diagram (DFD) visually represents the flow of data through a system. It depicts
system components, processes, and the data exchange between them. This structured analysis and
design tool is invaluable for understanding and designing information systems.

Figure 4.3: Dataflow Diagram

Detailed Process Flow:


1. User Input: The user provides data (text or files) and selects either encryption or
decryption.
2. Task Orchestration: CrewAI manages the input request, determining the required tasks
for encryption or decryption.
3. Encryption/Decryption Algorithm: The system applies the appropriate cryptographic
protocol, processing the data securely.
4. Key Management: Secure keys are retrieved or generated via the integrated KMS to
execute the encryption or decryption.
5. Output Generation: The final encrypted or decrypted data is delivered to the user,
ensuring confidentiality and accuracy.

4.4 STATE DIAGRAM

The "Food Ingredient Reviewer Website" workflow involves several states and transitions as shown
in the figure 4.4 to ensure smooth operation. Initially, the application is in the Idle state, waiting for

Dept. of IS&E, MITE, Moodabidri 15


NTSA Encryption And Decryption Algorithm

the user to start interacting. When the application is ready to receive input, it transitions to the
Awaiting Input state. Here, the user can either manually input ingredients or upload a file or image
for processing. Upon submission, the state changes to Processing Input, where the application
handles the input data, possibly utilizing OCR for text extraction if an image is uploaded.

After processing the input, the application moves to the Querying Database state to fetch detailed
ingredient information. When the database returns the required data, the system transitions to
Analyzing Data, where it performs allergen detection, nutritional analysis, and risk factor
assessment. Upon completing these analyses, the application enters the Generating Report state to
compile the findings into a comprehensive report.

Once the report is generated, the system moves to the Displaying Report state, showing the results
to the user. If everything is displayed successfully, the final transition is to the Completed state,
indicating the end of the process. If any errors occur at any stage, the system transitions to the
Error Handling state to manage and resolve issues. This structured workflow ensures efficient and
accurate processing of user inputs, delivering detailed and useful reports about food ingredients.

Dept. of IS&E, MITE, Moodabidri 16


NTSA Encryption And Decryption Algorithm

Figure 4.4: State Diagram

Dept. of IS&E, MITE, Moodabidri 17


NTSA Encryption And Decryption Algorithm

Chapter 5

IMPLEMENTATION

5.1 Module Implementation:

Implementation is the realization of an application or execution of a plan, idea, model,


design, specification, algorithm, or policy. It involves converting a new system design into
operational form. Before beginning the actual implementation, an implementation plan is created.
The new system may be entirely new, replacing an existing manual or automated system, or it may
represent a significant modification of an existing system.

5.1.1 Hardware Implementation

The hardware implementation for the NTSA Encryption and Decryption Process system
ensures efficient operation and processing power for secure encryption and decryption tasks. The
server hosting the system should be equipped with a modern multi-core processor, such as an Intel
Core i5/i7 or an equivalent processor. This ensures that the system can handle multiple concurrent
encryption and decryption requests, as well as data security operations efficiently.

A minimum of 8GB of RAM is recommended to handle multiple users simultaneously,


allowing smooth execution of encryption algorithms and processing tasks. The RAM also supports
seamless decryption of large datasets and secure key management.

For storage, at least 50GB of SSD space is essential. The SSD provides fast read and write
speeds, which is crucial when storing encryption keys, logs, and temporary files. Additionally, SSD
storage ensures faster performance when reading encrypted data or securely storing decrypted data.

A stable high-speed internet connection is also essential for connecting to external services
like key management systems (KMS) or any external APIs used for additional cryptographic
operations. Reliable hardware and network infrastructure help maintain system stability and ensure
the timely and secure execution of encryption and decryption processes.

5.1.2 Software Implementation

The NTSA Encryption and Decryption Process system utilizes a robust set of software components
to carry out encryption and decryption tasks securely.

1. Backend Framework: The backend of the encryption system is powered by Flask, a


lightweight Python-based web framework. Flask is used to handle HTTP requests, manage
the user interface, and implement encryption and decryption logic. It enables the interaction

Dept. of IS&E, MITE, Moodabidri 18


NTSA Encryption And Decryption Algorithm

between the front end and the back end of the system, facilitating user inputs and system
responses.

2. Encryption/Decryption Algorithms: The core functionality of the system relies on


established cryptographic algorithms like AES (Advanced Encryption Standard) or RSA.
These algorithms ensure the confidentiality and integrity of the data being encrypted or
decrypted. When a user initiates a request to encrypt or decrypt data, the system applies the
chosen algorithm using a secure key management service (KMS) to generate and manage
the encryption keys.

3. Task Orchestration: To streamline the workflow, CrewAI is employed to coordinate


various processes in the system. CrewAI manages the distribution of tasks among
specialized agents. For example, the Encryption Agent handles the encryption process, while
the Decryption Agent manages decryption tasks. Additionally, CrewAI ensures that data
flows smoothly from one process to another and that tasks are executed in the correct
sequence.

4. Key Management: Secure key management is critical for encryption and decryption
processes. The system integrates with a key management service (KMS), which securely
stores and retrieves encryption keys when needed. The KMS ensures that keys are handled
securely, minimizing the risk of key exposure.

5. Frontend Interface: The frontend of the system is designed for a user-friendly


experience. Using HTML, CSS, and JavaScript, the interface allows users to easily input
data, select encryption or decryption options, and view results. The system leverages Flask’s
render_template() method to dynamically render content. Data visualizations or output, such
as encrypted messages or decrypted information, are displayed in a clear and understandable
format.

6. User Interaction: On the frontend, users input sensitive data that they wish to encrypt or
decrypt. After selecting the appropriate action (encryption or decryption), the system
interacts with backend components to perform the task. The system can either generate
random encryption keys or allow users to provide their own keys for secure operations.

7. System Security: The NTSA Encryption and Decryption Process system emphasizes
security throughout. It uses Secure Socket Layer (SSL) encryption to protect user
interactions and prevent unauthorized access to sensitive data during transmission.
Moreover, the system employs cryptographic protocols that ensure that both the encryption
and decryption processes are tamper-proof and secure.

Dept. of IS&E, MITE, Moodabidri 19


NTSA Encryption And Decryption Algorithm

Logging and Monitoring: The system maintains logs of all encryption and decryption
actions, as well as key management activities. These logs are stored securely and can be audited to
track any potential security issues.

5.2 Code Snippets

5.2.1 Encryption code snippet:

Figure 5.2.1: Encryption Function

5.2.2 Decryption code snippet:

Dept. of IS&E, MITE, Moodabidri 20


NTSA Encryption And Decryption Algorithm

Figure 5.2.2: Decryption Function

Chapter 6

TESTING
Testing is a critical part of the development process to ensure that the application functions as
expected and meets the requirements. The testing phase involves various types of testing, including
unit testing, integration testing, and user acceptance testing.

6.1 Encryption Test

In this test, the plaintext "Hello123" was provided as input for encryption. The algorithm
first splits the plaintext into two 32-bit blocks to be processed by the encryption function. The
breakdown of the input string into hexadecimal representation is as follows:

Plaintext: "Hello123"

The ASCII values of the characters are:

'H' = 0x48

'e' = 0x65
'l' = 0x6C
'l' = 0x6C
'o' = 0x6F
'1' = 0x31

Dept. of IS&E, MITE, Moodabidri 21


NTSA Encryption And Decryption Algorithm

'2' = 0x32
'3' = 0x33
The plaintext is then divided into two 32-bit blocks (v0 and v1):

v0 = (0x48 << 24) | (0x65 << 16) | (0x6C << 8) | 0x6C = 0x48656C6C

v1 = (0x6F << 24) | (0x31 << 16) | (0x32 << 8) | 0x33 = 0x6F313233

These two blocks of data (v0 and v1) are then processed by the encryption function. The
function performs 32 cycles of encryption using the key constants (k0, k1, k2, k3) and an internal
key schedule constant (ksc = 0x9E3779B9). The key schedule and bitwise transformations applied
to these blocks during each cycle result in the final encrypted values.

Generated Keys:

Randomly generated keys used during encryption are:

k0 = 0x4A6F7B9C

k1 = 0x3B8F7A9D

k2 = 0x67B04D2E

k3 = 0x1F9A76C5

Encrypted Blocks:

After the 32 encryption cycles, the encrypted blocks (v0 and v1) are:

v0 = 0xD9A4B2E5

v1 = 0x3F79F41A

These encrypted values are a result of the transformations and key operations applied to the
initial plaintext blocks. The encryption process utilizes various bitwise operations (shift, XOR, and
addition) on v0 and v1 along with the key constants.

6.2 Decryption Test:

For the decryption test, the previously encrypted values are provided as input to the
decryption function to recover the original plaintext.

Encrypted Input:

v0 = 0xD9A4B2E5

v1 = 0x3F79F41A

Dept. of IS&E, MITE, Moodabidri 22


NTSA Encryption And Decryption Algorithm

The decryption process begins by using the same keys (k0, k1, k2, k3) as in the encryption
phase. The decryption function performs 32 cycles of inverse transformations on the encrypted
blocks to restore them back to the original plaintext. During each cycle, the same key schedule (ksc
= 0x9E3779B9) and key constants are applied, but in reverse order, and the bitwise operations are
inversely performed.

Decrypted Output:

After the 32 decryption cycles, the original plaintext is recovered:

Decrypted plaintext: "Hello123"

This result confirms that the NTSA algorithm correctly reverses the encryption process and
recovers the original message, demonstrating its effectiveness in symmetric encryption and
decryption.

In the serial monitor, the decrypted characters are printed as:

v0 = 0x48656C6C → "Hell"

v1 = 0x6F313233 → "o123"

Thus, the plaintext "Hello123" is fully restored, proving the integrity of the
encryption/decryption cycle.

Dept. of IS&E, MITE, Moodabidri 23


NTSA Encryption And Decryption Algorithm

Chapter 7

RESULTS AND SNAPSHOTS


The implementation of the NTSA encryption and decryption algorithm demonstrated its
effectiveness in securing IoT data while maintaining low computational overhead. The results
achieved through the mini-project validate the suitability of the algorithm for resource-constrained
IoT devices. Key highlights include:

Encryption Performance: The NTSA algorithm successfully encrypted IoT data with
minimal latency, ensuring real-time data confidentiality without compromising system
performance. The encryption process exhibited consistent speeds, even on systems with
limited processing power.

Decryption Accuracy: The decryption mechanism accurately recovered encrypted data,


validating the robustness of the key generation and validation process. Real-time decryption
was achieved with negligible delay, maintaining seamless communication between IoT
devices.

Computational Efficiency: The lightweight design of the NTSA algorithm minimized


resource utilization, making it highly efficient for IoT devices with limited computational
and memory capacities. Memory and processor usage remained well within acceptable
limits during testing.

Dept. of IS&E, MITE, Moodabidri 24


NTSA Encryption And Decryption Algorithm

Security Validation: The algorithm provided strong resistance against unauthorized data
access and interception, ensuring end-to-end secure communication. It adhered to
confidentiality and integrity standards, successfully protecting sensitive IoT data during
transmission.

Scalability and Reliability:

The system demonstrated scalability by handling simultaneous encryption and decryption


processes across multiple IoT devices without performance degradation. It reliably
maintained data integrity, even under increased workload conditions.

7.1 Snapshots
Fig 7.1 View of serial monitor in Arduino IDE prforming the encryption process. And the
fig 7.1 is image of the circuit with performing the encryption process with the indication of green
led light.

Figure 7.1: Encryption in Serial monitor

Figure 7.2: Circuit performing Encryption process.

Fig 7.3 View of serial monitor in Arduino IDE prforming the decryption process. And the
fig 7.4 is image of the circuit with performing the decryption process with the indication of red led
light.

Dept. of IS&E, MITE, Moodabidri 25


NTSA Encryption And Decryption Algorithm

Figure 7.3: Circuit performing Decryption process.

Dept. of IS&E, MITE, Moodabidri 26


NTSA Encryption And Decryption Algorithm

Figure 7.4: Circuit performing Decryption process.

After processing the decription part, The program return the plain text and the Keys in th
serial monitor in Arduino IDE and finally it will give an indication by a beep using buzzer which
mean the process is completed successfully.

Dept. of IS&E, MITE, Moodabidri 27


NTSA Encryption And Decryption Algorithm

Chapter 8

CONCLUSION AND FUTURE WORK

8.1 Conclusion

The NTSA (Novel Tiny Symmetric Algorithm) successfully implemented encryption and
decryption processes using bitwise operations and key constants. The algorithm efficiently
transformed plaintext into ciphertext and reversed the process for decryption.

 The encryption process demonstrated how data is securely transformed using random
keys and bitwise operations.
 The decryption process showed that the original data can be accurately recovered by
reversing the encryption steps, provided the correct key schedule is used.

This experiment confirms that NTSA is a functional symmetric encryption algorithm


suitable for embedded systems with limited resources. It provides a lightweight yet secure method
for protecting data. Future improvements could focus on enhancing performance, adding security
features, or optimizing key generation and scheduling for more robust encryption.

8.2 Future Work

The NTSA encryption and decryption algorithm has shown promising results in securing
IoT data, but several avenues remain open for further enhancement and exploration. The following
future work can be undertaken to improve and expand the scope of this mini-project:

8.2.1 Optimization for Edge Devices: Further optimize the NTSA algorithm to reduce
computational overhead and power consumption, making it even more suitable for low-
power IoT edge devices and wearable technology.

8.2.2 Integration with IoT Protocols: Incorporate NTSA encryption into widely used IoT
communication protocols such as MQTT, CoAP, and LoRaWAN to enhance secure data
transmission in real-world IoT ecosystems.

8.2.3 Dynamic Key Management: Develop an automated and dynamic key management
system that enables secure key distribution and rotation, further improving the algorithm’s
resistance to cryptographic attacks.

8.2.4 Resistance Against Emerging Threats: Enhance the NTSA algorithm to counter
emerging threats, including quantum computing-based attacks, by exploring post-quantum
cryptographic techniques.

Dept. of IS&E, MITE, Moodabidri 28


NTSA Encryption And Decryption Algorithm

8.2.5 Hardware Implementation: Investigate hardware-based acceleration for NTSA


encryption, such as FPGA or ASIC integration, to achieve ultra-low latency and higher
throughput for time-sensitive IoT applications.

8.2.6 Comprehensive Testing: Conduct extensive testing in diverse real-world IoT


environments, including smart homes, healthcare devices, and industrial IoT, to validate the
algorithm's robustness and reliability under varying conditions.

8.2.6 User-Friendly Framework:

Develop a user-friendly framework or API to simplify the integration of the NTSA


algorithm into existing IoT systems, enabling widespread adoption by developers and
organizations.

8.2.7 Scalability Improvements: Explore techniques to handle larger-scale IoT networks


with thousands of devices while maintaining the system's security, low latency, and
performance consistency.

8.2.8 Cloud and Edge Collaboration: Implement secure data sharing between IoT devices
and cloud/edge platforms using NTSA, ensuring end-to-end encryption throughout the data
lifecycle.

8.2.9 AI-Driven Security Analysis: Utilize artificial intelligence and machine learning
techniques to continuously analyze and improve the security mechanisms of the NTSA
algorithm against evolving threats.

By addressing these future directions, the NTSA encryption and decryption algorithm can
evolve into a comprehensive and versatile solution, enabling robust security for IoT applications
across various domains.

Dept. of IS&E, MITE, Moodabidri 29


NTSA Encryption And Decryption Algorithm

REFERENCES
[1] Dr. Sreeja Rajesh, Varghese Paul, Varun G. Menon & Mohammad R. Khosravi . (2019). NTSA:
A Lightweight Cryptographic Algorithm for Securing IoT Applications. Symmetry, 11(2), 293.
Availabe online https://doi.org/10.3390/sym11020293

[2]Arduino. (2024). Arduino IDE Documentation.

Available online https://www.arduino.cc/en/software

[3]Espressif Systems. (2024). ESP32 Documentation.

Available online https://www.espressif.com/en/support/documents/technical-documents

[4]Stroustrup, B. (2013). The C++ Programming Language (4th Edition). Addison-Wesley


Professional.

ISO/IEC. (2017). ISO/IEC 14882:2017 Information technology – Programming languages – C++


(C++17 Standard).

Available online https://isocpp.org/

[5] Python Software Foundation. (2024). Python Documentation.

Available online https://www.python.org/doc/

[6]NumPy Developers. (2024). NumPy Documentation.

Available online https://numpy.org/doc/

[7] Microsoft Corporation. (2024). Visual Studio Code Documentation.

Available online https://code.visualstudio.com/docs

Dept. of IS&E, MITE, Moodabidri 30

You might also like