You are on page 1of 8

One Time Password – New

Dimensions in Security
Basics

Rajesh Mago

Difficulty

There has been a sharp increase in e-commerce and online


banking transactions in recent times. Remote access to the office
network has resulted in ease and convenience of work. Due
to this, there is increase in online network access usage. The
flip side of this is the attempt by parties interested in stealing
vulnerable passwords and leading to potential security breaches.

T
he traditional way of accessing the Refer to the following section for explanation of
network using username and the same important terms required for understanding the
static passwords no longer suffices. rest of the article.
The need for automated and stricter authen-
tication has led to the quest for offline and Some important Terms
online authentication methods to allow secure Token: The term token is used to refer to the
access to physical and network resources. hardware and software that generates and
Hence, One Time Password (OTP) technol-
ogy that generates and displays a unique
password typically valid for a few seconds is What you will learn...
increasingly in demand. OTP based authenti- • Information concerning the background and
cation is a simple and secure way of verifying present day applications of OTP technology
the user credentials and granting access to • Working of OTP systems, software processes
the resources. The generated OTP is unique and mathematics
per session and valid for a set time only, re- • The main types of OTP technologies currently
ducing the chances of a fraudster using it in in use
real time. • Pros and cons of using OTP technology
An OTP system generally requires the • Leading vendors and products connected with
this technology
user to present two kinds of evidence to verify
his/her identity. Therefore, it is also known as
two-factor authentication. The required proofs
are:
What you should know...
• How common protocols like Ethernet, TCP/IP or
• A token with a unique serial or unique key ARP work
embedded in it • Internet links for further reading are given.
• A PIN or a secret password memorized by
the user

2 hakin9 2/2008 www.hakin9.org/en


One Time Password

displays OTP. The hardware token is RADIUS – Remote Access with a pre-existing organizational
available in the form of car size key Dial In User Service (RADIUS) is remote network having RADIUS,
ring, smart card and the software to- a popular and widely used protocol the RADIUS server has to work
ken can be installed in mobile, PDA that is used to grants access to with the OTP validation server for
and PC etc. the remote users. It is installed on authorizing a new user.
Validation server : The OTP a server and an OTP user has to MiTM attack – Man in the Mid-
validation server has the software get authenticated through it before dle attack or replay attack is done
to verify the unique OTP generated accessing the network resources. by a fraudster using one or more
by the token. In an OTP system, When an OTP solution is integrated identity stealing techniques such
there are usually several clients
using their OTP simultaneously.
The OTP server verifies their Validation Server with time
passwords and gives them suit- synchronized to the token or
able access. This is done by inte- having the challange

grating the OTP validation server


External data
with other enterprise servers and (time, challenge etc.)
infrastructure. OTP integration and from the OTP server
validation can also be implemented
through installation of the propri- Calculation of data Personal Authentication:
to be encrypted data or counter etc.
etary Application Programmable
Interface (API). Data ready
DES: Digital Encryption Standard for encrvotion

(DES) is a 56 bit encryption standard


used by some of the OTP generating
devices. Encryption Algorithm
(DES/ MD5/ SHA-1)
S/KEY: A free One Time Pass-
word generating scheme from Bell- Binary Data Secret Key
core used in UNIX like operating ready for
systems. formatting

HOTP: Hashed Message Au-


thentication Code (HMAC) One Formatting Configuration
Time Password is an open, non-
proprietary standard developed by
the Open Authentication Initiative
(OATH).
Seed: A unique random number
Generated unique OTP
secret generated by the OTP Server
(One Time Password)
or chosen by the user. Seed is of 6 or more letters/numbers
a starting value to produce other typically walid for few second

