INFOSEC1-Final Document (Tejano, Sajulan)
INFOSEC1-Final Document (Tejano, Sajulan)
I. INTRODUCTION
i. Background
Cybersecurity is increasingly vital in today’s digital landscape,
where the frequency of cyber-attacks and data breaches
continues to rise alarmingly. As organizations and individuals
rely more heavily on online systems, the protection of
sensitive user data has become a pressing concern. This
environment underscores the need for robust cybersecurity
measures to safeguard against the threats that compromise
personal information and organizational integrity (G. H. Trinity
and N. Sharma, 2023). Passwords are often the first line of
defense in securing both personal and organizational data.
However, users frequently face difficulties creating secure
passwords, and social identity factors—such as cultural
background and language—can inadvertently lead to weaker,
more predictable password choices. This introduces significant
vulnerabilities, as cyber attackers may exploit these common
patterns in password behavior. Addressing this issue requires
a blend of user education and targeted interventions to
promote more effective password creation practices and
enhance overall security (Grobler et al., 2020).
Over the last years there has been massive changes that lead
to the growth of information in technology, that brought
significant changes in the part of cryptography and its
applications like confidentiality of data and many such.
Privacy and secrecy is what everyone desires for their data or
accounts. Encryption is one such method to achieve it.
Advanced Encryption Standard (AES), can be used to protect
the information. The primary preferred standpoint of AESis, it
very well may be can be reproduced or worked with
unadulterated equipment. In this paper, Xilinx 9.2i is utilized
for recreation and improvement of VHDL code. Integrating and
execution of the code is completed on Xilinx - Project
Navigator ISE 9.2i suite. Xilinx XC3S500 gadget of Spartan
Family and is utilized for equipment usage. This undertaking
proposes a strategy to coordinate the AES encrypter and the
AES descrypter.
III. METHODS
i. Flowchart
Fig. 2. Flowchart
The flowchart begins with the user initiating the password
handling process. The first step is for the user to input their
plain text password into the system. The system then checks
the validity of the password by verifying if it meets specific
criteria, such as length and complexity. If the password is
invalid, the user is prompted to re-enter a valid password.
Once a valid password is provided, the system applies AES-
256 encryption to convert the plain text password into an
encrypted format. After encryption, the resulting encrypted
password undergoes further processing with the SHA-256
hashing algorithm, which generates an irreversible
cryptographic hash. This hashed password is then securely
stored in the database, ensuring that the original plain text
password cannot be retrieved, even if the database is
compromised. The process ends, confirming that the password
has been successfully secured using the Jhospher Algorithm,
which combines the strengths of AES and SHA-256 to provide
a dual-layered security mechanism.
Code:
from Crypto.Cipher import AES
2. SHA-256 Hashing
The sha256_hash function generates a secure hash from the
encrypted password components (nonce, tag, ciphertext).
Code:
import hashlib
def sha256_hash(data):
return hashlib.sha256(data).hexdigest()
3. Registration Process
During registration, the system encrypts the plaintext
password using AES, hashes the encrypted components, and
stores all necessary details in the database.
Code:
@app.route('/register', methods=['GET', 'POST'])
def register():
if request.method == 'POST':
username = request.form['username']
password = request.form['password']
key = get_random_bytes(16)
nonce, tag, ciphertext = aes_encrypt(password, key)
password_hash = sha256_hash(nonce + tag +
ciphertext)
4. Login Process
The login functionality decrypts the stored password and
compares it with the user's input to authenticate.
Code:
@app.route('/login', methods=['GET', 'POST'])
def login():
if request.method == 'POST':
username = request.form['username']
password = request.form['password']
with sqlite3.connect("users.db") as conn:
cursor = conn.cursor()
cursor.execute("SELECT password_hash, aes_key,
nonce, tag, ciphertext FROM users WHERE username = ?",
(username,))
row = cursor.fetchone()
if row:
stored_password_hash, aes_key, nonce, tag,
ciphertext = row
aes_key = bytes.fromhex(aes_key)
nonce = bytes.fromhex(nonce)
tag = bytes.fromhex(tag)
ciphertext = bytes.fromhex(ciphertext)
try:
cipher = AES.new(aes_key, AES.MODE_EAX,
nonce=nonce)
decrypted_password =
cipher.decrypt_and_verify(ciphertext, tag).decode()
if decrypted_password == password:
session['username'] = username
flash('Login successful!', 'success')
return render_template('dashboard.html')
except Exception:
flash('Login failed.', 'danger')
else:
flash('Invalid credentials.', 'danger')
return render_template('login.html')
Description: Verifies user credentials by decrypting and
comparing the stored and entered passwords.
V. REFERENCES
1. A Secure method for Image Signaturing using SHA-256, RSA,
and Advanced Encryption Standard (AES). (2022, April 23). IEEE
Conference Publication | IEEE Xplore.
https://ieeexplore.ieee.org/document/9792989
2. Digital Image Encryption Using 256-Bit Advanced Encryption
Standard Algorithm. (2023, May 5). IEEE Conference Publication |
IEEE Xplore. https://ieeexplore.ieee.org/document/10141709
3. Design and Implementation of AES and SHA-256 Cryptography
for Securing Multimedia File over Android Chat Application.
(2019, November 1). IEEE Conference Publication | IEEE Xplore.
https://ieeexplore.ieee.org/document/8864485
4. Husni, M., Ciptaningtyas, H. T., Suadi, W., Ijtihadie, R. M.,
Anggoro, R., Salam, M. F., & Arifiani, S. (2020). Security audit in
cloud-based server by using encrypted data AES -256 and SHA-
256. IOP Conference Series Materials Science and Engineering,
830(3), 032015. https://doi.org/10.1088/1757-899x/830/3/032015
5. Sundaram, B. B., Mishra, M. K., Thirumoorthy, D., Rastogi, U.,
& Pattanaik, B. (2021b). ZHLS Security Enhancement by
integrating SHA256, AES, DH in MANETS. Journal of Physics
Conference Series, 1964(4), 042003.
https://doi.org/10.1088/1742-6596/1964/4/042003
6. Devi, S., & Kotha, H. D. (2019). AES encryption and decryption
standards. Journal of Physics Conference Series, 1228(1),
012006. https://doi.org/10.1088/1742-6596/1228/1/012006
7. Lu, Z., & Mohamed, H. (2021). A Complex Encryption System
Design Implemented by AES. Journal of Information Security,
12(02), 177–187. https://doi.org/10.4236/jis.2021.122009
8. Secure Chat Room Application Using AES-GCM Encryption and
SHA-256. (2023b, November 14). IEEE Conference Publication |
IEEE Xplore. https://ieeexplore.ieee.org/document/10366418
9. FPGA-based implementation of the SHA-256 hash algorithm.
(2020, June 1). IEEE Conference Publication | IEEE Xplore.
https://ieeexplore.ieee.org/abstract/document/9196134
10. Singhal, V., Shukla, Y., & Prakash, N. (2020). Image
Steganography embedded with Advance Encryption Standard
(AES) securing with SHA-256.
https://www.semanticscholar.org/paper/Image-Steganography-
embedded-with-Advance-Standard-Singhal-Shukla/
18b76de130ba5e0ca121052190e4012c20c625e9?p2df