Proving my identity

I claim @astevan on Codeberg and @antoineeestevaaan on GitHub are the same person.

The protocol

Being able to verify the signatures of the two separate documents with the same public key means that they were signed with the same private key, i.e. by the same person.

The commands

Shell
# use a temporary keyring
export GNUPGHOME="$(mktemp -d)"

# create a keypair and dump the public key
name="Temp"
gpg --batch --yes --quick-generate-key "$name" rsa2048 sign 1d
gpg --armor --export "$name" > pubkey.asc

# sign both documents
gpg --armor --detach-sign --output codeberg.org@astevan.txt.sig.asc         documents/codeberg.org@astevan.txt
gpg --armor --detach-sign --output github.com@antoineeestevaaan.txt.sig.asc documents/github.com@antoineeestevaaan.txt

# delete temporary keyring
rm -rf "$GNUPGHOME"

How to verify the files

Shell
( GNUPGHOME="$(mktemp -d)"; \
gpg --import pubkey.asc && \
gpg --verify file.sig file; \
rc=$?; rm -rfv "$GNUPGHOME"; exit $rc )