OTP Authentication
OTP Authentication
OTP Authentication
A report submitted in partial fulfilment of the requirements for the award of the
Degree of
BACHELOR OF ENGINEERING
IN
INFORMATION TECHNOLOGY
BY
DIPTANSHU (BE/10281/14)
MITCHELL MONICA BILUNG (BE/10368/14)
MESRA-835215, RANCHI
2018
DECLARATION CERTIFICATE
This is to certify that the work presented in the report entitled “OTP
Authentication” in partial fulfilment of the requirement for the award
of degree of “Information Technology of Birla Institute of
Technology Mesra, Ranchi” is an authentic work carried out under
my supervision and guidance. To the best of my knowledge, the
content of this thesis does not form a basis for award of any
previous Degree to anyone else.
Mesra, Ranchi.
Index
Acknowledgement
OTP (one time password) is a password that is valid only for one
transaction on a computer system or other digital device. OTP
generation algorithms typically make use of randomness by
making it difficult for the attacker to predict and also hash
functions which can be used to derive a value but are difficult to
reverse. This is important otherwise it would be easy to predict
future OTPs by observing pervious ones.
It is a secure way to provide access to an application or perform a
transaction only one time. The password becomes invalid after it
has been used and cannot be used again.
Introduction
OTP stands for One Time Password. It’s a security technique that
helps us provide protection against various password-based
attacks, especially password sniffing and replay attacks. Its main
purpose is to make difficult to gain unauthorized access to
restricted resources, like a database or a bank account with
sensitive information.
OTP generator more enhanced protection than static passwords,
which remain same for multiple login sessions.
The algorithm used uses random characters and symbols to
create a password so that a hacker cannot interpret it.
Method of Calculation
This OTP is based on the very popular algorithm HMAC SHA.
The HMAC SHA is an algorithm generally used to perform
authentication by challenge response. It is not an encryption
algorithm but a hashing algorithm that transforms a set of bytes to
another set of bytes. This algorithm is not reversible which means
that you cannot use the result to go back to the source.
The algorithm takes the 20 bytes key and the 8 bytes counter to
create an 8 digits number. This means that there will obviously be
duplicates during the life time of the OTP generator but this
doesn't matter as no duplicate can occur consecutively and an
OTP is only valid for a couple of minutes.
Example:
HMAC_SHA1("key", "The quick brown fox jumps over the lazy dog") =
de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9
Phones:
A common technology used for the delivery of OTPs is text
messaging. Because text messaging is a ubiquitous
communication channel, being directly available in nearly all
mobile handsets and, through text-to-speech conversion, to any
mobile or landline telephone, text messaging has a great potential
to reach all consumers with a low total cost to implement.
However, the cost of text messaging for each OTP may not be
acceptable to some users. OTP over text messaging may be
encrypted using an A5/x standard, which several hacking groups
report can be successfully decrypted within minutes or seconds.
Additionally, security flaws in the SS7 routing protocol can and
have been used to redirect the associated text messages to
attackers; in 2017, several O2 customers in Germany were
breached in this manner in order to gain access to their mobile
banking accounts. In July 2016, the U.S. NIST issued a draft of a
special publication with guidance on authentication practices,
which discourages the use of SMS as a method of implementing
out-of-band two-factor authentication, due to the ability for SMS to
be intercepted at scale.
Proprietary tokens :
EMV is starting to use a challenge-response algorithm (called
"Chip Authentication Program") for credit cards in Europe. On the
other hand, in access control for computer networks, RSA
Security's SecurID is one example of a time-synchronization type
of token or HID Global. Like all tokens, these may be lost,
damaged, or stolen; additionally there is an inconvenience as
batteries die, especially for tokens without a recharging facility or
with a non-replaceable battery. A variant of the proprietary token
was proposed by RSA in 2006 and was described as "ubiquitous
authentication", in which RSA would partner with manufacturers
to add physical SecurID chips to devices such as mobile phones.
Recently, it has become possible to take the electronic
components associated with regular keyfob OTP tokens and
embed them in a credit card form factor. However, the thinness of
the cards, at 0.79mm to 0.84mm thick, prevents standard
components or batteries from being used. Special polymer-based
batteries must be used which have a much lower battery life
than coin (button) cells. Semiconductor components must not only
be very flat but must minimise power used in standby and when
operating.
Yubico offers a small USB token with an embedded chip that
creates an OTP when a key is pressed and simulates a keyboard
to facilitate easily entering a long password.[11] Since it is a USB
device it avoids the inconvenience of battery replacement.
A new version of this technology has been developed that
embeds a keypad into a payment card of standard size and
thickness. The card has an embedded keypad, display,
microprocessor and proximity chip.
Web-based methods:
Authentication-as-a-service providers offer various web-based
methods for delivering one-time passwords without the need for
tokens. One such method relies on the user’s ability to recognize
pre-chosen categories from a randomly generated grid of
pictures. When first registering on a website, the user chooses
several secret categories of things; such as dogs, cars, boats and
flowers. Each time the user logs into the website they are
presented with a randomly generated grid of picalphanumeric
character overlaid on it. The user looks for the pictures that fit
their pre-chosen categories and enters the associated
alphanumeric characters to form a one-time access code.
Hardcopy:
In some countries' online banking, the bank sends to the user a
numbered list of OTPs that are printed on paper. Other banks
send plastic cards with actual OTPs obscured by a layer that the
user has to scratch off to reveal a numbered OTP. For every
online transaction, the user is required to enter a specific OTP
from that list. Some systems ask for the numbered OTPs
sequentially, others pseudorandomly chose an OTP to be
entered. In Germany and many other countries like Austria and
Brazil,[14] tho.se OTPs are typically called TANs (for 'transaction
authentication numbers'). Some banks even dispatch such TANs
to the user's mobile phone via SMS, in which case they are called
mTANs (for 'mobile TANs').