APP REPORT PY (3) Mini Project
APP REPORT PY (3) Mini Project
By
K.TARUN (RA2211031010104)
K.JAVALI (RA2211031010100)
B.MOHIT (RA2211031010108)
Dr. Manickam.M
of
SCHOOL OF COMPUTING
KATTANKULATHUR
NOVEMBER 2023
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
BONAFIDE CERTIFICATE
Certified that this minor project report for the course 21CSC203P ADVANCED
,and B.Mohit (RA2211031010108) who carried out the work under my supervision.
SIGNATURE SIGNATURE
The Python script is a comprehensive encryption and decryption tool that includes several cryptographic
algorithms developed as functions. This algorithm provides versatile encryption and decryption
methods:
Morse Code Operations: Includes functions to convert text to Morse code (text_to_morse) and vice versa
(morse_to_text), which is essential for encoding and decoding text.
Caesar Cipher Method: Using the Caesar_cipher function, the script performs encryption and decryption
using the Caesar cipher, using the user-supplied shift key to change characters.
Atbash Cipher Function: The atbash_cipher function encrypts and decrypts text using the Atbash Cipher,
which uses a monoalphabetic substitution cipher by replacing characters based on their position in the
alphabet.
Polybius Square Cipher Method: This script includes functions such as create_polybius_square,
encode_polybius_square and decode_polybius_square to manage encoding and decoding operations
using the Polybius square, and map symbols to boxes for secure communication.
ASCII translator feature: To manipulate text using ASCII code, the script uses text_to_ascii and
ascii_to_text, which allows the conversion of text to ASCII art and vice versa.
Rail encryption method: Using rail_fence_encrypt and rail_fence_decrypt, the script performs
encryption and decryption using the rail chip cipher, arranging the characters in a zigzag pattern.
ROT13 Cipher Operation: Using the rot13_cipher function, the script facilitates encryption and
decryption using the ROT13 algorithm, replacing letters with 13 positions in the alphabet.
In addition, the script integrates SQLite for efficient database management, including functions such as
insert_into_db and display_result to store and display information related to encryption. It also includes
a basic user management system focused on user credentials, including functions such as
save_credentials, check_credentials, and get_user_data for authentication and data retrieval. Overall,
this entry provides a set of cryptographic functions, database integration, and minimal user management
capabilities, serving developers, educators, or enthusiasts looking for a variety of encryption methods
and data management functions via command line or programmatic methods.
.ACKNOWLEDGEMENT
Finally, we thank our parents and friends near and dear ones who directly and
indirectly contributed to the successful completion of our project. Above all, I
thank the almighty for showering his blessings on me to complete my Course
project.
TABLE OF CONTENTS
1 INTRODUCTION 1
1.1 Motivation 2
1.2 Objective 3
1.4 Challenges 5
2 LITERATURE SURVEY 6
3 REQUIREMENT 7
ANALYSIS
4 ARCHITECTURE & 9
DESIGN
5 IMPLEMENTATION 11
6 RESULTS 27
7 CONCLUSION 28
8 REFERENCES 29
1. INTRODUCTION
Python script functions as a secure encryption and decryption tool that includes various
cryptographic functions developed as independent functions. This function includes various
encryption methods, from Morse Code operation to allow seamless conversion between text and
Morse code representation. In addition, the script implements the classic Caesar Cipher method,
which allows users to encrypt and decrypt text using a fixed variable key, providing a basic
encryption method. In addition, the Vigenère Cipher function gives users the ability to encrypt and
decrypt messages using a private key, increasing security through polyalphabetic substitution.
The tool also integrates Atbash Cipher, providing text encryption and monoalphabetic substitution-
based decryption, more encryption options. Polybius Square Cipher is implemented to encrypt and
decrypt messages using a predefined network map, adding another layer of cryptography.
Additionally, the ASCII Translator function facilitates text-to-ASCII conversion and vice versa,
serving users looking for text manipulation based on ASCII codes.
The script containing the Rail Fence Cipher methodology extends the spectrum of ciphertext
methods for encryption and decryption in a zigzag manner. There is also ROT13 Cipher, which is
a simple letter substitution cipher to change text. Along with this encryption function, the script
uses efficient SQLite for database management, allowing storage, retrieval, and manipulation of
information related to encryption. In addition, a basic user management system has been integrated
that allows the use of credentials to identify users and obtain data, increasing the utility of the device
for practical and diverse encryption tasks. Overall, these extensive cryptographic functions and
database management capabilities appeal to cryptography enthusiasts, teachers, or developers
looking for a variety of encryption methodologies and secure data management functions.
1
1.1 MOTIVATION
The Encryption and Decryption Toolkit project is driven by a deep motivation to empower users in
data security. At a time when digital communication is ubiquitous and cyber threats are ubiquitous,
the toolkit serves as a timely response to the growing need for robust encryption solutions. By
offering a diverse set of encryption techniques, the project aims to democratize the field of
cryptography, providing novices and enthusiasts with a user-friendly platform to explore and
understand the principles of secure communication. The toolkit's graphical user interface (GUI)
ensures accessibility for users with diverse technical backgrounds and translates theoretical concepts
into tangible, real-world applications. This hands-on experience not only improves individual
knowledge, but also encourages a proactive approach to protecting sensitive information.
The project's versatility in incorporating different encryption methods, from classic ciphers to more
modern approaches, underlines its commitment to accommodate a wide range of preferences and use
cases. The real-time interaction feature allows users to see the immediate impact of encryption on
their data, making learning engaging and reinforcing the practical importance of encryption for
information security. SQLite database integration adds another layer of functionality that allows
users to store and view previously encrypted and decrypted messages. This historical perspective
enhances the usefulness of the toolkit and provides users with valuable information about their
encryption activities.
In addition, the Encryption and Decryption Toolkit project promotes the adoption of data security
best practices. By offering a toolkit that emphasizes encryption, the project aims to contribute to a
wider awareness of secure digital practices and foster a culture where users prioritize the protection
of their online communications. This project is fundamentally motivated by a commitment to
demystify and democratize cryptography and equip users with the tools and knowledge needed to
navigate the complexities of data security in our increasingly connected world.
2
1.2 OBJECTIVE
The Encryption and Decryption Toolkit project is designed with a set of interrelated goals to provide
users with an educational, accessible, and versatile platform for exploring the complexities of data
security. The primary educational goal is to demystify cryptography by offering a diverse array of
encryption techniques that will satisfy students and enthusiasts seeking a practical understanding of
the principles of secure communication. The project prioritizes user accessibility by creating an
intuitive Graphical User Interface (GUI) that ensures that individuals with a variety of technical
backgrounds can seamlessly work with and benefit from the toolkit. Versatility is a key goal,
covering both classic and modern encryption methods, allowing users to experiment with different
techniques and gain insight into their practical applications.
A real-time interaction feature is incorporated to enhance the learning experience and allow users to
see the immediate impact of encryption on their data. SQLite database integration serves the purpose
of providing users with a historical view of their encryption activities. This feature allows users to
store and retrieve previously encrypted and decrypted messages, contributing to a comprehensive
understanding of their encryption journey.
In addition to technical research, the project aims to foster a culture of data security by encouraging
users to adopt best practices in encryption and secure digital communications. By focusing on
encryption tools, the project aligns with industry standards and promotes a proactive approach to
securing online communications. In summary, these objectives together form a robust framework
that provides users with the knowledge and tools needed to navigate and appreciate the complexities
of data security in today's interconnected digital environment.
3
1.3 PROBLEM STATEMENT
In today's digital communication environment, ensuring the confidentiality and integrity of sensitive
information is paramount. However, individuals often lack accessible and user-friendly tools to
understand and effectively implement encryption techniques. The absence of a comprehensive
encryption toolkit with a diverse range of methods presents a significant challenge to those seeking
hands-on experience and practical knowledge in cryptography. Additionally, there is a need for a
platform that not only educates users about encryption principles, but also encourages the adoption
of secure communication practices.
To address these challenges, the Encryption and Decryption Toolkit aims to develop a versatile and
user-friendly application. The toolkit should provide a range of encryption methods, from classical
ciphers to more modern algorithms, and support an environment where users can experiment, learn,
and use encryption techniques in real time. The lack of readily available educational tools in
cryptography and the need for a cohesive platform that integrates various encryption methods
underscores the importance of developing solutions that accommodate users of varying levels of
technical expertise.
Furthermore, there is a gap in tools that seamlessly combine educational aspects with practical
application while emphasizing user accessibility. The absence of a centralized platform that allows
users to store, review and learn from their cryptographic activities further increases the existing
challenges. Therefore, the problem statement revolves around the need for an encryption and
decryption toolkit that not only educates, but enables users to effectively secure their digital
communications and promotes a culture of data security in the digital age.
4
1.4 CHALLENGES
1. Different encryption techniques: Integrating a wide range of encryption methods, including classical
ciphers and modern algorithms, presents a challenge in terms of complexity of implementation and
ensuring the seamless coexistence of different techniques within the toolkit.
2. User-friendly interface: Designing an intuitive graphical user interface (GUI) that accommodates
users with different technical backgrounds is a design challenge. Finding a balance between simplicity
and functionality is essential to ensure accessibility.
3. Real-time interaction: Enabling real-time interaction for users to witness the immediate impact of
encryption on their data requires a robust implementation, especially when multiple encryption
methods and varying input lengths are involved.
4. Database Integration: SQLite database integration for storing and retrieving encrypted and
decrypted messages includes handling database connections, ensuring data integrity, and
implementing an efficient storage and retrieval mechanism.
5. Security Aspects: Ensuring the security of the toolkit itself is essential. Addressing potential
vulnerabilities and implementing best practices to protect user data from unauthorized access or
manipulation is a primary concern.
6. Adoption and awareness: Encouraging users to adopt secure communication practices and creating
awareness about the importance of encryption in the digital age present challenges in terms of user
engagement, outreach and education initiatives.
7. Platform Compatibility: Ensuring the compatibility of the toolkit with different operating systems
and platforms requires thorough testing and development consideration to guarantee a seamless user
experience in different environments.
Addressing these challenges will be critical to the successful development and deployment of an
encryption and decryption toolkit that ensures it meets its goals of education, accessibility, and
practical utility in data security.
5
2. LITERATURE SURVEY
2017
6
3. REQUIREMENTS
Functional Requirements:
Encryption Methods: The toolkit should support a variety of encryption methods, including but not
limited to Morse Code, Caesar Cipher, Vigenère Cipher, Atbash Cipher, Polybius Square Cipher,
ASCII Translation, and Rail Fence Cipher.
Real-time interaction: Users should be able to enter text and witness the immediate results of
encryption or decryption in real-time for selected methods.
User interface: The graphical user interface (GUI) should be intuitive, with clearly marked input and
output sections, so that users can work seamlessly with the toolkit.
Database Integration: The toolkit should integrate with a SQLite database to store and retrieve user-
specified messages along with their encrypted and decrypted counterparts.
Versatility: Users should be able to choose from a diverse set of encryption methods, and the toolkit
should accommodate the simultaneous use of multiple methods.
Displaying the results: The encrypted and decrypted results should be displayed to the user along with
relevant details such as the method used and timestamps.
Non-Functional Requirements:
Performance: The toolkit should provide efficient real-time interaction and be responsive even when
working with large volumes of text.
Security: Security measures should be implemented to protect user data stored in the database and
ensure confidentiality and integrity.
Compatibility: The toolkit should be compatible with various operating systems, including Windows,
macOS, and Linux, and should work seamlessly in various web browsers.
7
Scalability: The system should be scalable to accommodate future updates, additional encryption
methods, and enhancements without compromising performance.
Usability: The GUI should be designed for ease of use, with clear navigation, well-organized sections,
and user-friendly controls.
Documentation: Extensive documentation should be provided for users and potential contributors,
including a user manual and developer documentation.
User support: A support mechanism such as a help desk or a user forum should be established to
resolve user queries and provide assistance.
Accessibility: The toolkit should meet accessibility standards to ensure that users with disabilities can
use and navigate the application effectively.
By addressing these functional and non-functional requirements, an encryption and decryption toolkit
can be developed to provide a robust, user-oriented, and educational platform for exploring the world
of cryptography.
8
4. ARCHITECTURE AND DESIGN
The architecture of encryption and decryption tools can be divided into several modules or
components, each of which is responsible for a specific function:
Module description:
Basic encryption/decryption module:
Morse code module:
text_to_morse: Convert text input to Morse code.
morse_to_text: Convert Morse code to readable text.
Caesar Cipher Module:
caesar_cipher: Encrypts / decrypts text using the specified shift key.
9
encoder module ROT13:
rot13_cipher: Encrypts / decrypts text using the ROT13 cipher.
10
5. IMPLEMENTATION
Implementing an encryption and decryption toolkit involves several key aspects, including the
development of a universal graphical user interface (GUI), integration of different encryption
methods, real-time interaction capabilities, and seamless database connectivity. The toolkit is
designed to be user-friendly and allow individuals with a variety of technical backgrounds to
explore and understand the principles of cryptography.
GUI development focuses on creating an intuitive interface with clear sections for user input,
method selection, and results display. The implementation incorporates design principles to ensure
ease of navigation and accessibility. Each encryption method is implemented as a modular
component, making it easy to add new methods and use multiple techniques simultaneously. Real-
time interaction is achieved using efficient algorithms that dynamically update the output as users
enter text or select different encryption methods.
Database integration is a critical part of the toolkit that uses SQLite to store and retrieve user
messages along with their encrypted and decrypted counterparts. The implementation ensures data
integrity, efficient storage and retrieval mechanisms. To protect user data, security measures are
implemented with an emphasis on the confidentiality and integrity of stored information.
Additionally, the implementation includes optional user authentication features for a personalized
environment where users can securely store and retrieve historical data. Documentation is provided
for users and potential contributors to ensure transparency and ease of use. The implementation of
the toolkit complies with legal and ethical standards and emphasizes the responsible use of
encryption methods and compliance with data protection regulations.
Overall, the implementation of the Encryption and Decryption Toolkit aims to provide a robust
user-centric platform that combines practical use with educational value in cryptography.
11
CODE:
import tkinter as tk
from tkinter import ttk
from tkinter import filedialog
import sqlite3
text_widgets = {}
MORSE_CODE_DICT = {'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....',
'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--.',
'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-',
'Y': '-.--', 'Z': '--..', '1': '.----', '2': '..---', '3': '...--', '4': '....-', '5': '.....',
'6': '-....', '7': '--...', '8': '---..', '9': '----.', '0': '-----', ' ': '/'}
conn = sqlite3.connect('encryption_results.db')
c = conn.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS results
(id INTEGER PRIMARY KEY AUTOINCREMENT,
input_text TEXT,
encrypted_text TEXT,
decrypted_text TEXT,
encryption_type TEXT)''')
conn.commit()
def display_results():
12
result_window = tk.Toplevel(root)
result_window.title("Encrypted and Decrypted Results")
def create_button(parent, text, command, row, column, width=15, height=3, padx=5, pady=5):
button = tk.Button(parent, text=text, command=command, bg="#85CD32", width=width,
height=height)
button.grid(row=row, column=column, padx=padx, pady=pady)
13
def create_text(parent, height, width, row, column, padx=5, pady=5):
text = tk.Text(parent, height=height, width=width)
text.grid(row=row, column=column, padx=padx, pady=pady)
return text
def open_file():
file_path = filedialog.askopenfilename(defaultextension=".txt", filetypes=[("Text files",
"*.txt")])
if file_path:
with open(file_path, 'r') as file:
text = file.read()
current_tab_key = notebook.tab(notebook.select(), "text").lower()
input_text = text_widgets.get(f"{current_tab_key}_input")
if input_text:
input_text.delete("1.0", "end")
input_text.insert("1.0", text)
def morse_gui():
morse_window = tk.Toplevel(root)
morse_window.title("Morse Code Encryption")
frame = create_frame(morse_window, 0, 0)
create_label(frame, "Input:", 0, 0)
input_text = create_text(frame, 5, 30, 0, 1)
create_button(frame, "Encode", lambda: encode(input_text), 1, 0)
create_button(frame, "Decode", lambda: decode(input_text), 1, 1)
14
create_label(frame, "Output:", 2, 0)
output_text = create_text(frame, 5, 30, 2, 1)
def encode(text):
encoded_text = text_to_morse(text.get("1.0", "end-1c"))
output_text.delete("1.0", "end")
output_text.insert("1.0", encoded_text)
insert_into_db(text.get("1.0", "end-1c"), encoded_text, "", "Morse Code")
def decode(text):
morse_code = text.get("1.0", "end-1c")
decoded_text = morse_to_text(morse_code)
output_text.delete("1.0", "end")
output_text.insert("1.0", decoded_text)
insert_into_db("", morse_code, decoded_text, "Morse Code")
def caesar_gui():
caesar_window = tk.Toplevel(root)
caesar_window.title("Caesar Cipher")
frame = create_frame(caesar_window, 0, 0)
create_label(frame, "Input:", 0, 0)
input_text = create_text(frame, 5, 30, 0, 1)
create_label(frame, "Shift Key:", 1, 0)
key_entry = ttk.Entry(frame)
key_entry.grid(row=1, column=1, padx=5, pady=5)
create_button(frame, "Encrypt/Decrypt", lambda: encrypt_decrypt(input_text, key_entry), 2, 0)
create_label(frame, "Output:", 3, 0)
output_text = create_text(frame, 5, 30, 3, 1)
15
output_text.insert("1.0", encrypted_text)
insert_into_db(text.get("1.0", "end-1c"), encrypted_text, "", "Caesar Cipher")
def vigenere_gui():
vigenere_window = tk.Toplevel(root)
vigenere_window.title("Vigenère Cipher")
frame = create_frame(vigenere_window, 0, 0)
create_label(frame, "Input:", 0, 0)
input_text = create_text(frame, 5, 30, 0, 1)
create_label(frame, "Key:", 1, 0)
key_entry = ttk.Entry(frame)
key_entry.grid(row=1, column=1, padx=5, pady=5)
create_button(frame, "Encrypt/Decrypt", lambda: encrypt_decrypt(input_text, key_entry), 2, 0)
create_label(frame, "Output:", 3, 0)
output_text = create_text(frame, 5, 30, 3, 1)
def atbash_gui():
atbash_window = tk.Toplevel(root)
atbash_window.title("Atbash Cipher")
frame = create_frame(atbash_window, 0, 0)
create_label(frame, "Input:", 0, 0)
input_text = create_text(frame, 5, 30, 0, 1)
16
create_button(frame, "Encrypt/Decrypt", lambda: encrypt_decrypt(input_text), 1, 0)
create_label(frame, "Output:", 2, 0)
output_text = create_text(frame, 5, 30, 2, 1)
def encrypt_decrypt(text):
encrypted_text = atbash_cipher(text.get("1.0", "end-1c"))
output_text.delete("1.0", "end")
output_text.insert("1.0", encrypted_text)
insert_into_db(text.get("1.0", "end-1c"), encrypted_text, "", "Atbash Cipher")
def polybius_gui():
polybius_window = tk.Toplevel(root)
polybius_window.title("Polybius Square Cipher")
frame = create_frame(polybius_window, 0, 0)
create_label(frame, "Input:", 0, 0)
input_text = create_text(frame, 5, 30, 0, 1)
create_button(frame, "Encode", lambda: encode(input_text), 1, 0)
create_button(frame, "Decode", lambda: decode(input_text), 1, 1)
create_label(frame, "Output:", 2, 0)
output_text = create_text(frame, 5, 30, 2, 1)
def encode(text):
plaintext = text.get("1.0", "end-1c")
polybius_square = create_polybius_square()
encoded_text = encode_polybius_square(polybius_square, plaintext)
output_text.delete("1.0", "end")
output_text.insert("1.0", encoded_text)
insert_into_db(plaintext, encoded_text, "", "Polybius Cipher")
def decode(text):
encoded_text = text.get("1.0", "end-1c")
polybius_square = create_polybius_square()
decoded_text = decode_polybius_square(polybius_square, encoded_text)
17
output_text.delete("1.0", "end")
output_text.insert("1.0", decoded_text)
insert_into_db("", encoded_text, decoded_text)
def ascii_gui():
ascii_window = tk.Toplevel(root)
ascii_window.title("ASCII Translator")
frame = create_frame(ascii_window, 0, 0)
create_label(frame, "Input:", 0, 0)
input_text = create_text(frame, 5, 30, 0, 1)
create_button(frame, "Text to ASCII", lambda: text_to_ascii_action(input_text), 1, 0)
create_button(frame, "ASCII to Text", lambda: ascii_to_text_action(input_text), 1, 1)
create_label(frame, "Output:", 2, 0)
output_text = create_text(frame, 5, 30, 2, 1)
def text_to_ascii_action(text):
input_text = text.get("1.0", "end-1c")
ascii_art = text_to_ascii(input_text)
output_text.delete("1.0", "end")
output_text.insert("1.0", ascii_art)
insert_into_db(input_text, ascii_art, "", "Text to Ascii")
def ascii_to_text_action(text):
ascii_art = text.get("1.0", "end-1c")
input_text = ascii_to_text(ascii_art)
output_text.delete("1.0", "end")
output_text.insert("1.0", input_text)
insert_into_db("", ascii_art, input_text, "Ascii to Text")
def rail_fence_gui():
rail_fence_window = tk.Toplevel(root)
rail_fence_window.title("Rail Fence Cipher")
18
frame = create_frame(rail_fence_window, 0, 0)
create_label(frame, "Input:", 0, 0)
input_text = create_text(frame, 5, 30, 0, 1)
create_label(frame, "Number of Rails:", 1, 0)
rails_entry = ttk.Entry(frame)
rails_entry.grid(row=1, column=1, padx=5, pady=5)
create_button(frame, "Encrypt", lambda: encrypt(input_text, rails_entry), 2, 0)
create_button(frame, "Decrypt", lambda: decrypt(input_text, rails_entry), 2, 1)
create_label(frame, "Output:", 3, 0)
output_text = create_text(frame, 5, 30, 3, 1)
def text_to_morse(text):
morse_code = ''
for char in text.upper():
if char in MORSE_CODE_DICT:
morse_code += MORSE_CODE_DICT[char] + ' '
19
else:
morse_code += '/ '
return morse_code
def morse_to_text(morse_code):
morse_code = morse_code.strip().split(' ')
text = ''
for code in morse_code:
for key, value in MORSE_CODE_DICT.items():
if code == value:
text += key
return text
20
result += chr((ord(char) + key_offset - 2 * ascii_offset) % 26 + ascii_offset)
key_index = (key_index + 1) % len(key)
else:
result += char
return result
def atbash_cipher(text):
result = ''
for char in text:
if char.isalpha():
ascii_offset = ord('A') if char.isupper() else ord('a')
result += chr((25 - (ord(char) - ascii_offset)) + ascii_offset)
else:
result += char
return result
def create_polybius_square():
21
alphabet = "ABCDEFGHIKLMNOPQRSTUVWXYZ"
polybius_square = [['' for _ in range(5)] for _ in range(5)]
key = "KEYWORD"
key += alphabet
key = ''.join(sorted(set(key), key=key.find))
for row in range(5):
for col in range(5):
polybius_square[row][col] = key[0]
key = key[1:]
return polybius_square
def text_to_ascii(text):
ascii_art = ''
for char in text:
22
ascii_value = ord(char)
if char.isalpha():
ascii_art += f'{char}: {ascii_value}\n'
else:
ascii_art += f'\'{char}\': {ascii_value}\n'
return ascii_art
def ascii_to_text(ascii_art):
lines = ascii_art.strip().split('\n')
text = ''
for line in lines:
parts = line.split(':')
if len(parts) == 2:
text += chr(int(parts[1].strip()))
elif len(parts) == 1 and parts[0].strip():
text += parts[0].strip()
return text
23
fence[index] += 'X'
index = (index + 1) % rails
return ''.join(fence)
def rail_fence_gui():
rail_fence_window = tk.Toplevel(root)
rail_fence_window.title("Rail Fence Cipher")
frame = create_frame(rail_fence_window, 0, 0)
create_label(frame, "Input:", 0, 0)
input_text = create_text(frame, 5, 30, 0, 1)
create_label(frame, "Number of Rails:", 1, 0)
rails_entry = ttk.Entry(frame)
rails_entry.grid(row=1, column=1, padx=5, pady=5)
create_button(frame, "Encrypt", lambda: encrypt(input_text, rails_entry), 2, 0)
create_button(frame, "Decrypt", lambda: decrypt(input_text, rails_entry), 2, 1)
create_label(frame, "Output:", 3, 0)
output_text = create_text(frame, 5, 30, 3, 1)
24
output_text.insert("1.0", decrypted_text)
save_rail_fence_results("", encrypted_text)
root = tk.Tk()
root.title("Multi-Encryption Tool")
menu_bar = tk.Menu(root)
root.config(menu=menu_bar)
main_frame = ttk.Frame(root)
main_frame.grid(row=0, column=0)
notebook = ttk.Notebook(main_frame)
notebook.grid(row=1, column=0, columnspan=3, padx=10, pady=10, sticky='nsew')
# Menu bar
menu_bar = tk.Menu(root)
root.config(menu=menu_bar)
25
file_menu.add_command(label="Exit", command=root.destroy)
# Menu
file_menu = tk.Menu(menu_bar, tearoff=0)
menu_bar.add_cascade(label="File", menu=file_menu)
file_menu.add_command(label="Exit", command=root.destroy)
# Results menu
results_menu = tk.Menu(menu_bar, tearoff=0)
menu_bar.add_cascade(label="Results", menu=results_menu)
results_menu.add_command(label="Display Results", command=display_results)
root.mainloop()
26
6. RESULTS
The first frame in the device's graphical interface, which functions as the main welcome interface,
displays a gray-green header with a welcome message and an image related to encryption. It acts
as an entry point that offers navigation to various encryption functions via drop-down menus for
Morse Code, Caesar Cipher, Vigenère Cipher, Atbash Cipher, Polybius Square Cipher, ASCII
Translator, Rail Fence Cipher and ROT13 Cipher.
27
7. CONCLUSION
In conclusion, the Encryption and Decryption Toolkit is a comprehensive and user-friendly solution
for exploring the realm of cryptography. The project successfully achieves its goals by providing a
versatile graphical user interface that seamlessly integrates different encryption methods and allows
users to encrypt and decrypt messages in real-time. The modular design of the toolkit makes it easy
to add new methods and ensures adaptability to evolving cryptographic techniques.
The educational features built into the toolkit add to its value as a practical secure communication
tool and learning platform for cryptography enthusiasts. Clear explanations, help, and references to
cryptographic principles allow users to understand the intricacies of each encryption method and
promote a deeper understanding of the science of cryptography.
The integration of a robust SQLite-implemented database system enhances the functionality of the
toolkit by storing and retrieving user-entered messages along with their encrypted and decrypted
counterparts. Security measures are prioritized to protect user data, reflecting the project's
commitment to confidentiality and integrity.
The project's commitment to accessibility, scalability, and compatibility ensures that the toolkit can
be used across different operating systems and browsers to satisfy a diverse user base. Optional
user authentication features add a layer of personalization and security for users who want to
securely store and retrieve historical data.
In short, the Encryption and Decryption Toolkit not only meets the functional requirements of a
practical encryption tool, but also succeeds in creating an educational platform that demystifies the
world of cryptography. This project is a valuable resource for individuals looking for a secure way
to communicate and a deeper understanding of the principles of encryption techniques.
28
8. REFERENCES
29