PeerAuth

README
Login

README

PeerAuth quickly creates time-based one-time passcodes (TOTP). The tool is inspired by ksze.github.io/PeerAuth, but works as a pure command line application (QR codes are displayed as Unicode Art).

Installation

Building PeerAuth requires a Swift 6 / Clang C++14 toolchain and CMake. You can build PeerAuth either with OpenSSL or Botan as its cryptographic backend: Specify your choice through the CMake variable PEERAUTH_CRYPTO.

When PEERAUTH_CRYPTO=openssl, which is the default setting, OpenSSLĀ 1.1 or newer, or LibreSSL has to be installed already. PeerAuth uses the RAND and EVP interfaces.

When PEERAUTH_CRYPTO=botan, Botan 3 has to be installed already. Only the plain C interface of Botan is used by the PeerAuth code to avoid depending on the newest C++ standards.

Usage

When launched without arguments, PeerAuth generates a fresh TOTP secret, presents that key in textual form as well as a QR code, and displays the current 6-digit authentication code.

When given a textual secret key as an argument, PeerAuth only displays the current 6-digit authentication code, by default.

The --verify option puts the tool into TOTP verification mode instead: It will read a 6-digit authentication code from the command line or prompt the user and verify whether it is currently valid.

Using the --secret option, you can toggle the display of the TOTP secret in textual and QR code form. The pixels of the QR code can be inverted using --invert.