numbers.
OPIE – OTP in Everything is
a commercialized version of S/KEY Figure 1. The general OTP calculation Process
(password generation scheme) trade
marked by Bellcore.
Token
PKI – Public Key Infrastructure Management
(PKI) is used for digital certificate System
Active Directory
creation, publication, renewal and
revocation. It helps a user on in- Secure Gateway
eToken
secure public network like Internet RADIUS
Server
to perform transactions securely www
by using public and private crypto-
Web
graphic key pair. These public and Internet Connection
Aplication
private keys are available and shared
through a trusted authority. Some
Third-Party
smart card based OTP products of- Applications
fer PKI along with generation of One
Time Password. Figure 2. Etoken OTP authentication solution implementation in a network

www.hakin9.org/en hakin9 2/2008 3


Basics

as keystroke loggers, trojans, the hardware token or permute the is generated on pressing of a but-
phishing emails and proxy servers. current password value from the ton (an event). The battery of the
These attacks can compromise the token. In some cases, the secret Challenge Response system lasts
credentials of user having OTP on is merely entered by the user along longer compared to a Synchronous
a network. These types of attacks with the password generated by the system as it is powered ON only
are effective if the fraudster is able token. when required.
to crack the OTP and is able to Problems: The hot and cold
use it in real time before the actual weather may cause a time drift at Problems
OTP user or expiry of the OTP. The the token end resulting in time lag Some users are not keen on using
network user having OTP for au- between the server and the token. Challenge Response as it is cum-
thentication can minimize the MiTM Though increasing the allowable bersome. Also, the server and token
attacks by being alert, knowledge- time window setting at server end get out of sync in case the response
able and equipped with tools like can solve the problem, this lowers is calculated at user end based on
anti keyloggers, anti spyware and the security levels. Also, the bat- server challenge but not entered
trojans cleaner, etc. tery of the clock-based token gets due to some reason. In such situ-
used quickly as it always remains ations, the manual reset is done at
Types of OTP ON. the server end to make that token in
Technologies sync with the OTP server again.
& Their Problems Challenge-Response or
The idea behind OTP authentica- Asynchronous or Types of OTP Products
tion was first proposed by Leslie Event Based System Based on physical looks and OTP
Lamport. These days, OTP systems With Challenge-Response (C-R) technology implementation, the OTP
use the modified version of Les- based OTP system, the PC user token can be one of the following
lie Lamport OTP generation and sends a username to the server. types:
verification algorithm. Based on The server responds with the chal-
the algorithm functioning of OTP lenge number, a random value R de- • Pre-printed passwords list: In-
systems (tokens and validation pending on the username. The user dexed Transaction Authentica-
server), they are generally classified calculates a response, Re =f(R,P) tion Number (iTAN) is a form of
into two major types, namely Clock where P is the secret password OTP used by banks to authorize
based/Synchronous or Challenge- known to the user. The response financial transactions. For each
Response/Asynchronous. Re is generated automatically at the of its user, the bank generates
user end by entering R into the token a pre-printed list of iTAN’s each
Clock Based or device. The result Re displayed at of which is 8 characters long.
Synchronous OTP System the token device is the combination Normally, the user has to col-
When using Clock based OTP of the challenge number, R and the lect the list of iTAN passwords
systems, the new and unique pass- secret password, P. The user enters from the bank. An additional 5
words are generated by the token the result at the PC and sends it digit logon password is posted
typically every 30-60 seconds. The to the server. The server knows to the user. A financial trans-
server synchronizes the token and the secret password for that token action is completed only if the
the remote machine that the user device or username and performs user provides the specific iTAN.
is attempting to access. When the a similar function to match the In some implementations, the
user wishes to log in, he/she must challenge and response. The user user is supplied the iTAN via
provide the current password from gets authenticated if Challenge and SMS.
their token. The user also has an- Response successfully matches. • Hardware keychain token – As
other memorized secret that is also The software used to handle C-R at the name suggests, this type of
known to the remote machine. This user PC is called a soft token. The token is in the form of a keychain
secret is sometimes used to unlock C-R based OTP token is also re- that is battery powered and typi-
ferred to as Event based since OTP

Figure 3. Authenex A-Key 3200


token Figure 4. A-Key 3500 token Figure 5. A-Key 3600 token

