Rozdíly
Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
— |
programovani:otp-prihlasovani [22.04.2013 15:58] (aktuální) vm vytvořeno |
||
---|---|---|---|
Řádek 1: | Řádek 1: | ||
+ | ====== Přihlášení pomocí OTP ====== | ||
+ | * Úvod do OTP -- [[http://blog.agilebits.com/2012/12/20/doing-the-two-step-until-the-end-of-time/]] | ||
+ | * 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]] | ||
+ | * Timebased [[http://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm]] | ||
+ | * 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]] | ||
+ | * KeeOtp [C#] -- [[https://bitbucket.org/devinmartin/keeotp/src/2c8ffea05856b65376d0e61ae58c7d3c87687ee1/KeeOtp?at=default]] | ||
+ | * 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