Generate your own One Time Passcodes (OTP) to use with Android

December 2011 · 1 minute read
  1. Download and build “otptool” from http://code.google.com/p/mod-authn-otp/wiki/OTPTool with the usual dance:

    ./configure
    make
    make install
    
    1. Download and install the Google Authenticator application from the market: https://market.android.com/details?id=com.google.android.apps.authenticator&hl=en on your Android phone

    2. Make up a hex-based secret for the two, like ‘12345678901234567890’

    3. Base32 encode the secret: python -c "import base64,binascii; print base64.b32encode(binascii.unhexlify('12345678901234567890'))"

    4. Open the Google Authenticator app and manually add an account. Put whatever you want for the account name. For the Key, enter the output from step 4. Make sure it is ‘Time based’, Save.

    5. You’ll see a code in the app that rotates every 30 seconds.

    6. run otptool -t '12345678901234567890' or whatever secret you chose.

    7. Should be the same as on the app! Make sure your time is synced and correct on both devices.