4 hakin9 2/2008 www.hakin9.org/en


One Time Password

cally has a power ON/OFF but- zations that want the strength gram that stores the user’s secret,
ton. It generates and displays an of OTP authentication without an alphanumeric seed and an itera-
OTP each time upon activation. overhead and cost of hardware tive counter. The OTP is created by
It doesn’t require any PIN to be installation. combining the secret with the seed
activated. This type of token then applying the MD5 hashing to it
is used in Synchronized OTP Diagrammatic as many times as the value of the it-
calculations where the OTP vali- Description of the erative counter and then shortening
dation server and the OTP hard- OTP Calculation it to six words. At login, the user is
ware token clocks are aligned Process challenged by the host server, which
with each other. Each hardware OTP whether it’s time based (syn- he/she enters into the OPIE calcula-
keychain token has a unique chronous) or event based (asynchro- tor program followed by the secret
serial number that identifies it nous) is generated as shown in the password. The response is entered
uniquely at the OTP server end. accompanying Figure 1. in the login window and verified by
Most of the hardware tokens dis- the host. OPIE is distributed with the
play six or more numeric or al- Details of Software FreeBSD operating system and can
phanumeric characters on their Processes Involved be easily configured by the user.
LCD. in OTP Generation HOTP is a recently developed,
• Hardware card type token – This The key processes involved in OTP popular algorithm that provides more
type of token is in the shape of generation in two systems, namely secure OTP’s. HOTP is developed
a credit card and has both nu- S/KEY and HOTP will be explained and recognized by OATH, a group
meric and function keys. Card in this section. In S/KEY system, h of leading authentication solution
type token is typically used in is a one-way hash function. The providers. The biggest advantage
unsynchronized applications initial seed (unique secret) k is of developing products based on
which don’t require any clock chosen by the user or provided by OATH standards is that can be eas-
alignment of the OTP server the server. The seed should not be ily integrated with each other due to
and OTP token. The card type disclosed. open standards. The process is as
token uses challenge/response The S/KEY system calculates: follows:
mode. The challenge from the h ( k ) = k1 , h ( k1 ) = k2 ...... h ( kn −1 ) kn . The initial
validation server is different for seed k must be discarded. • Generation of the shared secret
each token device. The response The OTP’s are generated in – The shared secret can be
sent from the token to the server reverse order or LIFO (Last In First generated using an encrypting
through a network and is based Out), i.e., p1 = kn , p 2 = kn−1....., pn−1 = k2 and algorithm like Message Digest
on a mutually agreed predefined pn = k1 and the same is provided to 5 (MD5) or Secure Hash Algo-
algorithm. user in printed form. The server dis- rithm 1 (SHA-1). MD5 functions
• Smart Card Token (with USB or cards the first n −1 passwords and like a unique fingerprint of a file
PCMCIA reader) – The Smart stores only the last password that that is used for file comparison
Card token is a software imple- will authenticate the user. S/KEY
mentation of the hardware token. system is not very popular at present
It is used by the organizations as it can secure only the password
that want additional security of and not the entire session. OPIE
photo id and proximity door ac- is a more secure OTP system than
cess. S/KEY, as it uses a stronger crypto-
• Software token – It is a two-fac- graphic hashing function (MD5). The
tor authentication program that OPIE system uses an Opiekeys pro-
can be installed on computers,
PDA’s, mobile phones and USB
drives. It’s suitable for organi-

Figure 8. Cryptocard software token


Figure 6. A-Key 4500 token Figure 7. Cryptocard software token for pocket PC

www.hakin9.org/en hakin9 2/2008 5


Basics

