Google Authenticator
Google Authenticator is an application that implements TOTP security tokens from RFC 6238 in mobile apps made by Google, sometimes branded "two-step verification". Authenticator provides a six- to eight-digit one-time password which users must provide in addition to their username and password to log into Google services or other sites. The Authenticator can also generate codes for third-party applications, such as password managers or file hosting services. Previous versions of the software were open source.
Typical use case
Typically, users will install the Authenticator app on their smartphone. To log into a site or service that uses two-factor authentication, they provide user name and password to the site and run the Authenticator app which produces an additional six-digit one-time password. The user provides this to the site, the site checks it for correctness and authenticates the user.
For this to work, a set-up operation has to be performed ahead of time: the site provides a shared secret key to the user over a secure channel, to be stored in the Authenticator app. This secret key will be used for all future logins to the site.
With this kind of two-factor authentication, mere knowledge of username and password is not sufficient to break into a user's account. The attacker also needs knowledge of the shared secret key or physical access to the device running the Authenticator app. An alternative route of attack is a man-in-the-middle attack: if the computer used for the login process is compromised by a trojan, then username, password and one-time password can be captured by the trojan, which can then initiate its own login session to the site or monitor and modify the communication between user and site.
Implementations
Google provides Android,[1] BlackBerry and iOS,[2] versions of Authenticator. Several third party implementations are available.
- Windows Phone 7.5/8: Authenticator[3] Virtual TokenFactor[4]
- Windows Mobile: Google Authenticator for Windows Mobile[5]
- Java CLI: Authenticator.jar[6]
- Java GUI: JAuth[7] FXAuth[8]
- J2ME: gauthj2me[9] lwuitgauthj2me[10] Mobile-OTP (Chinese only)[11] totp-me[12]
- Palm OS: gauthj2me[13]
- Python: onetimepass[14]
- PHP: GoogleAuthenticator.php[15]
- Ruby: gem[16] (third party implementation)
- Rails: active_model_otp[17] (third party implementation)
- webOS: GAuth[18]
- Windows: gauth4win[19] MOS Authenticator[20] WinAuth[21]
- .NET: TwoStepsAuthenticator[22]
- HTML5: html5-google-authenticator[23]
- MeeGo/Harmattan (Nokia N9): GAuth[24]
- Sailfish OS: SGAuth,[25] SailOTP[26]
- Apache: Google Authenticator Apache Module[27]
- PAM: Google Pluggable Authentication Module[28] oauth-pam[29]
- Backend: LinOTP (Management Backend implemented in python)
- Chrome/Chrome OS: Authenticator[30]
- iOS: OTP Auth[31]
Technical description
The service provider generates an 80-bit secret key for each user (in contravention of RFC 4226 §4[32]). This is provided as a 16, 24 or 32 character base32 string or as a QR code. The client creates an HMAC-SHA1 using this secret key. The message that is HMAC-ed can be:
- the number of 30 second periods having elapsed since the Unix epoch; or
- the counter that is incremented with each new code.
A portion of the HMAC is extracted and converted to a 6 digit code.
Pseudocode for One Time Password OTP
function GoogleAuthenticatorCode(string secret)
key := base32decode(secret)
message := floor(current Unix time / 30)
hash := HMAC-SHA1(key, message)
offset := value of last nibble of hash
truncatedHash := hash[offset..offset+3] //4 bytes starting at the offset
Set the first bit of truncatedHash to zero //remove the most significant bit
code := truncatedHash mod 100000m0
pad code with 0 until length of code is 6
return code
Pseudocode for Event/Counter OTP
function GoogleAuthenticatorCode(string secret)
key := base32decode(secret)
message := counter encoded on 8 bytes
hash := HMAC-SHA1(key, message)
offset := last nibble of hash
truncatedHash := hash[offset..offset+3] //4 bytes starting at the offset
Set the first bit of truncatedHash to zero //remove the most significant bit
code := truncatedHash mod 1000000
pad code with 0 until length of code is 6
return code
Open Source status on Android
The Authenticator app as available on Google's Android app market is proprietary. Although now Google has moved the source for their Authenticator app to its own GitHub repository, in the past this was explained on the project's development page:
"This open source project allows you to download the code that powered version 2.21 of the application. Subsequent versions contain Google-specific workflows that are not part of the project."[33]
An independent fork of the Android version of the software named OTP Authenticator[34] has been created, which was based on the last version of the open source code that had been provided by Google, prior to their move to github. Another Open Source fork named FreeOTP[35] has been published by Red Hat.
Usage
Google Authenticator can be used for the following websites and applications:
- Amazon Web Services[36]
- ANXBTC
- ANXPRO
- Atomic-Trade.com
- App.net[37]
- ArenaNet for access to Guild Wars 2
- BasicBrix[38]
- Bitstamp[39]
- Barracuda SSL VPN
- Bitcoin.de
- Blockchain.info[40]
- BTC-e.com[41]
- Buffer[42]
- CaVirtEx.com
- Cex.io
- CipherGraph Networks[43]
- Circle[44]
- Coinbase[45]
- Comkort[46]
- Cryptsy[47]
- Dashlane[48]
- DigitalOcean[49]
- Doorbell.io[50]
- Dreamhost control panel[51]
- Dropbox[52]
- Drupal (Plugin[53] is needed)
- Dyn.com[54]
- EasyDataMaps[55]
- Esri ArcGIS Online[56]
- Evernote[57]
- EVE Online[58]
- E-coin.io[59]
- Fastmail[60]
- Gaia Online
- Gandi.net[61]
- GitHub[62]
- Guild Wars 2
- Google Apps
- Google Mail
- Heroku
- HootSuite
- Hover[63]
- Joomla (since 3.2 it is built-in)[64]
- KeePass w/KeeOtp plugin
- Keeper (password manager)[65]
- Kickstarter[66]
- LakeBTC
- LastPass[67]
- Linode[68]
- LinOTP[69]
- LocalBitcoins
- Loyalbit Bitcoin Exchange
- Linux (through libpam-google-authenticator)[70]
- MailChimp
- Microsoft account
- MyBB (Admin Control Panel only)
- Mapbox[71]
- Nearlyfreespeech.net [72]
- Net4Game
- Nominet Online Services (for Registrars)
- Okcoin
- OpenVPN
- Pobox[73]
- Portal 2
- privacyIDEA[74]
- RuneScape [75]
- Salesforce.com
- Shopify[76]
- Siteground.com
- Slack.com
- Synology
- SupportPoint[77] (Version 3).
- TACACS.net[78]
- Teamviewer[79] (Version 9).
- tibia[80]
- timetotrade[81]
- TrustedSpace.de[82]
- Tumblr[83]
- VK
- Webmin (Version 1.660 and above)[84]
- WildStar (video game)[85]
- WordPress (S-CRIB OTP Authenticator[86] or Google Authentication[87] plugins needed)
- Xat
- XenForo (Add-on[88] is needed)
References
- ^ https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2 A
- ^ "Google Authenticator". App Store.
- ^ "Authenticator". 4 April 2013.
- ^ "Virtual TokenFactor". 26 February 2012.
- ^ "[APP]Google Authenticator for Windows Mobile". XDA Developers.
- ^ "http://blog dot jamesdotcuff dot net".
- ^ "mclamp/JAuth". GitHub.
- ^ "kamenitxan/FXAuth". GitHub.
- ^ "gauthj2me - Google Authentification in Java Mobile, j2me - Google Project Hosting".
- ^ "lwuitgauthj2me - Google Authenticator for J2ME phones - Google Project Hosting".
- ^ "chunlinyao / mobile-otp — Bitbucket".
- ^ "totp-me - TOTP for Java ME - Google authenticator".
- ^ "gauth.prc - gauthj2me - Google Authenticator for Palm OS (converted from java) - Google Authentification in Java Mobile, j2me - Google Project Hosting".
- ^ "tadeck/onetimepass". GitHub.
- ^ "chregu/GoogleAuthenticator.php". GitHub.
- ^ "rotp - RubyGems.org - your community gem host".
- ^ "heapsource/active_model_otp". GitHub.
- ^ "GAuth".
- ^ "gauth4win - Google Authenticator for windows - Google Project Hosting".
- ^ "MOS Authenticator Home".
- ^ "winauth - Windows Authenticator for Battle.net / World of Warcraft / Guild Wars 2 / Glyph / WildStar / Google / Bitcoin - Google Project Hosting".
- ^ "glacasa/TwoStepsAuthenticator". GitHub.
- ^ "gbraad/html5-google-authenticator". GitHub.
- ^ Techtransit. "Nokia Store: Download GAuth and many other games, wallpaper, ringtones and mobile apps on your Nokia phone".
- ^ "SGAuth".
- ^ "SailOTP".
- ^ "google-authenticator-apache-module - Apache Module for Two-Factor Authentication via Google Authenticator - Google Project Hosting".
- ^ "google-authenticator - Two-step verification - Google Project Hosting".
- ^ "oauth-pam - PAM for use with OAuth Websites - Google Project Hosting".
- ^ "Authenticator".
- ^ "OTP Auth". App Store.
- ^ [1]
- ^ "google-authenticator - Two-step verification - Google Project Hosting".
- ^ "kaie/otp-authenticator-android". GitHub.
- ^ "FreeOTP".
- ^ "Amazon Web Services (AWS) - Cloud Computing Services". Amazon Web Services, Inc.
- ^ "Added security for your App.net account".
- ^ "BasicBrix supports two-factor authentication".
- ^ "Update: Bitstamp adds support for two-factor authentication".
- ^ "Google Authenticator - My Wallet - blockchain.info".
- ^ "BTC-E - Bitcoin Exchange, Namecoin Exchange, Litecoin Exchange, BTC Exchange".
- ^ "2-Step Login".
- ^ "CipherGraph Networks adds 2-Factor Authentication to the CipherGraph Cloud Access Gateway Cloud Security Solution - CipherGraph Networks : VPN for Cloud and Datacenters".
- ^ "What is two-factor authentication (2FA)".
- ^ "Secure Bitcoin Storage - Coinbase".
- ^ "Cryptocurrency Exchange Comkort".
- ^ "Cryptsy - Security".
- ^ Alan Henry. "Dashlane Adds Two-Factor Authentication, a New Interface, and More". Lifehacker. Gawker Media.
- ^ "SSD Cloud Server, VPS Server, Simple Cloud Hosting - DigitalOcean".
- ^ "Doorbell.io - Gather in-app user feedback, simply, across multiple platforms, for free!".
- ^ "Enabling Multifactor Authentication".
- ^ "Dropbox - How do I enable two-step verification on my account?". Dropbox.
- ^ "Google Authenticator login".
- ^ "2FA Using A Mobile App".
- ^ "Signing In with Google Authenticator - EasyDataMaps". EasyDataMaps.
- ^ "Multifactor authentication—ArcGIS Online Help". Esri.
- ^ "Evernote". Evernote Blog.
- ^ "Two-Factor Authentication... finally! - EVE Community". CCP Games.
- ^ "Easy Bitcoin Investment - Bitcoin Exchange UK - Buy and Sell Bitcoins - Digital Currency Exchange - Debit Card".
- ^ "Secure your Fastmail account with 2-factor authentication".
- ^ "Activating two-factor authentication". 6 March 2014.
- ^ "Two-factor Authentication". GitHub.
- ^ Debbie Browning. "How to: Enable two-step signin on your Hover account". Hover Help Center.
- ^ "JoomlaCode > Projects > Joomla! > Tracker > Joomla! Feature Tracker > Edit Tracker Item".
- ^ "Keeper - Security Disclosure".
- ^ "Backer Questions » Frequently Asked Questions (FAQ) — Kickstarter".
- ^ "Google Authenticator".
- ^ "Linode Blog » Linode Manager Two-Step Authentication".
- ^ LinOTP LinOTP Management Backend
- ^ "login - Google Authenticator for Desktop (lightdm or gdm plugin) - Ask Ubuntu".
- ^ Jeff Miccolis. "Two step verification". Mapbox.
- ^ "NearlyFreeSpeech.NET Blog » Price cuts, more security and recovery options".
- ^ "Pobox Help: Profile and Security Info".
- ^ "privacyIDEA Features".
- ^ Jagex. "RuneScape Authenticator". RuneScape.
- ^ "Two-step authentication". Shopify Manual. Retrieved 21 December 2014.
- ^ http://brukerforum.supportpoint.net
- ^ "FREE TACACS+ Server for Windows".
- ^ "TeamViewer - Free Remote Control, Remote Access & Online Meetings".
- ^ "tibia".
- ^ "timetotrade".
- ^ https://trustedspace.agitos.de/webgui/
- ^ "Account Security".
- ^ "EnhancedAuthentication".
- ^ http://wildstar-online.com
- ^ "WordPress › OTP and Passwords for Google Authenticator, McAfee, DS3 ... « WordPress Plugins".
- ^ "WordPress › Google Authenticator « WordPress Plugins".
- ^ "[FreddysHouse] Two-factor Authentication". XenForo Community.
External links
- Google Authenticator on Google Help
- Google Authenticator open source project on Google Code
- Google Authenticator implementation in Python on Stack Overflow
- Google Authenticator Android package at the F-Droid repository