CHATTING APPLICATION new
CHATTING APPLICATION new
CHATTING APPLICATION new
Submitted by
of
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
WITH SPECIALIZATION IN CYBER
SECURITY
of
COLLEGE OF ENGINEERING AND TECHNOLOGY
1
NOVEMBER 2024
2
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
3
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM, CHENNAI
DECLARATION
We hereby declare that the entire work contained in this project report
titled CHATTING APPLICATION has been carried out by
AMMAR(RA2311030020096), GOKUL(RA2311030020106)
and PARTHASARATHY(RA2311030020100) at SRM Institute of
Science and Technology, Ramapuram, Chennai, under the guidance of
Dr. SHINY DUELA J, Associate Professor, Department of Computer
Science and Engineering.
4
ABSTRACT
5
TABLE OF CONTENTS
ABSTRACT 4
LIST OF FIGURES 7
LIST OF TABLES 8
1 INTRODUCTION
1.1 OVERVIEW 9
1.2 PROBLEM STATEMENT 10
1.3 AIM OF THE PROJECT 12
1.4 SCOPE OF THE PROJECT 14
1.5 SUMMARY 17
2 SYSTEM DESIGN
2.1 OVERVIEW 18
2.2 ARCHITECTURE DIAGRAM 19
2.3 USE CASE DIAGRAM 21
2.4 SCIENTIFIC DIGRAM 22
2.5 UML DIAGRAM 23
2.6 SUMMARY 24
3.1 OVERVIEW 25
3.2 LIST OF TABLES 26
3.3 DATABASE 27
3.4 EXISTING SYSTEM 29
3.5 PROPOSED SYSTEM 31
3.6 SUMMARY 34
6
4 MODULE IMPLEMENTATION
4.1 OVERVIEW 35
4.2 IMPLEMENTATION 36
4.3 SOFTWARE REQUIREMENTS 38
4.4 HARDWARE REQUIREMENTS 39
4.5 OUTPUT 40
4.6 SUMMARY 45
5 CONCLUSION 46
REFERENCES 47
7
LIST OF FIGURES
8
CHAPTER 1
INTRODUCTION
1.1 OVERVIEW
9
chatting application that will not only fulfill its basic functional needs but also to
significantly address concerns regarding data security and privacy in digital
communications. This new application, born of technological innovation, keen
design, and hope that offers safe space for users where they can feel free and
secure as they communicate, marks this into a new standard in secure messaging
under the rubric of digital age.
We use modern encryption protocols like the Signal Protocol, which guarantees that all
messages are encrypted and that the encryption keys are managed only by the user
devices.
10
In our application, encryption keys are generated and stored only on the user’s
device, never on a centralized server. This ensures that even if our servers are
compromised, the attacker cannot decrypt user messages because they do not have access
to the private keys. We follow a zero-knowledge architecture, meaning our server only
acts as a relay for encrypted messages and does not store or access encryption keys or
message content.
3. Vulnerability to Man-in-the-Middle (MitM) Attacks
Some chatting applications are vulnerable to Man-in-the-Middle (MitM) attacks,
where an attacker can intercept and alter the communication between two users without
their knowledge. This can happen if the application fails to verify the identity of users
properly or if encryption is not applied correctly.Our application uses public key
cryptography with identity verification mechanisms, like key fingerprint verification, to
prevent MitM attacks. Users can manually verify each other’s keys, ensuring that the
communication is secure.We also implement certificate pinning and Diffie-Hellman key
exchange with forward secrecy to ensure that even over untrusted networks, the messages
are not vulnerable to interception or tampering.
4. Metadata Exposure
Many applications expose metadata (e.g., who is messaging whom, message
timestamps, locations), which can provide significant information even if the message
content is encrypted. This can be exploited for surveillance or tracking user behavior. We
implement metadata encryption and minimize metadata exposure. In our application, the
server does not store information about the sender, recipient, or timestamps in a readable
format. We employ ephemeral messaging, where the metadata is discarded after the
message is delivered. Additionally, onion routing (similar to what is used in the Tor
network) is considered to obfuscate sender and receiver information, making it harder to
trace communication patterns.
11
12
1.3 AIM OF THE PROJECT
The primary aim of this project is to create a highly secure, privacy-focused chatting
application that utilizes advanced cryptographic techniques to safeguard user
communications against unauthorized access, interception, and decryption. In today's
world, where data breaches and surveillance are growing concerns, this application will
provide users with complete control over their conversations, ensuring that their
messages are only readable by the intended recipients. The application will protect
against both external attackers and potential threats from within, including service
providers and third-party intermediaries.
Key Objectives:
1. End-to-End Encryption (E2EE) Across All Communication Types:
o The application will implement end-to-end encryption as the default communication
method for all messages, whether they are text, voice calls, video chats, or file
transfers. This ensures that messages are encrypted on the sender's device and can only
be decrypted by the recipient's device. No intermediary, including the service provider,
will have access to the message content.
o This level of encryption will protect users from interception by hackers, government
surveillance, or even internal security breaches within the service.
2. Secure Key Management on User Devices:
o One of the most significant vulnerabilities in existing messaging platforms is the
storage of encryption keys on centralized servers, which can be targeted by attackers.
In this project, encryption keys will be generated, stored, and managed entirely on user
devices, ensuring that even if the server is compromised, no decryption of messages is
possible without access to the users’ devices.
o This approach adheres to a zero-knowledge architecture, meaning that the service
provider will have no knowledge or access to encryption keys, making the system
impervious to external demands for data decryption, such as government subpoenas.
3. Protection Against Metadata Exposure:
13
o In many messaging platforms, metadata—such as who is communicating with a lot
about users' behavior, even if the content is encrypted. Our application will address
this issue by encrypting and minimizing the metadata that is transmitted and stored.
o The application will also use methods such as ephemeral messaging, which ensures
that metadata is discarded once the message is delivered. Additionally, techniques like
onion routing can be employed to obscure the sender and recipient's identities,
providing an additional layer of privacy.
4. Forward and Backward Secrecy:
o A key component of secure messaging is ensuring that even if one encryption key is
compromised, previous and future messages remain protected. The application will
employ forward and backward secrecy using ephemeral keys, meaning that each
message or session will have a unique encryption key.
o Forward secrecy ensures that if an attacker gains access to the current session’s key,
they cannot decrypt past communications. Backward secrecy ensures that future
communications are not vulnerable even if earlier keys are compromised. This
provides users with long-term protection for their conversations.
5. User Privacy and Data Control:
o The application will prioritize user privacy by ensuring that sensitive data such as chat
histories, media, and files are encrypted on the user's device before being uploaded for
backup, whether to cloud storage or local backups. This client-side encryption ensures
that only the user holds the decryption key, and no third party, including cloud service
providers, can access this data.
o Additionally, users will have the option to delete their data permanently, both locally
and from servers, through self-destructing messages and strict retention policies. Once
messages are delivered or the user chooses to delete them, no trace will remain on any
server.
6. User-Friendly Interface with Seamless Security:
o Despite the advanced cryptographic measures in place, the user experience will remain
simple and intuitive. Users will not need to manually manage encryption
14
1.4 SCOPE OF THE PROJECT
o The scope of the Non-Decryptable Chatting Application project is broad and focuses
on building a highly secure, user-friendly communication platform. This platform is
designed to provide users with private, encrypted messaging, file sharing, and voice or
video calls while ensuring no third party, including the service provider, can access or
decrypt the communication. The scope can be broken down into the following key
areas:
1. Functional Scope
15
key to ensure past communications remain secure even if a key is compromised.
Local Encryption: Data stored on devices is encrypted to prevent unauthorized access
in case of device loss or theft.
Biometric Authentication: Use of biometric security (fingerprint or facial recognition)
for account protection.
Key Exchange and Verification: Secure exchange of encryption keys, with
verification methods like QR codes to prevent man-in-the-middle attacks.
3. Technical Scope
Multi-Platform Support: Availability on iOS, Android, and web browsers, offering cross-
platform compatibility and message synchronization.
Scalability: Ability to support millions of users and handle high traffic with
efficient server infrastructure.
No Server-Side Decryption: Messages remain encrypted during transmission, and
servers only act as relays without storing decryption keys or message content.
Metadata Minimization: Minimal storage of metadata (e.g., timestamps) to protect
user privacy, ensuring no sensitive information is retained unnecessarily.
4. Privacy Compliance
GDPR and CCPA Compliance: Ensuring full control over user data, allowing users
to delete their accounts and associated data on request.
Data Control: Users maintain control over their data, with features for account
deletion and data removal to align with privacy regulations.
5. User Experience (UX) Scope
Key Recovery: Users are responsible for managing their encryption keys. If keys are
lost, recovering messages is impossible without a secure backup.
Balancing Security and Legal Compliance: Ensuring user privacy while navigating
legal requirements, such as data access for law enforcement agencies.
1.4 SUMMARY
17
scalability to handle millions of users. Additionally, it provides robust security
measures like perfect forward secrecy (PFS), biometric authentication, and
metadata minimization to enhance privacy.The project also addresses compliance
with global privacy regulations such as GDPR and CCPA, ensuring that users have
control over their data and can trust the platform to protect their privacy. Key
technical components include secure key exchange mechanisms, local encryption
of messages, and optional message expiration features to reduce data persistence.
Future enhancements include exploring decentralized storage, blockchain-based
identity verification, and AI-driven fraud detection, making the application
adaptable to technological advancements. Challenges include key recovery for
users and balancing encryption with legal compliance requirements.In conclusion,
this project offers a comprehensive solution to modern communication security
challenges, providing a private, encrypted, and user-friendly platform Moreover,
the exploration of decentralized communication protocols adds an extra layer of
resilience against attacks, while the emphasis on transparency and community
involvement fosters a sense of trust and engagement among users. Overall, these
elements combine to create a secure, user-friendly, and trustworthy messaging
experience, positioning the new application as a leader in privacy- focused
communication solutions that meets the needs of users who prioritize privacy and
data protection.
18
CHAPTER 2
SYSTEM DESIGN
2.1 OVERVIEW
The design overview of a Non-Decryptable Chatting Application centers on
ensuring absolute privacy and security through end-to-end encryption (E2EE),
allowing only the sender and intended recipient to access message content. At
the core of this design is client-side encryption, where messages are encrypted
on the sender's device using the recipient’s public key and decrypted only on the
recipient's device with their private key, preventing any intermediary or server
from accessing the message. This decentralized approach to encryption also
includes robust key management: each user generates a public-private key pair,
with the private key stored securely on their device, while the public key is
shared securely through protocols like Diffie-Hellman or Elliptic Curve Diffie-
Hellman (ECDH) to protect against interception.
For user authentication and access control, the application integrates multi-
factor authentication (MFA) and biometric authentication options, adding
another layer of security on the device level. Key verification methods like QR
code scanning or digital fingerprint comparison
19
Fig 2.1 ARCHITECTURE DIAGRAM
20
In FIG2.1,A use case diagram for a Non-Decryptable Chatting Application
illustrates the main actions users can perform, highlighting the security-focused
interactions in a way that ensures only authorized participants can access
communication content. Here's how a use case diagram for such a system might
look:
21
In FIG2.3,For a scientific or technical presentation, you can create a flowchart
or a diagram using specialized software tools like Microsoft Visio, Lucid chart,
or draw.io, and Fig 2.3 which allow you to create complex diagrams with
various shapes and connectors. You can use these tools to represent the different
aspects of the bank management system.
22
In FIG2.4,UML diagrams provide a powerful tool for modeling and
documenting complex systems, helping to communicate system structure and
behavior effectively. These diagrams aid in design, development, and
communication, ensuring a comprehensive understanding of the system's
intricacies.
23
2.6 SUMMARY
In summary, The Non-Decryptable Chatting Application system design is
centered around providing maximum security and privacy for users by ensuring
that no one except the intended sender and recipient can access message
content. This is achieved through end-to-end encryption (E2EE), where
messages are encrypted on the sender's device using the recipient's public key
and can only be decrypted on the recipient's device using their private key. This
prevents any intermediary, including the application server, from accessing or
decrypting message content, creating a secure channel for private
communication.
24
CHAPTER 3
ANALYSIS AND SYSTEM REQUIREMENTS
3.1OVERVIEW
A secure chatting application revolves around end-to-end encryption, ensuring
users' communications remain private and protected from unauthorized access.
The design process begins with a comprehensive analysis of user needs,
particularly the emphasis on confidentiality. By identifying potential security
threats such as eavesdropping and data breaches, the application can implement
effective protective measures. This proactive approach shapes its features and
functionalities, establishing a robust framework that safeguards sensitive
information and allows users to communicate without fear of intrusion.
25
3.2DATABASE:
26
One major issue is data privacy. While many applications tout end-to-end
encryption, which theoretically protects messages from being intercepted,
concerns remain regarding how user data is managed. Many applications
collect metadata—information about who is communicating, when, and for
how long—which can reveal patterns of behavior and personal relationships.
This metadata can be accessed by the service provider or third parties,
raising serious questions about the level of privacy actually afforded to
users. In some cases, privacy policies may be unclear or misleading, leaving
users uncertain about what data is being collected and how it is used.
27
3.4PROPOSED SYSTEM
28
4. Compliance with Global Regulations: The new application is built with a
focus on regulatory compliance from the ground up. It incorporates features
that align with international data protection laws, such as GDPR and CCPA,
including transparent data handling practices and user rights management.
This proactive approach not only helps avoid legal pitfalls but also builds
user trust by demonstrating a commitment to responsible data stewardship.
30
CHAPTER 4
MODULE IMPLEMENTATION
4.1 OVERVIEW
One of the key features of this module is its secure key management. The
application implements a sophisticated key management system (KMS) that
generates, distributes, and securely stores encryption keys. The KMS ensures
that keys are generated in a secure environment and that they are only accessible
to authorized users. A crucial aspect of this management is **key rotation**,
which periodically changes encryption keys. This practice minimizes the risk
associated with long-term key usage, as even if a key were compromised, it
31
would only be
effective for a limited time.
32
The E2EE Module also extends its encryption capabilities beyond text
messages to include voice and video calls. This means that all forms of
communication within the application, whether text, audio, or video, are
protected by the same high standards of encryption. By ensuring that these
different types of communication are secured, the application provides a
comprehensive privacy solution for its users.
The user experience is also taken into account, as the E2EE Module
seamlessly integrates into the application’s interface. Users can send and
receive messages without needing to understand the complexities of encryption;
the module operates in the background to ensure security while providing a
smooth and intuitive user experience.
33
4.2 IMPLEMENTATION
1. Encryption Module
This module is responsible for implementing end-to-end encryption. It should
utilize libraries like `cryptography` or `PyCryptodome` to handle encryption
algorithms such as AES for symmetric encryption and RSA for key exchange. The
module will manage the encryption and decryption of messages as well as the
generation of secure keys.
4. Messaging Module
34
This module handles the core functionality of sending and receiving messages. It
manages message queues, formats messages for transmission, and interacts with the
encryption module to encrypt messages before sending and decrypt them upon
receipt. It can also support features like group chats and message history.
35
4.3 SOFTWARE REQUIREMENTS
To develop a secure chatting application that ensures user communications cannot
be decrypted by unauthorized parties, a range of software requirements are
necessary. These encompass libraries, frameworks, databases, and tools that
facilitate the implementation of encryption, user interface design, and secure
communication. Here’s a comprehensive list of software requirements:
1. Programming Language
Cryptography Libraries:
o Flask or Django: For creating the backend and handling HTTP requests.
Networking Libraries:
36
PostgreSQL or MySQL: For more robust, scalable storage solutions, particularly
for handling larger datasets securely.
5. Key Management
AWS KMS or HashiCorp Vault: For secure key management if utilizing cloud services.
IDEs: Such as PyCharm, Visual Studio Code, or Jupyter Notebook for development.
Testing Frameworks:
o pytest or unittest: For writing and running tests to ensure code quality.
8. Documentation Tools
ELK Stack (Elasticsearch, Logstash, Kibana): For advanced logging and monitoring
if needed.
37
4.4 HARDWARE REQUIREMENTS
- to develop and run a secure chatting application that prioritizes encryption and
user privacy, certain hardware requirements are necessary. These
requirements will vary depending on the intended deployment environment
(e.g., local
development, production servers, or user devices). Here’s an overview of
the hardware requirements for each aspect:
- 1. Development Environment
38
user base:
- Dedicated Server or Cloud Instance: Processor: Multi-core processor (e.g., Intel Xeon or
AMD EPYC) for handling multiple simultaneous connections.
- RAM: Minimum of 16 GB (32 GB or more recommended for higher traffic).
- Storage: SSDs with at least 512 GB for fast read/write operations, with options for
scaling up as needed. Network: High-speed internet connection with low latency;
dedicated bandwidth may be beneficial for real-time messaging.
4. User Devices
- For end-users accessing the application:
- Smartphones or Tablets:
- Processor: Modern multi-core processor (e.g., Snapdragon or Apple A-series) for
efficient app performance.
- RAM: Minimum of 2 GB (4 GB or more recommended for smooth multitasking).
- Storage: At least 16 GB free space to accommodate the application and data.
- Network: Reliable internet connectivity, whether via Wi-Fi or mobile data.
5. Desktops or Laptops:
- Processor: Modern multi-core processor (e.g., Intel i3 or higher).
RAM: Minimum of 4 GB (8 GB recommended).
Storage: At least 100 GB free space for application installation and data.
Network: Stable internet connection for effective use of the application.
6. Backup and Recovery Systems
External Storage Solutions:
Backup servers or external hard drives to securely store backups of
data, configurations, and logs.
Processor and RAM: Standard requirements for backup solutions,
depending on the amount of data being handled.
39
3.6OUTPUT:
41
Fig 4.4 CONNECTOR INTERFACE
42
a. SUMMARY
.
For user interaction, the User Interface Module provides an intuitive design,
whether for desktop or web applications, while the Data Storage Module
ensures that all stored data is encrypted. The Audit and Logging Module tracks
important events for security and compliance purposes, and the Compliance
Module manages data protection regulations. Lastly, the optional
Decentralization Module allows for peer-to-peer communication, further
enhancing privacy. Together, these modules create a comprehensive framework
for a secure, user- friendly chatting application focused on protecting user
privacy.
43
CHAPTER 5
CONCLUSION
In conclusion, the development of a secure chatting application that prioritizes
user privacy and data protection represents a significant advancement in the
realm of digital communication. By implementing robust modules such as end-
to-end encryption, secure key management, and user authentication, the
application effectively mitigates risks associated with unauthorized access and
data breaches. The emphasis on user-friendly interfaces ensures that security
features are accessible to all users, fostering a safer messaging environment.
44
REFERENCES
45