|0.1.7||Feb 21, 2021|
|0.1.6||Feb 8, 2021|
|0.1.5||Jan 10, 2021|
#10 in Authentication
61 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 -ex you can export your database in unencrypted json format.
cotp can generate two-factor authentication coded using HMAC-SHA1, HMAC-SHA256 and HMAC-SHA512, with any digits, to provide a good compatibility to most two-factor authentication systems.
Thanks to the glorious Rust Language cotp is easily compilable in every platform supported by rust itself.
- Arch Linux
- Alpine Linux 3.12.3
- Fedora 33
- Ubuntu 20.04 WSL
- Windows 10 Pro x64 20H2 Build 19042.746
- Windows 10 LTSC x64 1809 Build 17763.1637
- Android (Termux)
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 yay:
yay -S cotp
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 dependencies to build cotp by yourself:
- build-essential for debian-based distributions
- gcc for others
- MSVC for Windows
- rust compiler and utilities
x86_64-pc-windows-gnu rust toolchain is untested and may not compile! Use MSVC instead.
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 #or https://codeberg.org/replydev/cotp.git cargo install --path cotp/
If you are familiar with the command line interface using cotp will not be a problem.
Please note that cotp requires at least an 8 chars length password.
If you type
cotp -h you get some instruction on how to use cotp utilities.
For example, the version 0.1.5 prints out this help screen:
cotp v0.1.5 written by @replydev USAGE: cotp [SUBCOMMAND] ARGUMENTS: -a,--add [ISSUER] [LABEL] [ALGORITHM] [DIGITS] | Add a new OTP code -e,--edit [ID] [ISSUER] [LABEL] [ALGORITHM] [DIGITS] | Edit an OTP code -r,--remove [ID] | Remove an OTP code -i,--import [APPNAME] [PATH] | Import a backup from a given application -ex,--export | Export the entire database in a plaintext json format -j,--json | Print results in json format -s,--single | Print OTP codes in single mode -in,--info [ID] | Print info of choosen OTP code -h,--help | Print this help
Note that in the
--edit command if you type . instead of argument you are specifying not to modify that specific argument.
cotp -e 3 . firstname.lastname@example.org . 8
To import Authy or Google Authenticator databases you need first of all to obtain the respective files in your phone in the paths:
- Google Authenticator:
After that 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 -i authy path/to/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
- Graphical User Interface
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.