Loading AI tools
身分驗證器 来自维基百科,自由的百科全书
Google身分驗證器是一款TOTP與HOTP的兩步驗證軟體權杖,此軟體用於Google的認證服務。此項服務所使用的演算法已列於 RFC 6238 和 RFC 4226 中。[2]
開發者 | |
---|---|
首次發布 | 2010年9月20日[1] |
原始碼庫 | github |
程式語言 |
|
作業系統 | Android, iOS, BlackBerry OS |
平台 | 行動裝置 |
許可協定 | 私有許可協定(早期版本為Apache License 2.0) |
Google身分驗證器給予使用者一個六位到八位的一次性密碼用於進行登入Google或其他站點時的附加驗證。其同樣可以給第三方應用生成口令,例如密碼管理員或網路硬碟。先前版本的Google身分驗證器開放原始碼,但之後的版本以專有軟體的形式公開。[3]
使用者通常將身分驗證程式安裝在智慧型手機上,為了登入到使用兩步驗證的網站或服務上,使用者提供使用者名稱和密碼後執行身分驗證器進行額外驗證。 該應用程式會生成六位數的一次性密碼,不同網站則可能會生成同一密碼。
為了使身分驗證器正常工作,安裝執行之前網站必須向使用者提供一組共享金鑰。這組金鑰將會用於未來的所有登入請求。
在兩步驗證的保護之下,僅擁有使用者名稱密碼已不足以駭入帳戶。攻擊者需要這組共享金鑰或者拿到進行兩步驗證的行動裝置。另一種方法是進行中間人攻擊;若使用者的電腦被木馬侵入,則使用者名稱、密碼及一次性密碼都將被木馬所擷取,隨後攻擊者即可利用木馬進行登入、監聽或修改使用者與網站的通訊。
谷歌提供安卓、[4]黑莓和iOS[5]版本的身分驗證器。同時也有第三方版本。
服務提供商為每個使用者生成80位元的金鑰(然而RFC 4226 §4要求使用128位元並建議使用160位元金鑰)。[37] 它以16位元、26位或者32位元base32的字串亦或是二維條碼的方式提供。用戶端使用此金鑰生成HMAC-SHA1。經過HMAC處理過的資訊可能為:
一段雜湊值被提取出來並轉換為6位數密碼。
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
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身分驗證器在Google Play商店上以私有著作權協定發布。Google在GitHub上開放了其身分驗證器原始碼,並陳述如下:
「此開源計劃包含了2.21版本的原始碼。隨後的版本中包含了Google特有的工作流程,與此專案無關。」
最後一個開源的版本在2020年發布。[38]
Android版本的獨立分支之一為FreeOTP[39],其基於Google在GitHub上所開源的最新版本。另外一個較不活躍的分支OTP Authenticator[40]也在Google Play上可供下載。
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.