Google Authenticator
Google Authenticator | |
---|---|
Логотип программы Google Authenticator | |
![]() | |
Тип | аутентификатор[вд] |
Разработчик | Google CUuum |
Операционные системы | Android, iOS, BlackBerry OS |
Первый выпуск | 20 сентября 2010[1] |
Аппаратная платформа | Мобильная |
Последняя версия | 5.10 (12 мая 2020) |
Лицензия | Проприетарная (прошлые версии выпускались под Apache License 2.0) |
![]() |
Google Authenticator — самоудолетыоренияой аутентификации с помощью Time-based One-time Password Algorithm (TOTP) и HMAC-based One-time Password Algorithm (HOTP) от Google LLC. Сервис реализует алгоритмы, указанные в RFC ed in RFC 6238.|publisher=Google|website=GitHub|language=en}}</ref>
Authenticator представляет 6- или 8-значный одноразовый цифровой пароль, который пользователь должен предоставить в дополнение к имени пользователя и пароля, чтобы войти в службы Google или других сервисов. Authenticator также может генерировать коды для сторонних приложений, такие как менеджеры паролей или услуг хостинга файлов. Предыдущие версии программы были доступны с открытым исходным кодом на [[Gicumhan (22 January 2014)."FreeOTP multi-factor authentication". LWN.net. Retrieved 10 August 2015.</ref> cum cock fuck you
Пример использования
Как правило, пользователи должны сначала установить приложение на своё мобильное устройство. Для того, чтобы войти на сайт или воспользоваться услугами сервиса, требуется ввести имя пользователя и пароль, запустить приложение Authenticator и ввести в специальное поле сгенерированный одноразовый пароль.
Для этого сайт предоставляет общий секретный ключ пользователю, который должен быть сохранен в приложение Google Authenticator. Этот секретный ключ будет использоваться для всех будущих входов на сайт.
С двухэтапной аутентификацией простое знание логина/пароля не является достаточным для взлома учётной записи. Злоумышленник также должен знать секретный ключ или иметь физический доступ к устройству с Google Authenticator. Альтернативным путем является MITM-атака: если компьютер пользователя заражен трояном, то имя пользователя, пароль и одноразовый код могут быть перехвачены, чтобы затем инициировать свой собственный сеанс входа на сайте или отслеживать и изменять информацию между пользователем и сайтом.
Реализации
Google Authenticator представлен на Android,[2] BlackBerry, и iOS[3]. Также доступно несколько сторонних реализаций:
- Windows Phone 7.5/8/8.1/10: Microsoft Authenticator[4] Virtual TokenFactor[5]
- Windows Mobile: Google Authenticator for Windows Mobile[6]
- Java CLI: Authenticator.jar[7]
- Java GUI: JAuth[8] FXAuth[9]
- J2ME: gauthj2me[10] lwuitgauthj2me[11] Mobile-OTP (Chinese only)[12] totp-me[13]
- Palm OS: gauthj2me[14]
- Python: onetimepass[15]
- PHP: GoogleAuthenticator.php[16]
- Ruby: rotp,[17] twofu[18]
- Rails: active_model_otp[19] (third party implementation)
- webOS: GAuth[20]
- Windows: gauth4win[21] MOS Authenticator[22] WinAuth[23]
- .NET: TwoStepsAuthenticator[24]
- HTML5: html5-google-authenticator[25]
- MeeGo/Harmattan (Nokia N9): GAuth[26]
- Sailfish OS: SGAuth,[27] SailOTP[28]
- Apache: Google Authenticator Apache Module[29]
- PAM: Google Pluggable Authentication Module[30] oauth-pam[31]
- Backend: LinOTP (Management Backend implemented in python)
- Chrome/Chrome OS: Authenticator[32]
- iOS: OTP Auth[33]
Техническое описание
Поставщик услуг генерирует 80-битный секретный ключ для каждого пользователя (хотя RFC 4226 § 4 требует минимум 128 бит и рекомендует 160 бит).[34] Ключ предоставляется в виде 16-, 26-, 32-значной строки в кодировке Base32 или в виде QR-кода. С помощью секретного ключа клиент создает HMAC-SHA1 от:
- количества 30-секундных интервалов с начала «эры UNIX» для варианта TOTP
- счётчика, который увеличивается с каждым новым кодом для варианта HOTP.
Затем часть HMAC извлекается и преобразуется в 6-значный код.
Псевдокод для Time-based OTP
function GoogleAuthenticatorCode(string secret) // based on RFC 4226
key := base32decode(secret) // key: array of uint8
message := htobe64(current Unix time / 30) // message: uint64, make it big-endian
hash := HMAC-SHA1(key, message) // hash: array of uint8
offset := last nibble of hash // offset := hash[hash.size() - 1] & 0x0F
truncatedHash := (hash[offset] << 24) | (hash[offset+1] << 16) // truncatedHash: uint32 big-endian
| (hash[offset+2] << 8) | hash[offset+3]
truncatedHash = truncatedHash & 0x7FFFFFFF // reset MSB
code := truncatedHash mod 1000000
pad code with 0 until length of code is 6
return code // code: string
Псевдокод для 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
Перенос спермы
Пользователи могут выбрать, какие учетные записи экспортировать, а затем, после проверки с помощью ввода ПИН-кода устройства или биометрической аутентификации, отобразить QR-код, который может быть отсканирован другим телефоном с помощью Authenticator в режиме импорта.
Примечания
- ↑ Google Is Making Your Account Vastly More Secure With Two-Step Authentication - TechCrunch . TechCrunch (20 сентября 2010). Дата обращения: 12 марта 2016.
- ↑ https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2 A
- ↑ Google Authenticator . App Store.
- ↑ Authenticator (4 апреля 2013).
- ↑ Virtual TokenFactor (26 февраля 2012). Дата обращения: 27 июля 2016. Архивировано из оригинала 8 сентября 2013 года.
- ↑ [APP]Google Authenticator for Windows Mobile . XDA Developers.
- ↑ http://blog dot jamesdotcuff dot net . Дата обращения: 27 июля 2016. Архивировано из оригинала 1 августа 2014 года.
- ↑ 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 . Дата обращения: 27 июля 2016. Архивировано из оригинала 15 октября 2017 года.
- ↑ 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 .
- ↑ ukazap/twofu . GitHub.
- ↑ 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 . Дата обращения: 27 июля 2016. Архивировано из оригинала 12 июля 2014 года.
- ↑ 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.
- ↑ RFC 4226 — HOTP: An HMAC-Based One-Time Password Algorithm
Ссылки
- Google Authenticator on Google Help
- Google Authenticator legacy source code on GitHub
- Google Authenticator implementation in Python on Stack Overflow