Skip to content

Instantly share code, notes, and snippets.

@Desttro
Forked from SomajitDey/gpg_ecc-25519_keygen
Created September 28, 2023 15:24
Show Gist options
  • Save Desttro/bb1dde7de3b4f9e1b2ea51cb9365b544 to your computer and use it in GitHub Desktop.
Save Desttro/bb1dde7de3b4f9e1b2ea51cb9365b544 to your computer and use it in GitHub Desktop.
Create ECC (elliptic curve crypto) keys using curve 25519 with/for GPG
#!/usr/bin/env -S gpg --batch --expert --gen-key
# Brief: Generate ECC PGP keys for signing (primary key) & encryption (subkey)
# Run as: chmod +x gpg_ecc-25519_keygen; ./gpg_ecc-25519_keygen
# Ref: https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
%echo "Generating ECC keys (sign & encr) with no-expiry"
%no-protection
Key-Type: EDDSA
Key-Curve: ed25519
Subkey-Type: ECDH
Subkey-Curve: cv25519
Name-Real: dummy
Expire-Date: 0
# Now, let's do a commit here, so that we can later print "done" :-)
%commit
%echo Done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment