Google Authenticator
![]() | |
Տեսակ | authenticator? |
---|---|
Հեղինակ | |
Նախագծումը՝ | Գուգլ |
ՕՀ | Android, iOS, BlackBerry OS |
Լույս տեսավ՝ | 2010-9-20 )[1] |
Պլատֆորմ | բջջային |
Վերջին կայուն տարբերակ | 1.02 (նոյեմբերի 9, 2016)[2] |
Արտոնագիր | proprietary software license?[3] |
Կայք | github.com/google/google-authenticator-libpam |
Աղբյուր կոդ | github.com/google/google-authenticator և github.com/google/google-authenticator-android |
Google Authenticator, Google-ի կողմից թողարկված երկփուլ աուտենտիֆիկացման հավելված, որը աշխատում է Time-based One-time Password Algorithm (TOTP) և HMAC-based One-time Password Algorithm (HOTP) ալգորիթմների շնորհիվ։ Ծառայությունը իրականացնում է [rfc:6238 RFC 6238-ում] և [rfc:4226 RFC 4226-ում] նշված ալգորիթմները[4]։
Authenticator-ը 6- կամ 8-նիշանի, միանգամյա օգտագործման համար նախատեսված թվային գաղտնաբառ է, որը օգտագերը պետք է ներկայացնի մասնակցային հաշվի և գաղտնաբառի հետ՝ Google-ի կամ այլ ծառայությունների ծառայությունները մուտք գործելու համար։ Authenticator նաև կարող է կոդ ստանալ կողմնակի հավելվածների համար, ինչպիսիք են, օրինակ, գաղտնաբառերի մենեջերները և ֆայլերի հոսթինգի ծառայությունները։ Հավելվածի նախկին տարբերակները բաց կոդով մատչելի էին GitHub-ում, բայց վերջին տարբերակները Google-ի սեփականությունն են[5]։
Օգտագործման օրինակ[խմբագրել | խմբագրել կոդը]
Որպես կանոն, ի սկզբանե օգտատերերը պետք է հավելվածը ներբեռնեն և տեղադրեն իրենց բջջային սարքերում։ Կայք մուտք գործելու կամ ծառայության ծառայություններով օգտվելու համար, պետք է ներմուծել մասնակցային հաշիվը և գաղտնաբառը, բացել Authenticator հավելվածը և հատուկ դաշտում ներմուշել միանգամյա օգտագործման համար նախատեսված գաղտնաբառը։
Դրա համար կայքը օգտագիրոջը տրամադրում է ընդհանուր գաղտնի բանալի, որը պետք է պահպանված լինի Google Authenticator հավելվածում։ Այդ գաղտնի բանալին կօգտագործվի բոլոր հետագա կայք մուտքերի համար։
Երկփուլ աուտենտիֆիկացման շնորհիվ գաղտնաբառի/մասնակցային հաշվի իմացությունը բավական չէ մասնակցային հաշիվը ջարդելու համար։ Չարագործը նաև պետք է իմանա գաղտնի բանալին կամ պետք է Google Authenticator-ով սարքին ֆիզիկական մուտք ունենա։ Այլընտրանքային տարբերակ է MITM հարձակումը՝ եթե օգտատիրոջ համակարգիչը վարակված է տրոյանով, ապա մասնակցային հաշիվը, գաղտնաբառը և միանգամյա օգտագործման համար նախատեսված գաղտնաբառը կարող են խափանվել՝ սեփական մուտքի սեսսիան նախաձեռնելու կամ օգտատիրոջ ու կայքի միջև ինֆորմացիան փոփոխելու համար։
Իրականացումներ[խմբագրել | խմբագրել կոդը]
Google Authenticator տրամադրված է Android-ի[6], BlackBerry-ի, և iOS-ի համար[7]։ Նաև առկա են մի քանի կողմնակի իրականացումներ՝
- Windows Phone 7.5/8/8.1/10: Microsoft Authenticator[8] Virtual TokenFactor[9]
- Windows Mobile: Google Authenticator for Windows Mobile[10]
- Java CLI: Authenticator.jar[11]
- Java GUI: JAuth[12] FXAuth[13]
- J2ME: gauthj2me[14] lwuitgauthj2me[15] Mobile-OTP (Chinese only)[16] totp-me[17]
- Palm OS: gauthj2me[18]
- Python: onetimepass[19]
- PHP: GoogleAuthenticator.php[20]
- Ruby: rotp[21], twofu[22]
- Rails: active_model_otp[23] (third party implementation)
- webOS: GAuth[24]
- Windows: gauth4win[25] MOS Authenticator[26] WinAuth[27]
- .NET: TwoStepsAuthenticator[28]
- HTML5: html5-google-authenticator[29]
- MeeGo/Harmattan (Nokia N9): GAuth[30]
- Sailfish OS: SGAuth[31], SailOTP[32]
- Apache: Google Authenticator Apache Module[33]
- PAM: Google Pluggable Authentication Module[34] oauth-pam[35]
- Backend: LinOTP (Management Backend implemented in python)
- Chrome/Chrome OS: Authenticator[36]
- iOS: OTP Auth[37]
Տեխնիկական բնութագիր[խմբագրել | խմբագրել կոդը]
Ծառայություն մատուցողը յուրաքանչյուր օգտատիրոջ համար ստանում է 80-բիթանոց գաղտնի բանալի (սակայն RFC 4226 §4-ը պահանջում է նվազագույնը 128 բիթ և խորհուրդ է տալիս 160 բիթ)[38]։ Բանալին տրամադրվում է Base32 կոդավորմամբ 16-, 26-, 32-նիշանի տողի կամ QR-կոդի տեսքով։ Գաղտնի բանալու միջոցով կլիենտը ստեղծում է HMAC-SHA1
- TOTP-ի տարբերակի համար՝ «UNIX-ի դարաշրջանի» 30-վայրկյանանոց ինտերվալների քանակից
- և հաշվիչից, որը մեծացվում է ամեն HOTP տարբերակի համար ամեն նոր կոդով։
Հետո HMAC -ի մի մաս հանվում է փոխակերպվում է 6-նիշանի կոդի։
Կեղծ կոդ Time-based OTP-ի համար[խմբագրել | խմբագրել կոդը]
function GoogleAuthenticatorCode(string secret)
key := base32decode(secret)
message := floor(current Unix time / 30)
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
Կեղծ կոդ 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
Ծանոթագրություններ[խմբագրել | խմբագրել կոդը]
- ↑ «Google Is Making Your Account Vastly More Secure With Two-Step Authentication - TechCrunch»։ TechCrunch։ 2010-09-20։ Վերցված է 2016-03-12
- ↑ Release 1.02 — 2016.
- ↑ https://gitlab.com/fdroid/fdroiddata/commit/978d5782d61c29a809f25a5fc0b67345c17b2827
- ↑ «GitHub - google/google-authenticator: Open source version of Google Authenticator (except the Android app)»։ GitHub (անգլերեն)։ Google։ «These implementations support the HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238.»
- ↑ Willis, Nathan (22 January 2014)."FreeOTP multi-factor authentication". LWN.net. Retrieved 10 August 2015.
- ↑ 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
- ↑ «[APP]Google Authenticator for Windows Mobile»։ XDA Developers
- ↑ «http://blog dot jamesdotcuff dot net»։ Արխիվացված է օրիգինալից 2014-08-01-ին։ Վերցված է 2018-01-20
- ↑ «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»։ Արխիվացված է օրիգինալից 2017-10-15-ին։ Վերցված է 2018-01-20
- ↑ «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»
- ↑ «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
- ↑ https://tools.ietf.org/html/rfc4226#section-4
Հղումներ[խմբագրել | խմբագրել կոդը]
- Google Authenticator on Google Help
- Google Authenticator legacy source code on GitHub
- Google Authenticator implementation in Python on Stack Overflow