Professional Documents
Culture Documents
Otp Validation: Project Report On
Otp Validation: Project Report On
Otp Validation: Project Report On
OTP VALIDATION
Manoj Konda
Sl.No. Topic
1 Introduction
2 Objectives
3 Background
5 Coding
6 Output Screenshot
7 Future Scope
8 Conclusion
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 sending 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
This OTP validation is seen at many different applications, Softwares, Data privacy. This ensures only access to
Authorised persons. OTP system will not give permissions to unauthorised persons. During Payments, Data
transfer, etc., person identification is a must. So,
HARDWARE AND SOFTWARE REQUIREMENTS
Libraries Used:
● smtplib - for sending email
● random - to generate 6digit random number
● MIMEtext
● MIMEMultipart
This method is generating a 6 digit OTP and sending it to the email . The Proposed method involves OTP
generation , Send OTP to respective emails, OTP validation (only 3 attempts ), Send Verification gmail.
OTP is generated using python random library . This generated OTP is sent to gmail for person identification.
OTP generated is stored. User enters that OTP , and the system checks whether the OTP is correct or not. If
the OTP entered is correct, send an OTP verified email. If the OTP entered is not correct, the system gives 3
chances to enter a correct OTP.
This is Successful User Authentication.
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