OATHTOOL(1) User Commands OATHTOOL(1) (NAME) oathtool - (OATH) (SYNOPSIS) oathtool [OPTION]... [KEY [OTP]]... (DESCRIPTION) OATH. KEY OTP '-' '@'FILE ( ). -h, --help -V, --version --hotp HOTP (=) --totp[=MODE] TOTP ( "SHA1" "SHA256" "SHA512") (=`SHA1`) -b, --base32 Base32 KEY (=) -c, --counter=COUNTER HOTP -s, --time-step-size=DURATION TOTP (=`30s`) -S, --start-time=TIME TOTP (=`1970-01-01 00:00:00 UTC`) -N, --now=TIME TOTP (=`now`) -d, --digits=DIGITS -w, --window=WIDTH OTP -v, --verbose (=) (EXAMPLES) (TOTP) GnuPG : $ gpg --decrypt --quiet ~/.my-totp-secret.asc | oathtool --totp - gpg(1) . ( ) ( ) . : $ gpg --symmetric > ~/.my-totp-secret.asc $ gpg --encrypt --default-recipient-self > ~/.my-totp-secret.asc KEY OTP . . (HOTP) : $ echo 00 | oathtool - 328482 $ OTP . RFC 4226 -w (--window) : $ oathtool -w 10 3132333435363738393031323334353637383930 755224 287082 359152 969429 338314 254676 287922 162583 399871 520489 403154 $ OTP OTP . Base32 -b (--base32) : $ oathtool --base32 -w 3 GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ 755224 287082 359152 969429 $ (whitespace) Base32 (padding) : $ oathtool --base32 --totp "gr6d 5br7 25s6 vnck v4vl hlao re" 977872 $ OTP -c (--counter) : $ oathtool -c 5 3132333435363738393031323334353637383930 254676 $ HOTP OTP : $ oathtool -w 10 3132333435363738393031323334353637383930 969429 3 $ . ( ) OTP . TOTP . --totp : $ oathtool --totp 00 943388 $ . TOTP -N (--now) : $ oathtool --totp --now "2008-04-23 17:42:17 UTC" 00 974945 $ Sun, 29 Feb 2004 16:21:42 -0800 2004-02-29 16:21:42 next Thursday. --date date(1) . MAC TOTP HMAC-SHA1 . MAC HMAC-SHA256 HMAC-SHA512 . --totp . HMAC-SHA256 "SHA256" HMAC-SHA512 "SHA512" . RFC 6238 : $ oathtool --totp=SHA256 --digits=8 --now "2009-02-13 23:31:30 UTC" 3132333435363738393031323334353637383930313233343536373839303132 91819424 $ --window HOTP TOTP . ( ) ( ): $ oathtool --totp 00 -w5 815120 003818 814756 184042 582326 733842 $ TOTP ( ) : $ oathtool --totp -w 5 00 `oathtool --totp 00` 0 $ TOTP -N (--now) : $ oathtool --totp --now="2005-03-18 01:58:29 UTC" -w 10000000 3132333435363738393031323334353637383930 89005924 4115227 $ TOTP . TOTP : . OTP . -s (--time-step-size) : $ oathtool --totp --time-step-size=45s 00 109841 $ ISO-8601 : 1970-01-01 00:00:00 UTC -S (--start-time) : $ oathtool --totp --start-time "1980-01-01 00:00:00 UTC" 00 273884 $ -v (--verbose) . TOTP ( SHA-1) RFC 6238 : $ oathtool --totp -v -N "2033-05-18 03:33:20 UTC" -d8 3132333435363738393031323334353637383930 Hex secret: 3132333435363738393031323334353637383930 Base32 secret: GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ Digits: 8 Window size: 0 TOTP mode: SHA1 Step size (seconds): 30 Start time: 1970-01-01 00:00:00 UTC (0) Time now: 2033-05-18 03:33:20 UTC (2000000000) Counter: 0x3F940AA (66666666) 69279037 $ (AUTHOR) Simon Josefsson. (REPORTING BUGS) : oath-toolkit-help@nongnu.org OATH Toolkit: (COPYRIGHT) (C) 2009-2026 Simon Josefsson. GPLv3+: GPL . : . . OATH Toolkit 2.6.14 January 2026 OATHTOOL(1)