Pyhton Project Report
Pyhton Project Report
ASCII Values
Prepared by:
Lakhan Sharma
Ayush Tiwari
Abstract
Encryption and decryption are essential processes in securing data, ensuring that infor-
mation remains protected against unauthorized access. This report highlights a Python-
based implementation of encryption and decryption using ASCII values, a simple yet
insightful method to understand the basics of cryptographic principles.
In this project, encryption converts plain text into encoded data by manipulating the
ASCII values of characters, appending a user-defined key for additional security. De-
cryption reverses the process, validating the key and reconstructing the original message.
While this approach demonstrates the core mechanics of encoding and decoding, it is not
suitable for safeguarding sensitive information due to its simplicity and susceptibility to
brute-force attacks.
The report outlines the underlying logic of the Python scripts, explaining the steps for
both encryption and decryption processes. The implementation serves as a foundation
for students and beginners to explore fundamental encryption techniques. Furthermore,
the report discusses potential applications and limitations, emphasizing the importance
of advanced algorithms like AES or RSA for real-world security needs.
This work illustrates the transformation of text using numerical representations, bridg-
ing the gap between theoretical cryptography and practical implementation.
Encryption and Decryption Using ASCII Values 2
Contents
1 Introduction 3
2 Understanding ASCII 3
3 Encryption Process 3
4 Decryption Process 3
6 Conclusion 4
Encryption and Decryption Using ASCII Values 3
1 Introduction
Encryption is the process of converting plain text into an encoded format to protect
it from unauthorized access. Decryption, on the other hand, is the reverse process of
converting the encoded text back to its original form. ASCII (American Standard Code
for Information Interchange) provides a numeric encoding standard that can be leveraged
for text manipulation. This report examines a project where encryption and decryption
are implemented by performing mathematical operations on ASCII values.
2 Understanding ASCII
ASCII assigns a numeric value to each character, enabling systematic encoding and de-
coding. For example:
• Numbers and symbols are also represented, such as ‘1‘ with a value of 49 and ‘@‘
with a value of 64.
3 Encryption Process
The encryption process involves:
2. Converting each character into its ASCII value using the ord() function in Python.
4. Adding a user-specified key to the encoded text for authentication during decryp-
tion.
This is achieved by adding the key to the ASCII value of each character and converting
the result back to a character.
4 Decryption Process
The decryption process involves:
2. Splitting the encoded string into individual ASCII values using the delimiter.
Encryption and Decryption Using ASCII Values 4
3. Removing the appended key after verifying it with the user-provided key.
The key is subtracted from the ASCII value of each character to recover the original
text.
Limitations
• Vulnerable to brute-force attacks due to the simplicity of the method.
• Lacks the complexity and security features of modern encryption algorithms like
AES or RSA.
6 Conclusion
The project demonstrates a simple yet effective way to understand encryption and de-
cryption concepts using ASCII values. While the method is educational, it underscores
the importance of using robust cryptographic algorithms for real-world applications where
security is paramount.
References
• Python documentation on ord() and chr() functions.