Skip to content

Instantly share code, notes, and snippets.

@daveio
Created June 1, 2025 16:32
Show Gist options
  • Save daveio/156b3bfb9803c9b950426b0bb4c3699e to your computer and use it in GitHub Desktop.
Save daveio/156b3bfb9803c9b950426b0bb4c3699e to your computer and use it in GitHub Desktop.
Yubikey Gumpf

YubiKey Package Summary

A comprehensive overview of YubiKey-related packages available through Homebrew, ranging from encryption tools to authentication managers. These packages provide various ways to leverage YubiKey hardware tokens for enhanced security.

Core Command-Line Tools

age-plugin-yubikey (v0.5.0)

Purpose: Plugin for encrypting files with age and PIV tokens such as YubiKeys
License: Apache-2.0 OR MIT
Status: Stable, actively maintained

A plugin that enables file encryption using secret key material stored on YubiKeys, compatible with age and rage encryption clients.

Key Features:

  • Hardware-backed file encryption/decryption
  • Supports YubiKey 4 and 5 series (including Nano and USB-C variants)
  • Requires PIV support with ECDSA P-256 key
  • PIN protection with cache support for smoother operations

Usage Examples:

# Generate YubiKey identity
age-plugin-yubikey --generate

# List YubiKey recipients
age-plugin-yubikey --list

# Encrypt files
rage -r age1yubikey1... file.txt > file.txt.age

# Decrypt files
rage -d -i yubikey-identity.txt file.txt.age

Installation: brew install age-plugin-yubikey


yubico-piv-tool (v2.7.1)

Purpose: Command-line tool for the YubiKey PIV application
License: BSD-2-Clause
Status: Stable, widely used (6,521 annual installs)

Open-source software for interacting with the Personal Identity Verification (PIV) application on YubiKeys.

Key Capabilities:

  • Generate keys directly on device in different slots
  • Create certificate requests and self-signed certificates
  • Import certificates from various sources
  • Change management keys and read/verify certificates
  • Set touch policies on supported YubiKey models

Usage Examples:

# Generate new ECC-P256 key on device in slot 9a
yubico-piv-tool -s9a -AECCP256 -agenerate

# Create certificate request
yubico-piv-tool -a verify-pin -a request-certificate -s 9a -S "/CN=test/"

# Import certificate
yubico-piv-tool -a import-certificate -s 9a < cert.pem

Installation: brew install yubico-piv-tool


yubikey-agent (v0.1.6)

Purpose: Seamless ssh-agent for YubiKeys and other PIV tokens
License: BSD-3-Clause
Status: Stable, growing adoption (649 annual installs)

A modern SSH agent written in Go that provides superior YubiKey integration compared to traditional SSH agents.

Key Benefits:

  • Easy setup: One-command setup with single environment variable
  • Indestructible: Tolerates unplugging, sleep, and suspend without restart
  • Compatible: Works with all SSH services and servers
  • Secure: Keys generated on YubiKey cannot be extracted

Setup:

# Install and start service
brew install yubikey-agent
brew services start yubikey-agent

# Add to shell profile
export SSH_AUTH_SOCK="/opt/homebrew/var/run/yubikey-agent.sock"

# Generate key on YubiKey (done automatically on first use)

Security Features:

  • Requires PIN for every session
  • Requires physical touch for every login
  • Automatic YubiKey management key and PUK setup

Installation: brew install yubikey-agent


ykpers (v1.20.0)

Purpose: YubiKey personalization library and tool
License: BSD-2-Clause
Status: Stable (974 annual installs)

⚠️ Warning: Advanced tool that can destroy the AES key in your YubiKey and prevent use with Yubico's validation server.

Library and command-line tool for personalizing YubiKeys by setting AES keys and configuring device settings.

Configuration Options:

  • Static ticket mode
  • Access lock codes
  • Password strength options
  • Custom AES key programming

Dependencies: json-c, libyubikey

Installation: brew install ykpers


pam_yubico (v2.27) - DEPRECATED

Purpose: Yubico pluggable authentication module
License: BSD-2-Clause
Status: ⚠️ Disabled (uses deprecated ykclient)

This package has been disabled due to dependency on deprecated ykclient library.


GUI Applications

Yubico Authenticator (v7.2.0)

Purpose: Application for generating TOTP and HOTP codes
Status: Popular GUI app (2,652 annual installs)

Official companion app for YubiKey that provides comprehensive credential management.

Key Features:

  • Manage OATH one-time passwords (TOTP/HOTP)
  • Display YubiKey device information
  • Configure PIN, passkeys, and WebAuthn settings
  • Manage PIV credentials
  • Provision YubiKey credentials

Platform Support:

  • macOS 13 (Ventura) & above
  • Works with both USB and NFC-enabled YubiKeys
  • No internet connectivity required

Installation: brew install --cask yubico-authenticator


Yubico YubiKey Manager (v1.2.5)

Purpose: Application for configuring any YubiKey
Status: Most popular GUI tool (4,504 annual installs)

Comprehensive graphical application for YubiKey configuration and management.

Installation: brew install --cask yubico-yubikey-manager


Yubiswitch (v0.17)

Purpose: Status bar application to enable/disable Yubikey Nano
Status: Niche utility (332 annual installs)

Simple macOS menu bar app for quickly enabling/disabling YubiKey Nano devices.

Installation: brew install --cask pallotron-yubiswitch


Enterprise/Specialized Tools

YubiHSM 2 SDK (2024-09)

Purpose: Libraries and utilities to interact with a YubiHSM 2 natively and via PKCS#11
Status: Enterprise tool (102 annual installs)

Software development kit for interacting with YubiHSM 2 hardware security modules.

Installation: brew install --cask yubihsm2-sdk


Installation Summary

Most popular packages by install count:

  1. yubico-piv-tool (6,521/year) - Core PIV operations
  2. yubico-yubikey-manager (4,504/year) - GUI management
  3. yubico-authenticator (2,652/year) - TOTP/HOTP codes
  4. ykpers (974/year) - Device personalization
  5. yubikey-agent (649/year) - SSH agent
  6. age-plugin-yubikey (537/year) - File encryption

Quick Start Recommendations

For most users, start with:

  1. yubico-yubikey-manager - Essential GUI for initial setup
  2. yubikey-agent - Modern SSH key management
  3. yubico-authenticator - TOTP/HOTP code generation
  4. age-plugin-yubikey - Hardware-backed file encryption

Advanced users may also want yubico-piv-tool for command-line PIV operations and certificate management. EOF < /dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment