Přihlášení pomocí OTP
- Oficiální Google projekt – https://code.google.com/p/google-authenticator/
- Nasazení pro SSH loginy – http://linuxdrops.com/use-two-step-verification-for-ssh-using-google-authenticator/#
- libpam-google-authenticator – http://packages.debian.org/wheezy/libpam-google-authenticator
- RFCčka
- TOTP: Time-Based One-Time Password Algorithm – http://tools.ietf.org/html/rfc6238
- HOTP: An HMAC-Based One-Time Password Algorithm – http://tools.ietf.org/html/rfc4226
Implementace
- OTP Sharp [C#] – https://bitbucket.org/devinmartin/otp-sharp/wiki/Home
- Postup pro PHP [PHP] – http://www.idontplaydarts.com/2011/07/google-totp-two-factor-authentication-for-php/
- OTPHP [PHP] – https://github.com/lelag/otphp
Nástin algoritmu
function GoogleAuthenticatorCode(string secret) key := base32decode(secret) message := 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
podrobnosti na http://en.wikipedia.org/wiki/Google_Authenticator
programovani/otp-prihlasovani.txt · Poslední úprava: 22.04.2013 15:58 autor: vm