and controlling their integrity. It provisioned to the client token • OTP Authentication – The appli-
is also used in creation and ver- (hardware). The secret can also cation server passes the user’s
ification of digital signatures. be provided in the form of soft OTP value to the validation serv-
However, as certain flaws in token on a PC, mobile device and er that matches the token id for
MD5 make it vulnerable, cryp- PDA, etc. that user. The server calculates
tographers recommend the use • OTP Generation – The OATH its own HOTP value based key
of SHA-1 algorithm. The work- HOTP algorithm uses a counter and the current counter value and
ing of HOTP is based on the based on HMAC-SHA-1 cryp- compares it to the OTP sent by
standard challenge-response tographic standard. The client the user. The result of the valida-
algorithm. It uses SHA -1 hash token generates a 20 byte (160 tion is passed to the application
function to create a secret key bit) SHA-1 value based on se- server. The application server
that is shared between a token cret key and a unique counter makes the decision of granting
and a validation server. In this, value already embedded in it. or rejecting the user authentica-
a unique 160 bit shared secret The secret key is static while the tion based on the combination of
(SHA-1) is generated for every counter value increments each static password and the OTP.
OTP token and stored securely time an OTP is needed. The final
at the OTP validation server. value is truncated to a minimum Mathematical
Each unique secret is associ- of six digits so that the OTP Processes Underlying
ated with a unique token id at value can be displayed at the the HOTP Algorithm
the validation server. This helps token. The calculated Hashed The mathematical calculations of
in identifying the token device. Message Authentication Code HOTP algorithm are as follows:
Each OTP generator at user (HMAC) is then used to check
end has a unique secret. In an the integrity and authenticity of • C = The 8 byte counter value
OTP system, the OTP validation the information transmitted. • K = The 20 byte shared secret
server and clients (having OTP • OTP submission by user for au- • Digit = Number of digits in a gen-
tokens) must have the same thentication – The network user erated HOTP
hashing algorithm at their ends. who wants to access a service
The stronger versions than on network is prompted for The Shared secret (K) and the
SHA-1 are SHA-224, SHA-256, username, static password and increasing counter value are com-
SHA-384, and SHA-512 where the dynamic OTP password (dis- bined to generate a 20 byte string
the numbers 224, 256, 384 and played on the token) via a login using the HMAC-SHA1 algorithm
512 denotes the bit length of the screen. The user enters the user- Let us be the binary string. The
digest. name, static password followed number of characters in the string
• Secure Provisioning of the secret by the OTP value and these is n. Then the string can be given by
– The secret key is stored on the values are sent to the application – s = s [0] s [1] s [ 2].........s [ n − 1] A Dynamic
validation server and securely server. truncation function Dtruncate or DT

Network with OTP System

Figure 9. Cryptocard software token Figure 10. Photo showing a laptop user requesting access and OTP
for Blackberry password sent from the OTP system to his/her mobile for authentication

6 hakin9 2/2008 www.hakin9.org/en


One Time Password

