github str4d/age-plugin-yubikey v0.6.0
age-plugin-yubikey v0.6.0

50 minutes ago

Added

  • Support for the native tagged recipient types:

    • Hybrid (age1tagpq1..)
    • Non-hybrid (age1tag1..)

    Encryption requires making the age-plugin-yubikey binary available on the PATH as age-plugin-tagpq or age-plugin-tag (as needed), or upgrading to a client version that builds in support for the new native recipient type.

    The hybrid type combines ML-KEM-768 with P-256; the non-hybrid type uses P-256 alone. Hybrid encryption through the plugin requires a client that supports the postquantum recipient label. A file cannot be encrypted to both hybrid and non-hybrid recipients.

  • -t/--type flag, to generate a specific identity type. Interactive setup now also offers a choice of identity type.

  • Support for PIN-protected AES management keys (AES-128, AES-192, and AES-256). When replacing the default management key, age-plugin-yubikey now uses AES-192 on YubiKey firmware 5.7 and later, and TDES on older firmware. Custom unprotected management keys are still not supported.

  • Hybrid identities store their ML-KEM private seed in a slot-associated PIV application data object, following the C2SP piv-data and piv-hybrid specifications. The seed is sealed with a PIN-protected key unless the PIN policy is never, and the slot certificate only contains public keys.

    • The hybrid slot certificate is unsigned. Unlike the P-256 private key, the seed can be extracted from the YubiKey. The touch policy does not protect it.
    • --list and --identity warn if the YubiKey has no usable seed for the slot.
    • The experimental format that stored the seed in the certificate is not supported or automatically migrated. See hybrid key storage.
  • Release binaries for ARMv7 and ARM64 Linux, and ARM64 Windows. Debian packages are also available for armhf and arm64.

  • GitHub artifact attestations for release archives and Debian packages.

Changed

  • MSRV is now 1.89.0.
  • Linux release binaries and Debian packages are now built using Ubuntu 22.04 (previously 20.04).
  • The default generated identity type is now the native hybrid tagged recipient type (age1tagpq1..).
  • Encryption to an identity now uses the preferred recipient type supported for that identity.
  • age-plugin-yubikey now prints age1tag1.. recipients in its CLI and identity files instead of age1yubikey1.. recipients. The latter is now only shown in comments for identities generated with age-plugin-yubikey 0.5.1 or earlier.
    • Hybrid identities are shown with their age1tagpq1.. recipient instead.
  • Identity files now record the recipient type of the identity, using a longer AGE-PLUGIN-YUBIKEY-1.. encoding. Identity files written by earlier versions continue to decrypt files encrypted to age1yubikey1.. recipients, but cannot decrypt files encrypted to tagged recipients.
    • Encrypting with an old identity file still uses the legacy recipient. The regenerated identity file can also decrypt files sent to that recipient.
  • Encryption to tagged recipients produces p256tagv2 and mlkem768p256tagv2 stanzas. Decryption also accepts the earlier p256tag and mlkem768p256tag stanzas.
    • Anyone who knows a tagged recipient can check whether a file was encrypted to it. age-plugin-yubikey uses this to avoid asking for a YubiKey when no stanza matches.
  • On Unix, after releasing a YubiKey without resetting it (for example, after decryption or a read-only operation), age-plugin-yubikey now requests identities from the SSH agent at SSH_AUTH_SOCK. This lets agents such as yubikey-agent reconnect promptly, helping preserve the PIN cache against OS power management while the device is idle. SSH-agent communication failures do not fail the operation.
    • Interactive setup lets agents reclaim YubiKeys during device selection, asks them to release the selected YubiKey again if needed, and holds that connection for all remaining YubiKey operations.
  • Subject metadata decoding accepts UTF8String, PrintableString, and TeletexString encodings for the organization, identity name, and plugin version. BMPString is also supported.
  • Listing identities now skips any PIV certificate that uses the legacy UniversalString encoding in its subject or issuer name, without affecting other slots. Identities generated by prior age-plugin-yubikey releases do not use this encoding.
  • P-256 certificates provisioned by other tools must encode the public key as an uncompressed point. On YubiKeys that report the slot's public key, an identity is no longer listed or used if its certificate contains a different key.

Fixed

  • If several identities match the same short tag during decryption, age-plugin-yubikey now tries each of them instead of just the first. It no longer asks for another YubiKey once the file has been decrypted.
  • Decryption errors now report the stanza's position in the file (previously only matching stanzas were counted).
  • --generate no longer treats a slot with an unreadable certificate as empty, and checks the slot again after authenticating with the management key. A slot containing data but no certificate (for example, if hybrid identity generation was interrupted) is no longer selected automatically.

Don't miss a new age-plugin-yubikey release

NewReleases is sending notifications on new releases.