Otp Validation: Project Report On
Otp Validation: Project Report On
Otp Validation: Project Report On
OTP VALIDATION
Manoj Konda
Security and Privacy are most important for an Individual in this Software domain. So, we
should give access to only the authorised individual. Authentication is necessary. That’s how
OTP(one time password) helps . It is a fixed length of random number generated and sent to
the individual for verification , he/she enters OTP for verification.
This Project describes a method of generating a 6 digit OTP and send it to the email for giving
access to authorised individuals. The proposed method guarantees that authenticating to
services, such as Online Banking, ATM Machines, Email verification, Account verifications.
The Proposed method involves :
1. OTP generation (6 digit)
2. Send OTP to respective emails
3. OTP validation (only 3 attempts )
4. Send Verification gmail
OBJECTIVE
OTP exists to prevent unauthorized access. Companies should ensure that unauthorized
access is not allowed and also authorized users cannot make unnecessary modifications. The
controls exist in a variety of forms, from Identification Badges and passwords to access
authentication protocols and security measures.
This project enables us to generate 6 digit otp for verification to prevent Unauthorised access.
BACKGROUND
HARDWARE AND SOFTWARE REQUIREMENTS
1) Software requirements:
● Python 3
● Any IDE
2) Libraries Used :
● smtplib - for sending email
● random - to generate 6digit random number
● MIMEtext
● MIMEMultipart
3) Hardware Requirements:
● A system with 4GB RAM, (any System which supports Python IDE )
CODING
import string
import random
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from getpass import getpass
# OTP Generation
OTP = "".join([random.choice(string.digits) for i in range(6)])
# OTP validation
def authenticate():
i = input("\n\nEnter your Otp : ")
if i == OTP:
print("OTP verified Successfully")
else:
for k in range(3):
print("Invalid OTP\nYou have {} attempts left ".format(3 - k))
i = input("Enter your OTP again:")
if i == OTP:
print("OTP verified Successfully")
break
if k == 2 and i != OTP:
print("Reached Maximum Attempts")
authenticate()
FUTURE SCOPE
Software Technologies are trending now. And I bet it will be trending forever. So, Many programs like Online
Banking system, Gmail Accounts, Netflix Accounts, E-commerce accounts, etc., will be having many and many
users . So User’s security is in trouble only he should be having access to his accounts . Passwords may
sometimes not be the perfect solution for unauthorized access. So, OTP validation will be giving access to
only Authorised persons. This will be included in every software to keep the User account and his details safe.
CONCLUSION
This Project prevents Unauthorised access. OTP validation system secures one's account for his privacy.
REFERENCES