情報基盤センター
目次

用語解説: TOTP

TOTP

時間ベースワンタイムパスワード Time-based One-Time Password の略称で,二要素認証において,所有による認証を行うための方法のひとつです.

TOTPでは,認証サーバ(神戸大学の場合はシングルサインオン基盤KNOSSOSに相当します)が生成した共通鍵を スマートフォンなどで動作するワンタイムパスワード生成器に登録しておきます.

認証を行う際は,共通鍵と現在時刻をもとに暗号論的ハッシュ函数を使って数桁のパスワードを生成します. このワンタイムパスワードを照合することで,予め登録された機器を所持していることを確認することができます.

ワンタイムパスワード認証には次のような利点があります. - ワンタイムパスワードには有効期間(KNOSSOSの場合2分)があり,仮に漏洩してもすぐに失効する - 共通鍵自体はネットワーク上に流れないので,流出の危険性が少ない - ワンタイムパスワードが流出しても,もとの共通鍵を復元することが難しい

一方,認証サーバと登録デバイスの時刻がずれている場合,正しいOTPを生成できない可能性があります. (登録機器の表示時刻は日本標準時でなくても構いません.)

https://www.protectimus.com/blog/totp-algorithm-explained/ の図を改変

TOTP

TOTP is an abbreviation of a time-based one-time passwords and is one of the methods for authentication by possesing factors in two-factor authentication.

A shared secret generated by the authentication server (in the case of Kobe University, KNOSSOS) is registered in a one-time password generator running on a smartphone or similar device by reading a QR code.

OTP consists of several digits generated using cryptographic hash functions based on the shared secret and the current time. When authentication is done, verifying the OTP makes it possible to confirm that the user possesses registered devices.

One-time password authentication has the following advantages

  • The one-time password has a short validity period (2 minutes in the case of KNOSSOS) and expires immediately even if it leaks out.
  • The shared secret is not transmitted over the network, so there is little risk of leakage.
  • Even if the OTP is leaked, recovering the original shared secret is difficult.

If the time of the registered device and the authentication server are out of sync, the authentication may not work correctly. (Displayed time on the registered device does not have to be set to Japan Standard Time.)