is then used to truncate the value OTP generations in 7 years. • Calculator Style Hardware token
of the 20 bit string to something the URL: http://www.aladdin.com/ • Smart card token (SC-1) with
user can enter, typically a 4 byte etoken/devices/pass.aspx USB or PCMCIA reader
string. Denote this 4 byte string by • Etoken NG-OTP: OTP and • Software token for PC, WinCE or
Sbits. Define a function StToNum smart card token authentication Blackberry
that converts the binary string to and security (encryption and • USB Hardware/Smart card token
a number- digital signing) product. URL: (UB-1)
Then Snum = StToNum (Sbits), http://www.aladdin.com/etoken/
where Sbits lies between 0 and 15. devices/ng-otp.aspx For more details, check: http:
Calculate the HOTP value = Snum • Etoken OTP authentication solu- //www.cryptocard.com /products /,
modulo 10^Digit where D lies between tion: It can be integrated with RA- Figure 7-9.
0 and modulo 10^(Digit)-1 DIUS application, VPN (Virtual
private network) and web access CRYPTOCard Software
Leading OTP solutions. token on a PC, PDA and
Authentication • URL – http://www.aladdin.com/ Blackberry
Products Suppliers etoken/otp.aspx NordicEdge OTP server adds
There are many vendors providing another layer of security by send-
OTP related solutions and it’s not Authenex Inc. ing the OTP to the user mobile or
possible to cover all of them here. Authenex A-Keyseries of tokens are: email address after authenticating
Some leading OTP vendors, their him/her. The server can work with
products and features are given in • A-Key 3200 token: USB type, sturdy Citrix, MS Outlook Web Access,
alphabetical order: and uncompromised, supports C-R. MS IIS and VPN’s. In areas where
URL – http://www.authenex.com/ GSM reception is not available on
Aladdin Knowledge Systems authenex-products/akey-token- mobiles, pre-defined passwords
3200.html (Figure 3) are available Figure 10. URL:
• Etoken Pass OTP token: Hard- • A-Key 3500 token: USB OTP Au- http://www.nordicedge.se/produkt_
ware keychain portable token thentication, supports C-R and dig- otp.shtml
having battery lifetime of 14,000 ital certificate storage. URL: http:
//www.authenex.com/authenex- SafeWord
products/akey-token-3500.html SafeWord Silver 2000 : Comes
(Figure 4) in a simple touch button key fob
• A-Key 3600 token: Six digit package. The one time passcode
OTP authentication. URL: http: is combined with a user PIN to
//www.authenex.com/authenex- provide two-factor authentication
products/akey-token-3600.html (Figure 11).
(Figure 5)
Figure 13. SafeWord Platinum • A-Key 4500 token: USB authen- SafeWord Silver token
tication, supports C-R, up to 1GB Platinum and Gold 3000 : A PIN is
storage and password protection. needed to activate Platinum and
URL: http://www.authenex.com/ Gold tokens. Gold 3000 token has
authenex-products/akey-token- an onboard PIN pad that fits on a key
4500.html (Figure 6) ring, while the Platinum token has
• Authenex Strong Authentication PIN pad in a calculator-style case.
System, ASAS: It’s a network se- The OTP generated after entering
curity application for big organi- the PIN is entered by the user in the
zations that want to provide two login form to perform authentication
Figure 12. SafeWord Gold 3000 factor authentication to remote, (Figure 12-13).
web and VPN users. URL: http: Premier Access: Authentica-
//www.authenex.com/authenex- tion solution to applications such
products/asas-system.html as VPN’s, Citrix, Outlook web ac-
cess, RADIUS, Windows domain,
CRYPTOCard terminal services and UNIX host
Some of the OTP token products logins.
(hardware and software) from
CRYPTOCard are: Vasco
A leading company selling patented
Figure 11. SafeWord Silver 2000 • Key chain hardware token (KT-1) hardware and software OTP authen-

www.hakin9.org/en hakin9 2/2008 7


Basics

