Uses new Rust 2021
|0.1.9||Jan 4, 2022|
|0.1.8||Sep 22, 2021|
|0.1.7||Feb 21, 2021|
|0.1.5||Jan 10, 2021|
#11 in Authentication
104 downloads per month
I believe that security is of paramount importance, especially in this digital world. I created cotp because I needed a minimalist, secure, desktop accessible software to manage my two-factor authentication codes.
cotp is written with simplicity in mind, the interface is quite minimalist and intuitive as command line apps should be.
You can import backups (or converted databases) from:
Backup compatibility is growing (check planned features).
cotp export you can export your database in unencrypted json format.
cotp can generate both TOTP and HOTP codes, compliant with rfc6238 and rfc4226 specifications. Also, it is possible to customize settings like HMAC algorithm and digits, to provide a good compatibility to other two-factor authentication systems.
- Arch Linux
- Alpine Linux
- Fedora 33
- Ubuntu 20.04 WSL
- Windows 10 Pro
- Windows 10 LTSC
- Windows 11
You can install cotp through the Arch User Repository. Before beginning check you already have the required packages:
pacman -S git base-devel
Then choose how you want to proceed:
Using an AUR Helper like paru:
paru -S cotp
Manually cloning AUR repo and make the pkg
git clone https://aur.archlinux.org/cotp.git cd cotp makepkg -si
Before beginning check that you have the required build dependencies to use the rust compiler.
Windows compilation is supported with both of toolchains.
If you want to use
x86_64-pc-windows-msvc you will need to install the Visual C++ 2019 Build Tools
It's possible to install cotp directly through cargo, as it's listed in the crates.io repository.
cargo install cotp and wait for the installation.
You can build cotp using these commands:
git clone https://github.com/replydev/cotp.git cargo install --path cotp/
If you are familiar with the command line interface using cotp will not be a problem. Just type
cotp to enter the TUI dashboard.
In the first run you will be prompted to insert a password to initialize the database.
Please note that the software requires at least an 8 chars length password.
If you type
cotp --help you get some instruction on how to use cotp utilities.
The interface is divided in subcommands, so if you type
cotp <subcommand> --help you get options and flag relative to the subcommand you inserted.
You can copy the otp code of the element you selected by simply pressing enter. This is supported in Windows, macOS, X11 and Wayland.
cotp add -l <label>, press Enter and insert the BASE32 Secret Key.
cotp also support HOTP codes, just add the
--hotp flag the the
cotp add --help to learn how to insert other settings.
You can edit your codes with the edit subcommand.
You must indicate the index of the code to be edited with the --index argument and then indicate the fields to be edited. If you want to modify also the secret of the code you must insert the flag -c.
To import Authy, Google Authenticator, Microsoft Authenticator and FreeOTP databases you need first to obtain the respective files in your phone in the paths:
- Google Authenticator:
- Microsoft Authenticator:
/data/data/com.azure.authenticator/databases/PhoneFactor. Take also
PhoneFactor-shmif they exist in the same folder.
You may need root privileges to access these folders.
Once you got those files run the correct python script located in the converters/ folder in this source code:
python authy.py path/to/database.xml converted.json
It will convert the database in a json format readable by cotp. To finish import the database:
cotp import --authy --path path/to/converted_database.json
- Reduce binary size and improve compilation speed by removing useless dependencies.
- Use Argon2id for key derivation
- CLI Dashboard
- Support for:
- Custom digit value
- Backup compatibility with:
- Google Authenticator
- Microsoft Authenticator
I created this project for my own needs, but I would be happy if this little program is useful to someone else, and I gratefully accept any contributions.