Skip to content

An authenticator implementing RFC 6238, utilizing the OpenSSL library to encrypt secrets for cross-machine usage.

License

Notifications You must be signed in to change notification settings

pi-314159/Authenticator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a TOTP (Time-Based One-Time Password) authenticator that adheres to RFC 6238. 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:

    vcpkg.exe install openssl:x64-windows-static
  2. Integrate vcpkg with Visual Studio:

    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:

make

Prebuilt Binaries

Prebuilt binaries for x64 Windows and Linux can be found here.

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:

./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) 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 or submit a pull request.

License

Authenticator is licensed under the MIT License.

About

An authenticator implementing RFC 6238, utilizing the OpenSSL library to encrypt secrets for cross-machine usage.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published