HMAC-based One-time Password Algorithm
HOTP was published as an informational IETF RFC 4226 in December 2005, documenting the algorithm along with a Java implementation. Since then, the algorithm has been adopted by many companies worldwide (see below). The HOTP algorithm is a freely available open standard.
- K be a secret key
- C be a counter
- HMAC(K,C) = SHA1(K ⊕ 0x5c5c… ∥ SHA1(K ⊕ 0x3636… ∥ C)) be an HMAC calculated with the SHA-1 cryptographic hash algorithm
- Truncate be a function that selects 4 bytes from the result of the HMAC in a defined manner
Then HOTP(K,C) is mathematically defined by
- HOTP(K,C) = Truncate(HMAC(K,C)) & 0x7FFFFFFF
For HOTP to be useful for an individual to input to a system, the result must be converted into a HOTP value, a 6–8 digits number that is implementation dependent.
- HOTP-Value = HOTP(K,C) mod 10d, where d is the desired number of digits
HOTP can be used to authenticate a user in a system via an authentication server. Also, if some more steps are carried out (the server calculates subsequent OTP value and sends/displays it to the user who checks it against subsequent OTP value calculated by his token), the user can also authenticate the validation server.
Both hardware and software tokens are available from various vendors, for some of them see references below. Hardware tokens implementing OATH HOTP tend to be significantly cheaper than their competitors based on proprietary algorithms. As of 2010, OATH HOTP hardware tokens can be purchased for a marginal price. Some products can be used for strong passwords as well as OATH HOTP.
Although the reception from some of the computer press has been negative during 2004 and 2005, after IETF adopted HOTP as RFC 4226 in December 2005, various vendors started to produce HOTP compatible tokens and/or whole authentication solutions (see above/below).
According to a paper on strong authentication (entitled "Road Map: Replacing Passwords with OTP Authentication") published by Burton Group (a division of Gartner, Inc.) in 2010, "Gartner's expectation is that the hardware OTP form factor will continue to enjoy modest growth while smartphone OTPs will grow and become the default hardware platform over time."
- Barada Android app for the client side and PAM module for the server side.
- Google Authenticator open-source client for Android, iOS, and BlackBerry, and also PAM module for the server side.
- OATH Toolkit GNU library and command line implementation of client for Linux systems, and also PAM module for the server side.
- LinOTP is an opensource server implementation for HOTP and other tokens.
- Duo Push is an HOTP based Android/iOS app for 2 factor authentication which utilizes Out-of-band Push technology for vastly increased security and ease of use.
- Authy is an Android/iOS app for 2 factor authentication using TOTP.
- multiOTP is an opensource PHP implementation for HOTP, TOTP, mOTP and other tokens. It can be used as a command line tool, integrated in a web site, as a web service, as a radius plugin, etc.
- SailOTP, a free software Sailfish OS client.
- Diodati, Mark (2010). "Road Map: Replacing Passwords with OTP Authentication". Burton Group. "Gartner's expectation is that the hardware OTP form factor will continue to enjoy modest growth while smartphone OTPs will grow and become the default hardware platform over time. ... If the organization does not need the extensive platform support, then OATH-based technology is likely a more cost-effective choice."
- "Security Authentication Tokens - Entrust". Entrust. 2011. "Priced at $5 per token, the Entrust IdentityGuard Mini Token demonstrates that secure, reliable hardware authentication can be had at an attractive price. ... OATH and DES/3DES algorithm support"
- "Password sCrib Tokens - Smart Crib". Smart Crib. 2013. "You can get a token typing 4 updatable passwords and 8 digit OATH HOTP codes for the price of £35, no strings attached."
- "DS3 Launches OathToken Midlet Application". Data Security Systems Solutions. 2006-02-24. "Singapore, Friday, 24 February 2006 - Data Security Systems Solutions is pleased to announce the launch of OathToken Midlet application, an extension of DS3 flagship product - Authentication Server."
- "Android Token". diamondz... AT googlemail.com (not a full address, no better info on author could be found). 2009. "Android Token is a project to create OATH software tokens for the Android platform. Turning a mobile phone into a One Time Password (OTP) generation device which can be used in the place of hardware tokens. ... The project supports both HOTP (Event Tokens) and TOTP (Time Tokens) specifications. ... Code license: GNU GPL v3"
- "StrongAuth". StrongAuth. 2010. "Time-based one-time passcode generator based on HOTP (RFC 4226)."
- Cobbs, Archie L. (2010). "OATH Token". Archie L. Cobbs. "OATH Token is a free and open-source software token for two-factor authentication on the iPhone. OATH Token implements the RFC 4226 HOTP/OATH algorithm standard and is not tied to any proprietary server software."
- "ActivIdentity Soft Tokens". ActivIdentity. 2010. "All ActivIdentity Soft Tokens support the Initiative for Open Authentication (OATH) HMAC-Based One-Time Password (HOTP) algorithm. ... ActivIdentity Mobile Soft Tokens are available on leading handset operating systems, including BlackBerry®, Apple® iPhone®, Windows Mobile, and many other Java 2 Platform, Micro Edition (J2ME) enabled devices."
- Whitbeck, Sean (2011). "OTP Generator for N900". Sean Whitbeck. "OTP Generator for Maemo on the Nokia N900. Supports OATH tokens (HOTP,TOTP) as well as the Mobile-OTP algorithm."
- "SecuriToken". Feel Good Software. 2011. "SecuriToken is an RFC compliant application to create and manage multiple software tokens for the OS X platform. Turning your Mac into a One Time Password (OTP) generation device which can be used in the place of hardware tokens."
- Kearns, Dave (2004-12-06). "Digging deeper into OATH doesn't look so good". Network World. "It may be that OATH will amount to something someday, but so far, it appears to be a stalking horse for VeriSign and that's not a bandwagon we should thoughtlessly jump on."
- Willoughby, Mark (2005-03-21). "No agreement on Oath authentication". Computerworld.
- Kaliski, Burt (2005-05-19). "Algorithm agility and OATH". Computerworld. "Nevertheless, there is still good reason to question whether HOTP is suitable as a standard algorithm for OTP generation, and, more generally, whether such a standard algorithm is even necessary at all."