hotptool − HOTP one-time password tool
hotptool [OPTIONS]... [KEY [OTP]]...
hotptool 1.0.0
Generate
one−time passwords according to HOTP algorithm.
−h, −−help
Print help and exit
−V, −−version
Print version and exit
−c, −−counter=COUNTER
Counter value
−d, −−digits=DIGITS
Number of digits in one−time password
−w, −−window=WIDTH
Window of counter values to test when validating OTPs
To generate the first one-time password for an all-zero key:
$ hotptool 00
328482
$
To generate the first 10 one-time passwords using the same secret key which is used in the examples of RFC 4226:
$ hotptool -w
10 3132333435363738393031323334353637383930
755224
287082
359152
969429
338314
254676
287922
162583
399871
520489
403154
$
In the last output, the counter for the first OTP was 0, the second OTP had a counter of 1, and so on.
To validate an one-time password use:
$ hotptool -w
10 3132333435363738393031323334353637383930 969429
3
$
The output indicates the counter that was used. It works by starting with counter 0 and increment until it founds a match (or not), within the supplied window of 10 OTPs.
Written by Simon Josefsson.
Report bugs to: simon@josefsson.org hotptool home page: <http://josefsson.org/hotp−toolkit/> General help using GNU software: <http://www.gnu.org/gethelp/>
Copyright
© 2009 Simon Josefsson. License GPLv3+: GNU GPL version
3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and
redistribute it. There is NO WARRANTY, to the extent
permitted by law.
The full documentation for hotptool is maintained as a Texinfo manual. If the info and hotptool programs are properly installed at your site, the command
info hotptool
should give you access to the complete manual.