tication products and solutions used matic secret (challenge based) easy to use hardware token
for banking, ecommerce and remote for a particular user. The secrets that provides strong OTP au-
access applications. The complete are erased after the card is re- thentication. It can support
Vasco OTP product details are at: moved. The battery life is 3 to 5 either a time-based algorithm
http://www.vasco.com /products / years (Figure 16). or an event-based algorithm,
literature.html Some of its OTP prod- • VACMAN: A software product depending on an organization
ucts are: that gets installed at server side. business and security needs
It coordinates the authentication (Figure 19).
• DIGIPASS GO 1: A snap open of users using DIGIPASS OTP
ultra portable, ultra easy and tokens. Pros and cons
stylish hardware token. It can of OTP Technology
support either time synchronous Verisign Like any other technology, OTP has
or event synchronous encryp- Verisign offers various one time pass- several benefits as well as draw-
tion. It has a lifetime of 5 years words products. For complete details backs.
and the OTP changes every 32 of OTP solutions from Verisign,
seconds. The other GO series visit the website www.verisign.com. Pros
products are GO 2, GO 3 and Some of the products are:
GO 6 (Figure 14). • OTP technology provides a unique
• DIGIPASS 300 Comfort Voice • VeriSign Multipurpose Next- and changing password that is
(DP300 CV): A PIN based au- Generation Token: All-in-one typically valid for few seconds
thentication product designed security token that can gener- per session. Hence, it’s a much
to be used by visually impaired ate dynamic one time pass- stronger authentication solution
users. It provides speech based words (OTP’s) and store digital as compared to simple username/
user guidance and feedback of certificates (for PKI-based au- password authentication
entered data and selected func- thentication, encryption, digital • Solves the potential problem of
tions. The DP300 CV token has signing, and non-repudiation) someone guessing an authorized
large display and easy to use as well as smart card informa- user’s password.
keys (Figure 15). tion (Figure 17). • Due to automation and more
• DIGIPASS Pro 800 : A simple to • VeriSign Secure Storage Token: secure generation of one time
use, intelligent, portable, platform Industry’s first all-in-one PIN passwords compared to static
independent, and smart card based token to have OTP and passwords, the password re-
based OTP token device. After PKI authentication with secure lated helpdesk calls should get
the card is inserted and PIN is storage and smartcard technol- reduced.
entered, it generates the auto- ogy. It is a combined portable • In some implementations of
solution for authentication and OTP, a user is allowed to use
encryption mechanisms to safe- the password generated by OTP
guard employee’s credentials token to access all the network
and sensitive information (Fig- services. This saves him/her
ure 18). time and efforts from manage-
• VeriSign One-Time Password ment of multiple different pass-
Token: An economical and words required for each of the
online servers.

Cons

• The cost of deployment can


Figure 15. DP 300 CV be high as tokens and valida-
tion server etc. needs to be
purchased, integrated and
maintained. The hardware to-
kens provided by some of the
vendors expire as the battery
needs replacement. This adds
a further cost to the IT budget of
an organization.
• The hardware token has to be
Figure 14. DIGIPASS GO 1 Figure 16. DIGIPASS Pro 800 always carried and users have

8 hakin9 2/2008 www.hakin9.org/en


One Time Password

About the Author


The author is a Computer Science Engineer based in New Delhi, India. He has exten-
sive experience in technical support and networking. He presently works as an inde-
pendent Consultant specializing in technical writing and support services in computers
and networks. Email: rajeshmago@netscape.net

On the ‘Net
• Using OTP on FreeBSD system, http://www.onlamp.com/pub/a/bsd/2003/02/06/
FreeBSD_Basics.html
• One Time Password, http://en.wikipedia.org/wiki/One-time_password
• RFC 2289, A One Time Password System, http://www.ietf.org/rfc/rfc2289.txt
• RFC of HMAC based One Time Password (HOTP) Algorithm, ftp://ftp.rfc-
editor.org/in-notes/rfc4226.txt
• http://www.aladdin.com/etoken/otp.aspx
• http://www.authenex.com/authenex-products/asas-system.html
• http://www.cryptocard.com/products/

to enter an additional code inconvenient to some of the us-


before getting access to re- ers, but they should get used to
sources. This might be slightly it over time.
• OTP technology is not completely
secure and prone to MiTM at-
tacks.

Future directions
OTP systems can be made more
secure by introducing another
factor of authentication such as
Biometrics, making it a three factor
Figure 17. VeriSign Multipurpose or multi factor authentication. Bio-
Next-Generation Token metrics constitutes the automated
measurement of biological and
behavioral features that uniquely
identify a person. This may involve
electronic scanning of fingerprints,
hand, iris, voice or keyboarding pat-
terns. The digitized information is
then matched with the stored infor-
mation. Including third factor of au-
thentication is likely to increase the
Figure 18. VeriSign Secure Storage cost of the overall authentication
Token solution. Therefore, the organiza-
tion implementing the OTP solution
has to evaluate the costs versus
benefits of the solution. l

Acknowledgement
The author would like to acknowledge
and thank Andrew Dubinsky for his
Figure 19. VeriSign One-Time help in writing this article.
Password Token

www.hakin9.org/en hakin9 2/2008 9

You might also like