Secure Multi-Factor One-Time Password Generation using PyOTP, SHA-512, and AES-256 Encryption
With the rapid rise of cyber threats, the importance of digital security became even more pronounced. One-Time password (OTP) systems are considered the most widely deployed systems for authentication. Traditional OTP methods can, however, be vulnerable to attacks, such as phishing, replay attacks, and brute-force attempts. This work, therefore, introduces a more secure OTP system that integrates multiple cryptographic techniques for the enhancement of authentication security against these attacks. The system combines three security techniques spanning Time-Based OTP (TOTP) via PyOTP, which gives rise to time-sensitive OTPs via a randomly generated secret key that is therefore valid only for a short period; SHA-512 hashing, which creates the OTP using a unique secret key and a time-based counter, thus increasing unpredictability and decreasing attack vectors; and Advanced Encryption Standard AES-256 encryption, which encrypts the final OTP with a 32-byte key for secure storage and transmission, ensuring that it cannot be accessed without authorization. Combining the TOTP and SHA-512 OTPs and encrypting it with AES-256 delivers the final OTP, which is therefore highly secure. The system was taken through tests by generating multiple OTPs and analyzing security and performance. The results proved that this method increases security without noticeable delay. The encryption protects OTPs against unauthorized interception or modification. The present work shows the development of an enhanced OTP system to advance the authentication process through a multi-layered security process. The combined use of TOTP, SHA-512 hashing, and AES-256 encryption maximizes security for the OTP system against any attacks.
Authors
- S Akash
- S. Gokila (ORCID: https://orcid.org/0000-0002-2803-6959)
Institutions
- Hindustan Institute of Technology and Science (IN)
Publication Details
- Published
- 2025-05-21
- DOI
- https://doi.org/10.1109/icaiss61471.2025.11041781
- Primary Topic
- Chaos-based Image/Signal Encryption
- Type
- article
- Field-Weighted Citation Impact
- 0.00