Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pi-314159/authenticator
An authenticator implementing RFC 6238, utilizing the OpenSSL library to encrypt secrets for cross-machine usage.
https://github.com/pi-314159/authenticator
2fa authenticator otp otp-generator rfc-6238 totp totp-generator
Last synced: about 1 month ago
JSON representation
An authenticator implementing RFC 6238, utilizing the OpenSSL library to encrypt secrets for cross-machine usage.
- Host: GitHub
- URL: https://github.com/pi-314159/authenticator
- Owner: pi-314159
- License: mit
- Created: 2024-06-10T10:03:40.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-11T18:10:07.000Z (6 months ago)
- Last Synced: 2024-07-11T23:00:47.889Z (6 months ago)
- Topics: 2fa, authenticator, otp, otp-generator, rfc-6238, totp, totp-generator
- Language: C++
- Homepage:
- Size: 97.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a TOTP (Time-Based One-Time Password) authenticator that adheres to [RFC 6238](https://datatracker.ietf.org/doc/html/rfc6238 "TOTP: Time-Based One-Time Password Algorithm"). It utilizes the OpenSSL library for cryptographic operations. Secrets are securely stored in a file, encrypted using AES-256. The encrypted file can be transferred to different machines for usage.
## Build
Before building, ensure that you have OpenSSL library installed and that your compiler supports C++23. By default, the executable is located in the `build` folder.
### Windows
By default, Visual Studio Release build will statically link dependencies. You can install OpenSSL using vcpkg. Follow these steps:
1. Install OpenSSL using vcpkg:
```bat
vcpkg.exe install openssl:x64-windows-static
```2. Integrate vcpkg with Visual Studio:
```bat
vcpkg.exe integrate install
```3. Build the Visual Studio solution located in the `VisualStudio` folder.
### Linux
If you're on Linux, run the following command to build Authenticator:
```sh
make
```## Prebuilt Binaries
Prebuilt binaries for x64 Windows and Linux can be found [here](https://github.com/pi-314159/Authenticator/releases "prebuilt binaries").
## Usage
By default, The authenticator stores secrets in the file named `Accounts` in the same folder. However, you can change this location by passing a command-line argument:
```sh
./Authenticator /path/to/secrets
```### Command Options
After starting the program, you can use the following commands:
1. `l`: List all accounts. Each account is numbered.
2. `[number]`: Generate a new OTP for the specified account number.
3. `a`: Add a new account. Use a QR code scanner (e.g., [Barcodes Decoder](https://tools.dnshome.de/HTML/Barcodes_Decoder.html "Barcodes Decoder")) to decode the QR code, then enter the account details as prompted.
4. `d[number]`: Delete an existing account by its account number.
5. `c`: Change the password of the encrypted file.
6. `q`: Quit the program.### Example Usage
To generate a new OTP for the third account, enter `3`.
To add a new account, enter `a`.
To delete the second account, enter `d2`.
## Contributions
Contributions to this project are welcome! If you find any bugs or have suggestions for improvements, please open an [issue](https://github.com/pi-314159/Authenticator/issues "issues") or submit a [pull request](https://github.com/pi-314159/Authenticator/pulls "pull requests").
## License
Authenticator is licensed under the [MIT License](https://github.com/pi-314159/Authenticator/blob/main/LICENSE "MIT License").