diff options
| author | Shulhan <ms@kilabit.info> | 2022-08-25 19:34:30 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-08-25 19:34:38 +0700 |
| commit | dd5fb8eab675b150ce41c0571f1d5e02905d9e9a (patch) | |
| tree | bf7ad4b68b5022d7597de702681414d6a21159f9 | |
| parent | a74359d0344293b7ff40b792f1f3ef0798f72c6b (diff) | |
| download | gotp-dd5fb8eab675b150ce41c0571f1d5e02905d9e9a.tar.xz | |
all: group all documents into directory _doc
| -rw-r--r-- | README | 102 | ||||
| l---------[-rw-r--r--] | README.adoc | 103 | ||||
| -rw-r--r-- | _doc/CHANGELOG.adoc (renamed from CHANGELOG.adoc) | 0 | ||||
| l--------- | _doc/README.adoc | 1 | ||||
| -rw-r--r-- | _doc/index.adoc | 24 |
5 files changed, 128 insertions, 102 deletions
@@ -0,0 +1,102 @@ +// SPDX-FileCopyrightText: 2021 M. Shulhan <ms@kilabit.info> +// SPDX-License-Identifier: GPL-3.0-or-later += gotp +Shulhan <ms@kilabit.info> + +A command line interface to manage and generate Time-based One Time Password +(TOTP). + +== SYNOPSIS + + gotp <command> <parameters...> + +== DESCRIPTION + +add <LABEL> <HASH>:<BASE32-SECRET>[:DIGITS][:TIME-STEP][:ISSUER] + + Add a TOTP secret identified by unique LABEL. + HASH is one of the valid hash function: SHA1, SHA256, or + SHA512. + BASE32-SECRET is the secret to generate one-time password + encoded in base32. + The DIGITS field is optional, define the number digits + generated for password, default to 6. + The TIME-STEP field is optional, its define the interval in + seconds, default to 30 seconds. + The ISSUER field is also optional, its define the name of + provider that generate the secret. + +gen <LABEL> [N] + + Generate N number passwords using the secret identified by LABEL. + +import <PROVIDER> <FILE> + + Import the TOTP configuration from other provider. + Currently, the only supported PROVIDER is Aegis and the supported file + is .txt. + +list + + List all labels stored in the configuration. + +remove <LABEL> + + Remove LABEL from configuration. + +rename <LABEL> <NEW-LABEL> + + Rename a LABEL into NEW-LABEL. + +== ENCRYPTION + +On the first run, the gotp command will ask for path of private key. +If the key exist, all the OTP values (excluding the label) will be encrypted. +The private key must be RSA based. + +One can skip inputting the private key by pressing enter, and the OTP +configuration will be stored as plain text. + +== FILES + +$USER_CONFIG_DIR/gotp/gotp.conf:: Path to file where the configuration and +secret are stored. + +== EXAMPLES + +Add "my-totp" to configuration using SHA1 as hash function, "GEZDGNBVGY3TQOJQ" +as the secret, with 6 digits passwords, and 30 seconds as time step. + + $ gotp add my-totp SHA1:GEZDGNBVGY3TQOJQ:6:30 + +Generate 3 recents passwords from "my-totp", + + $ gotp gen my-totp 3 + gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf + 847945 + 326823 + 767317 + +Import the exported Aegis TOTP from file, + + $ gotp import aegis aegis-export-uri.txt + gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf + OK + +List all labels stored in the configuration, + + $ gotp list + gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf + my-totp + +Remove a label "my-totp", + + $ gotp remove my-totp + gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf + OK + +Rename a label "my-totp" to "my-otp", + + $ gotp rename my-totp my-otp + gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf + OK diff --git a/README.adoc b/README.adoc index 7f8707a..100b938 100644..120000 --- a/README.adoc +++ b/README.adoc @@ -1,102 +1 @@ -// SPDX-FileCopyrightText: 2021 M. Shulhan <ms@kilabit.info> -// SPDX-License-Identifier: GPL-3.0-or-later -= gotp -Shulhan <ms@kilabit.info> - -A command line interface to manage and generate Time-based One Time Password -(TOTP). - -== SYNOPSIS - - gotp <command> <parameters...> - -== DESCRIPTION - -add <LABEL> <HASH>:<BASE32-SECRET>[:DIGITS][:TIME-STEP][:ISSUER] - - Add a TOTP secret identified by unique LABEL. - HASH is one of the valid hash function: SHA1, SHA256, or - SHA512. - BASE32-SECRET is the secret to generate one-time password - encoded in base32. - The DIGITS field is optional, define the number digits - generated for password, default to 6. - The TIME-STEP field is optional, its define the interval in - seconds, default to 30 seconds. - The ISSUER field is also optional, its define the name of - provider that generate the secret. - -gen <LABEL> [N] - - Generate N number passwords using the secret identified by LABEL. - -import <PROVIDER> <FILE> - - Import the TOTP configuration from other provider. - Currently, the only supported PROVIDER is Aegis and the supported file - is .txt. - -list - - List all labels stored in the configuration. - -remove <LABEL> - - Remove LABEL from configuration. - -rename <LABEL> <NEW-LABEL> - - Rename a LABEL into NEW-LABEL. - -== ENCRYPTION - -On the first run, the gotp command will ask for path of private key. -If the key exist, all the OTP values (excluding the label) will be encrypted. -The private key must be RSA based. - -One can skip inputting the private key by pressing enter, and the OTP -configuration will be stored as plain text. - -== FILES - -$USER_CONFIG_DIR/gotp/gotp.conf:: Path to file where the configuration and -secret are stored. - -== EXAMPLES - -Add "my-totp" to configuration using SHA1 as hash function, "GEZDGNBVGY3TQOJQ" -as the secret, with 6 digits passwords, and 30 seconds as time step. - - $ gotp add my-totp SHA1:GEZDGNBVGY3TQOJQ:6:30 - -Generate 3 recents passwords from "my-totp", - - $ gotp gen my-totp 3 - gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf - 847945 - 326823 - 767317 - -Import the exported Aegis TOTP from file, - - $ gotp import aegis aegis-export-uri.txt - gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf - OK - -List all labels stored in the configuration, - - $ gotp list - gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf - my-totp - -Remove a label "my-totp", - - $ gotp remove my-totp - gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf - OK - -Rename a label "my-totp" to "my-otp", - - $ gotp rename my-totp my-otp - gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf - OK +README
\ No newline at end of file diff --git a/CHANGELOG.adoc b/_doc/CHANGELOG.adoc index f5389e5..f5389e5 100644 --- a/CHANGELOG.adoc +++ b/_doc/CHANGELOG.adoc diff --git a/_doc/README.adoc b/_doc/README.adoc new file mode 120000 index 0000000..59a23c4 --- /dev/null +++ b/_doc/README.adoc @@ -0,0 +1 @@ +../README
\ No newline at end of file diff --git a/_doc/index.adoc b/_doc/index.adoc new file mode 100644 index 0000000..e8ed0c5 --- /dev/null +++ b/_doc/index.adoc @@ -0,0 +1,24 @@ += gotp +:toc: +:sectanchors: +:sectlinks: + +Welcome to gotp. + +Command line interface for Time-based One Time Password (TOTP). + +== Documentation + +link:CHANGELOG.html[CHANGELOG^]:: History of each release. + +link:README.html[README^]:: User manual page for gotp. + +== Development + +https://git.sr.ht/~shulhan/gotp[Repository^]:: Link to the source code. + +https://lists.sr.ht/~shulhan/gotp[Mailing list^]:: Link to development and +discussion. + +https://todo.sr.ht/~shulhan/gotp[Issues^]:: Link to submit an issue, +feedback, or request for new feature. |
