1 .\" Copyright (c) 2022, 2023 Omar Polo <op@omarpolo.com>
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 .Nd time-based one time password generator
25 is a time-based one time password generator
27 It reads a secret from standard input and prints the generated password,
28 a numeric code, to standard output.
29 The secret is usually provided by the authenticator
30 .Pq for e.g.\& a website
31 and is either a base32-encoded string or a
34 Blanks in the secret string are ignored, but only one line is read.
37 uses a period of 30 seconds, HMAC-SHA1 and generates six digits long
38 codes, unless the URL specifies otherwise.
43 is meant to be used with
45 or similar application: the secret is stored safely in the password
46 store and then given to
49 .Bd -literal -offset indent
50 $ plass cat 2fa/codeberg/op | totp
57 follows the algorithm outlined in RFC 6238
58 .Dq TOTP: Time-Based One-Time Password Algorithm
59 and uses the base32 encoding as defined in RFC 3548
60 .Dq The Base16, Base32, and Base64 Data Encodings .
62 URIs are parsed as per the
64 proposed by Google Authenticator.
69 utility was written by
70 .An Omar Polo Aq Mt op@omarpolo.com .