Engine/UncategorisedDevelopmentThemes/ExtractingOwnPublicKeys

Written by positron as a quick hack.

This crude script requires sq (from Sequoia) and the sqlite3 program to be in the current path.

It has been tested on GNU/Linux; it should work on similar systems and is intended to be easily portable, but has not been tested on any non-GNU configuration.

This is a run (with a testing configuration, showing some keys I use for development — yes, in this example I pretend to own nkls’s private key as well; it is a test).

[luca@moore ~]$ ~/extract-public-keys 
Success.  Your public keys are at /home/luca/my-public-keys
[luca@moore ~]$ ls my-public-keys/
total 16
4 'luca@pep.foundation--FB6D0169423E18ED63A72C411650225D787D3665.gpg'
4 'nkls@pep.foundation--A5FB0C85F4210C835500B9131D7F8B7B97CAB2EF.gpg'
4 'owen@pep.foundation--1CE4EDB1AB32837754C476D87E343BAC98D87630.gpg'
4 'pep3@ageinghacker.net--10E37AA3BBFD3348CF9AE3698EF85F1B1E37396F.gpg'
[luca@moore ~]$ file my-public-keys/*
my-public-keys/luca@pep.foundation--FB6D0169423E18ED63A72C411650225D787D3665.gpg:   PGP public key block
my-public-keys/nkls@pep.foundation--A5FB0C85F4210C835500B9131D7F8B7B97CAB2EF.gpg:   PGP public key block
my-public-keys/owen@pep.foundation--1CE4EDB1AB32837754C476D87E343BAC98D87630.gpg:   PGP public key block
my-public-keys/pep3@ageinghacker.net--10E37AA3BBFD3348CF9AE3698EF85F1B1E37396F.gpg: PGP public key block

You can download the script here: extract-public-keys.