Skip to content

Instantly share code, notes, and snippets.

@eqvinox
Created July 29, 2026 10:42
Show Gist options
  • Select an option

  • Save eqvinox/4f31f95147f518e06f66433a64ca37b0 to your computer and use it in GitHub Desktop.

Select an option

Save eqvinox/4f31f95147f518e06f66433a64ca37b0 to your computer and use it in GitHub Desktop.
ED25519 → DKIM, but properly
#!/bin/sh
openssl pkey -outform DER -pubout -in "${1:-/dev/stdin}" \
| python3 -c 'import sys, binascii; from pyasn1.codec.der.decoder import decode; sys.stdout.write(binascii.b2a_base64(decode(sys.stdin.buffer.read())[0][1].asOctets()).decode("ASCII"))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment