YB(1)

πŸ“¦
version 0.5.2 Β· 2 versions
, in nixpkgs unstable

πŸ’– YB(1) β€” yb, but make it group-chat πŸ’–

okay so bestie, this is the User Commands manual page YB(1) for yb, and it's literally about secure blob storage on a YubiKey. no cap, it's giving tiny encrypted vault energy. πŸŽ€


✨ NAME ✨

yb β€” Secure blob storage on a YubiKey

🌸 SYNOPSIS 🌸

yb [-s|--serial] [-r|--reader] [-q|--quiet] [--pin-stdin] [--debug]
[--allow-defaults] [-h|--help] [-V|--version] <subcommands>

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so yb stores and retrieves arbitrary binary blobs on a YubiKey's PIV applet. each blob is encrypted with a per-device ECDH key before being written to the on-card PIV data objects; without the YubiKey the data cannot be decrypted. that's the whole vibe: the key stays with the hardware, periodt. πŸ”₯

The store is a flat sequence of PIV objects provisioned by yb format. Each object is written at exactly the size its content requires (9-byte sentinel when empty, up to 3,063 bytes when occupied). Large blobs are automatically split across multiple objects (chunk chaining); the number of objects can be tuned at format time (--object-count). so yeah, big blob? multiple objects. iconic. πŸ’…

All write operations (format, store, remove) require both the PIV PIN and the PIV management key. fetch requires the PIN for encrypted blobs. list and fsck never require a PIN (except fsck --check-key) β€” they verify blob integrity using only the public key from the store's X.509 certificate. no PIN needed for those, iykyk. ✨

πŸ‘‘ OPTIONS πŸ‘‘

  • -s, --serial <SERIAL> β€” YubiKey serial number
  • -r, --reader <READER> β€” PC/SC reader name (legacy; prefer --serial)
  • -q, --quiet β€” Suppress informational output (shhh 🀫)
  • --pin-stdin β€” Read PIN from stdin (one line)
  • --debug β€” Enable debug output
  • --allow-defaults β€” Allow insecure default credentials (not recommended) (bestie, please don't unless you know what you're doing 😭)
  • -h, --help β€” Print help
  • -V, --version β€” Print version

πŸŽ€ SUBCOMMANDS πŸŽ€

  • yb-format(1) β€” Provision PIV objects and optionally generate an ECDH key
  • yb-store(1) β€” Store a blob on the YubiKey
  • yb-fetch(1) β€” Retrieve one or more blobs
  • yb-list(1) β€” List blobs (alias: ls)
  • yb-remove(1) β€” Remove a blob (alias: rm)
  • yb-fsck(1) β€” Filesystem check β€” dump store metadata
  • yb-rotate-management-key(1) β€” Replace the management key with a random one, kept on the YubiKey and unlocked by the PIN (the store is kept)
  • yb-list-readers(1) β€” List PC/SC readers
  • yb-select(1) β€” Interactively select a YubiKey and print its serial number
  • yb-self-test(1) β€” Run a destructive end-to-end self-test on real hardware (destructive! on real hardware! ⚠️)
  • yb-help(1) β€” Print this message or the help of the given subcommand(s)

⭐ VERSION ⭐

v0.5.2 β€” that's the version, bestie. 🫢

🌈 ENVIRONMENT 🌈

  • YB_PIN β€” PIV PIN. Takes precedence over the interactive prompt. Superseded by --pin-stdin when both are set.
  • YB_MANAGEMENT_KEY β€” PIV management key as a hex string. Required for write operations when the factory default has been changed (recommended).
  • YB_COMPLETE β€” Shell name (bash, zsh, fish). When set, yb emits shell completion code to stdout and exits.

πŸ“ EXAMPLES πŸ“

Set up a YubiKey, guided (from a terminal):

yb format

The same, from a script, on a YubiKey whose PIN and PUK were changed:

yb format --generate --protect

Store an encrypted file:

yb store secret.key

Retrieve it to the current directory:

yb fetch secret.key

List all blobs with details:

yb list --long

πŸ’œ SECURITY πŸ’œ

Blobs are encrypted with AES-256-GCM using a key derived via ECDH with a P-256 private key that never leaves the YubiKey hardware. literally hardware-bound, no cap. πŸ”

Do not use the factory-default PIN or management key in production. yb refuses to operate with default credentials unless --allow-defaults is passed. this is the serious bit, bestie β€” don't skip it. 😭

🧚 SEE ALSO 🧚

yb-format(1), yb-store(1), yb-fetch(1), yb-list(1), yb-remove(1), yb-fsck(1), yb-rotate-management-key(1), yb-list-readers(1), yb-select(1), ykman(1)


signed off with sparkle: this is yb, version v0.5.2, dated 2026-03, and the footer says YB(1). go be secure, bestie. πŸ’…πŸŽ€

πŸ“¦ where this page comes from