Skip to content

Instantly share code, notes, and snippets.

View dlubawy's full-sized avatar

Andrew Lubawy dlubawy

View GitHub Profile
@dlubawy
dlubawy / age-to-pem.md
Last active November 13, 2025 10:16
Convert age identity to PEM with self-signed certificate

Age to PEM

Converts an age identity key to a PEM file with a self-signed X.509 certificate using a random RSA key.

Requirements

  • Requires YubiKey Manager installed to import the key/cert to your YubiKey
  • pip install bech32 cryptography

Usage

Existing Key

  1. python age-to-pem.py -f ./age-identity.txt