Enhancing Communication Security With A Telegram Bot For Encrypted Image Communication Using F5-LSB Steganography
Enhancing Communication Security With A Telegram Bot For Encrypted Image Communication Using F5-LSB Steganography
Abstract— In response to the increasing need for secure online focus centers on the development of a technically proficient
communication and growing data privacy concerns, this study Telegram bot specialized in image steganography,
introduces a technically robust Telegram bot for image
steganography. Utilizing the F5 algorithm for JPEG images and strategically catering to the prevalent usage of JPEG and
the LSB algorithm for PNG images, the bot addresses challenges PNG image formats. Drawing insights gleaned from the
such as preserving image quality while concealing substantial survey, we meticulously implement the F5 algorithm for
data and lacking user-friendliness in existing systems. The
JPEG images and the LSB algorithm for PNG images,
primary goal of this research study is to establish a secure and
user-friendly platform, ensuring accessibility and independence selected for their optimal balance between security
from specific systems. By incorporating encryption, the bot robustness and computational efficiency. The bot streamlines
guarantees secure message transmission, making it resilient to the steganography process within the Telegram environment,
interception or detection attempts. This proposed system offers
a dependable and efficient approach, harmonizing image furnishing users with an intuitive interface for seamless
quality preservation with effective data concealment for secure interaction.
communication. The Telegram bot’s technical foundation,
coupled with advanced steganography techniques, positions it as Subsequent sections of the paper will perform a
a versatile and accessible tool, meeting the evolving demands of
secure communication in the digital era. thorough analysis of relevant research, providing a
comprehensive discussion on the architectural framework
Keywords: Image Steganography, Telegram bot, Least Significant and features of the proposed system. Additionally, this study
Bit(LSB), Portable Network Graphics(PNG), Joint Photographic
Experts Group (JPG), Peak Signal-to-Noise Ratio(PSNR), Mean-
will present specific images to the system for encoding,
Square Error(MSE), F5, Elliptic Curve Digital Signature followed by rigorous parameter calculations and evaluation
Algorithm(ECDSA) of the system.
2. Message Encoding:
138
Authorized licensed use limited to: J.C. Bose University of Science and Technology YMCA Faridabad. Downloaded on November 06,2024 at 10:21:14 UTC from IEEE Xplore. Restrictions apply.
The sender initiates embedding by providing a extensive customization, and access to a
cover image and a confidential message, which rich repository of development tools,
undergoes encryption using the recipient's public making it a preferred choice for online
key for secure communication. Image-format- activities.
specific encoding methods are employed: LSB
Telegram: A cloud-based messaging
concealment for PNG images and the F5
steganography algorithm for JPG images. platform with APIs for building custom
(fig 2). bots and communication solutions.
Python: A high-level programming
3. Message Decoding: language known for its simplicity and
Upon receiving the stego image, the receiver extensive library ecosystem.
initiates the decoding process using /unlock
command. The system identifies the format and 2. Libraries
selects the appropriate decoding algorithm,
Following are the python libraries employed
revealing the concealed message (fig 3).
to implement the system :
These three modules collectively contribute to eciespy: For ECDSA key generation and
a secure and seamless image steganography process. ECIES encryption, ensuring secure
communication.
Flask: A lightweight web framework for
simplifying the development of scalable web
applications.
pyTelegramBotAPI: For interacting with the
Telegram Bot API, facilitating bot
development.
Flask-SQLAlchemy: Extension for Flask
integrating SQLAlchemy for database
operations within Flask applications.
Fig. 1. Key Generation
NumPy: For calculating MSE and PSNR
values, by comparing encoded images with
cover image.
C. Algorithms
1. ECDSA
ECDSA is a robust digital signature
algorithm employed within the system,
ensures data integrity and authenticity. It
Fig. 2. Message Encoding utilizes keys derived from elliptic curve
cryptography, facilitating secure signature
creation, verification, and efficiency in
resource-constrained environments, making
it an apt choice.
2. LSB
LSB algorithm serves as a fundamental
technique in steganography, enabling the
concealment of messages within digital
Fig. 3. Message Decoding media. Particularly adept at embedding
information within images or audio files
without perceptibly altering their quality,
B. Tools Selection and Libraries LSB operates by sequentially embedding
1. Tools and Programming Language message bits into the least significant bit of
Visual Studio Code (VSCode): A each pixel's color value. This technique
versatile IDE developed by Microsoft, allows for imperceptible alterations to the
offering advanced features for code image's appearance, ensuring covert
editing and debugging. communication while preserving visual
Operating System (Linux): Opting for integrity.
Linux online ensures robust security,
139
Authorized licensed use limited to: J.C. Bose University of Science and Technology YMCA Faridabad. Downloaded on November 06,2024 at 10:21:14 UTC from IEEE Xplore. Restrictions apply.
3. F5 IV. SYSTEM INTERFACE
The F5 steganographic algorithm enhances
the concealment of secret information within The Telegram bot interface is carefully crafted for easy
digital images by modifying the least significant and precise interaction with the secure image steganography
bit of each pixel. Employing a data-hiding function system. It uses straightforward text-based commands within
to distribute secret data randomly throughout the the Telegram environment, ensuring a seamless user
image, F5 resists detection against visual attacks experience. These commands integrate with the Telegram
such as filtering or compression and statistical API, establishing a secure and direct communication channel
analysis. Leveraging matrix encoding and pseudo- for user input. The design focuses on simplicity, making it
random shuffling of Discrete Cosine Transform accessible for users with varying technical backgrounds.
coefficients, F5 ensures robustness and security in Overall, the interface provides a user-friendly platform for
concealing and extracting messages from digital secure image steganography.
images, particularly in JPEG format.
A. Commands:
D. Tool Features
1. Dynamic URL Security Feature: 1) /begin - Initialization Command:
a. Dynamic URL Generation: Initializes the bot, providing users with access to
The system dynamically generates the steganography functionalities.
unique URLs for steganographic images,
which change every 6 hours and 5 minutes, 2) /assist - Workflow and Command Display:
limiting access within a specified time Displays the Workflow and Available Commands,
window. This temporal aspect ensures offering users guidance on the system's functionality.
security by preventing unauthorized access
beyond the designated time frame. 3) /fetch_key - Retrieve Public Key:
Retrieves and displays the user's public key, a
b. Temporal Link Validity: crucial component in the encryption and decoding
The system implements a temporal link processes.
validity mechanism to invalidate URLs after
a predefined time limit, mitigating the risk of 4) /lock - Message Embedding Process:
attackers attempting to access or decode Initiates the process of generating the encoded
steganographic images beyond the image.
designated period. Procedure after entering the command:
Step 1: Send the message you want to encrypt.
2. Resource Management Feature: Step 2: Share the recipient's public key.
a. Efficient Resource Handling: Step 3: Upload the cover image (as a document)
The system optimizes efficiency with
multi-threading for concurrent task 5) /unlock - Decode Process:
processing and systematically clears Reveals the hidden text within an encoded image.
temporary storage, managed by a transient Procedure after entering the command:
database or cache, after each process to Step 1: Upload the encoded image (as a document)
prevent data leakage.
6) /abort - Process Termination:
b. Memory Allocation Safeguards: Halts any ongoing processes, providing users with
Each process is allocated dedicated an efficient means to cease current actions, ensuring
memory to prevent resource exhaustion, system integrity.
ensuring responsive system performance,
even during peak usage, and maintaining 7) /new_identity - Generate New Key:
operational efficiency. Initiates the process of generating a new
c. Data Integrity and Protection: cryptographic key pair, with cautionary notes regarding
Sensitive information is securely potential data loss. Text encrypted with the previous key
handled, with temporary storage routinely cannot be recovered.
cleared to prevent unauthorized access, while
robust process management mechanisms B. System Overview
maintain data integrity and protect against
leaks. Within the realm of steganography tools, our
proposed system is designed with the aim to create a
The technical implementation involves secure key user-friendly, machine- and operating system-
generation, image embedding with encryption and independent tool that securely encodes the message into
steganography, quality assurance with SSIM and PSNR the cover image.
metrics, dynamic URL generation, and efficient resource
management, ensuring system security and user
confidence in secure image steganography.
140
Authorized licensed use limited to: J.C. Bose University of Science and Technology YMCA Faridabad. Downloaded on November 06,2024 at 10:21:14 UTC from IEEE Xplore. Restrictions apply.
Fig. 4. GUI Image 1 Fig. 6. GUI Image 3
Upon accessing the front page of the bot, users are This proposed system facilitates message encoding
prompted to initiate the process by entering the "/begin" into the widely used image formats, namely JPG and
command. The "/assist" command is readily available PNG. Its user-friendly and comprehensible interface
on this page to furnish users with a comprehensive list enhances accessibility, rendering it an easily deployable
of commands essential for effective communication tool for a broad user base.
with the system.
V. RESULTS AND DISCUSSION
a. MSE:
It calculates intensity differences between
original and stego images. Lower MSE indicates
minimal impact on image quality.
b. PSNR:
A measure of encoded image quality in
relation to the original is the Peak Signal to Noise
Fig. 5. GUI Image 2
Ratio. It quantifies how well-embedded
This figure 5 illustrates the encoding process of the information is concealed without compromising
bot. To encode a secret message into the cover image, image clarity. Higher PSNR values signify
users are required to input the "/lock" command and superior image preservation.
provide the necessary input as prompted by the bot.
This figure 6 demonstrates the decoding process, c. Comprehensive Performance Analysis with Visual
where the message is decoded from the stego image. Representation
Users can achieve this by entering the "/unlock"
command and submitting the stego image as input to the The table I presents some of the cover images
bot. that were encoded using the Telegram bot,
resulting in stego images in both JPG and PNG
formats.
141
Authorized licensed use limited to: J.C. Bose University of Science and Technology YMCA Faridabad. Downloaded on November 06,2024 at 10:21:14 UTC from IEEE Xplore. Restrictions apply.
JPG Format original and encoded images: PSNR and lower MSE values indicate that
embedded information remains covert while
TABLE I. JPG Outcomes minimizing the impact on the visual fidelity of the
stego image.
S Original Encoded
PSNR value MSE value
no. image image
2. Enhanced Privacy and Performance in Secure Image
Steganography System:
142
Authorized licensed use limited to: J.C. Bose University of Science and Technology YMCA Faridabad. Downloaded on November 06,2024 at 10:21:14 UTC from IEEE Xplore. Restrictions apply.
In essence, the privacy-centric secure image [7] L. Kumar Gupta, A. Singh, A. Kushwaha and A. Vishwakarma,
steganography system integrates cryptographic strength, "Analysis of Image Steganography Techniques for Different
Image Format," 2021 International Conference on Advances in
robust identification processes, effective data preservation Electrical, Computing, Communication and Sustainable
measures, and a focus on performance and accuracy. This Technologies (ICAECT), Bhilai, India, 2021, pp. 1-6, doi:
comprehensive approach embodies the commitment to user 10.1109/ICAECT49130.2021.9392492.
privacy, system efficiency, and the precision of embedded
[8] M. A. Islam, M. A. -A. K. Riad and T. S. Pias, "Performance
data. Analysis of Steganography Tools," 2020 2nd International
Conference on Advanced Information and Communication
VI. CONCLUSION Technology (ICAICT), Dhaka, Bangladesh, 2020, pp. 428-433,
doi: 10.1109/ICAICT51780.2020.9333473.
In conclusion, the introduction of a technically robust
[9] Jayapandiyan, Jagan Raj, C. Kavitha, and K. Sakthivel.
Telegram bot for image steganography represents a notable "Enhanced least significant bit replacement algorithm in spatial
advancement in addressing critical challenges within secure domain of steganography using character sequence
online communication. Through the adept utilization of the optimization." IEEE Access 8 (2020): 136537-136545.
F5 algorithm for JPEG images and the LSB algorithm for
[10] Ansari, Arshiya & Mohammadi, Mohammad & Parvez,
PNG images, the bot successfully achieves a delicate balance Mohammad. (2019). A Comparative Study of Recent
between maintaining image quality and concealing Steganography Techniques for Multiple Image Formats.
substantial data. Furthermore, the seamless integration of International Journal of Computer Network and Information
encryption serves to fortify the system, ensuring not only Security. 11. 11-25. 10.5815/ijcnis.2019.01.02.
secure message transmission but also enhancing resilience [11] H. Kaur and A. Kakkar, "Comparison of different image
against interception or detection attempts. This innovative formats using LSB Steganography," 2017 4th International
solution not only provides a reliable and efficient platform Conference on Signal Processing, Computing and Control
but also prioritizes user-friendliness and system (ISPCC), Solan, India, 2017, pp. 97-101, doi:
10.1109/ISPCC.2017.8269657.
independence, thereby broadening its accessibility across
diverse user demographics. With its advanced steganography [12] Vigil, MS Antony, Sameer Singh Rathor, and Jitendra Singh.
techniques and solid technical foundations, the Telegram bot "Secure binary image steganography using F5 algorithm based
emerges as a versatile tool, well-positioned to meet the on data hiding and diffusion techniques." Int. J. Comput.
Technol. Appl 9.10 (2016): 4843-4857.
evolving demands of secure communication in the digital era
and beyond. Looking ahead, the future scope of this study [13] Majumdar, S., Maiti, A., Das, S., & Das, A. (2016). New
holds the potential for further enhancements, including the secured data sharing technique using elliptic curve
integration of additional steganography algorithms, cryptography and F5 steganography. International Journal of
Scientific and Engineering Research, 7(4), 1376-1380. ISSN
refinement of user interface features, and compatibility with 2229-5518.
emerging communication platforms. These forthcoming
advancements can enhance the capabilities and accessibility [14] Abduallah, Wafaa Mustafa, and Abdul Monem S. Rahma. "A
of secure communication technologies to unprecedented review on steganography techniques." American Scientific
Research Journal for Engineering, Technology, and Sciences
levels by establishing a more secure and interconnected (ASRJETS) 24.1 (2016): 131-150.
digital landscape.
[15] D. Neeta, K. Snehal and D. Jacobs, "Implementation of LSB
Steganography and Its Evaluation for Various Bits," 2006 1st
REFERENCES International Conference on Digital Information Management,
Bangalore, India, 2007, pp. 173-178, doi:
[1] Dodeja, Ujjwal. BaatCheet: Android chat application coupling 10.1109/ICDIM.2007.369349.
End-to-End encryption and LSB substitution. BS thesis.
University of Twente, 2024. [16] Gope, Bishakha, et al. "Design and Comparative Analysis of a
User-Friendly Telegram Bot for Image Steganography using F5
[2] S. Rahman et al., "A Comprehensive Study of Digital Image and LSB Algorithms." 2023 8th International Conference on
Steganographic Techniques," in IEEE Access, vol. 11, pp. Communication and Electronics Systems (ICCES). IEEE, 2023.
6770-6791, 2023, doi: 10.1109/ACCESS.2023.3237393.
143
Authorized licensed use limited to: J.C. Bose University of Science and Technology YMCA Faridabad. Downloaded on November 06,2024 at 10:21:14 UTC from IEEE Xplore. Restrictions apply.