Mini-project_Report
Mini-project_Report
BACHELOR OF ENGINEERING
In
INFORMATION SCIENCE & ENGINEERING
By
Dr Sreeja Rajesh
Associate Professor
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
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.
……………………… …………………………
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.
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.
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
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
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.
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. 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.
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.
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..
Chapter 3
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.
This section includes the detailed description about the hardware requirements, software
requirements, functional requirements and non-functional requirements.
Memory: At least 4GB of RAM is required to run the software environment, libraries,
and perform encryption/decryption operations efficiently.
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.
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.
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.
Chapter 4
SYSTEM DESIGN
Comprehension: Architectural diagrams help convey complex information in a single image, as the
saying goes, "A picture is worth a thousand words."
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.
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.
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.
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.
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
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.
Chapter 5
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.
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.
The NTSA Encryption and Decryption Process system utilizes a robust set of software components
to carry out encryption and decryption tasks securely.
between the front end and the back end of the system, facilitating user inputs and system
responses.
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.
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.
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.
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.
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"
'H' = 0x48
'e' = 0x65
'l' = 0x6C
'l' = 0x6C
'o' = 0x6F
'1' = 0x31
'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:
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.
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
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:
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.
v0 = 0x48656C6C → "Hell"
v1 = 0x6F313233 → "o123"
Thus, the plaintext "Hello123" is fully restored, proving the integrity of the
encryption/decryption cycle.
Chapter 7
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.
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.
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.
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.
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.
Chapter 8
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.
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.
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.
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