KEINOS' Blog

Official blog of KEINOS but mostly for my own reference. A Japanese made in Mexico with Mexican quality. Who monkey around the jungle of codes. ;-)


Project maintained by KEINOS Hosted on GitHub Pages — Theme by mattgraham

INDEX


GPG (OpenPGP/GnuPG)

gpg(GnuPG) command is an implementation of the OpenPGP standard.

References

How to create GPG key pair

# gpg --batch --quick-gen-key --passphrase '' <User ID> [algo [usage [expire]]]
gpg --batch --expert --quick-gen-key --passphrase '' "KEINOS (ECC-Curve25519-Full_Enc-Sign) <[email protected]>" default default 0
gpg --full-generate-key --expert

How to sign a file with GPG key

gpg --sign <file>
gpg --sign --default-key <email@address> <file>

How to verify the signed file

gpg --verify <file>.gpg
gpg --verify --default-key <email@address> <file>.gpg

Assign PGP key to git commit

How to get existing GPG key info

# Public Key
gpg --list-keys
gpg --list-keys --keyid-format=long
gpg --list-keys --keyid-format=short
# Secret Key
gpg --list-secret-keys
gpg --list-secret-keys --keyid-format=long
gpg --list-secret-keys --keyid-format=short

Whow to get the fingerprint of a GPG key

gpg --list-keys --fingerprint --keyid-format=short
gpg --list-keys --fingerprint --keyid-format=short
/Users/admin/.gnupg/pubring.kbx
-------------------------------
pub   ed25519/23FEC570 2024-01-15 [SC]
   フィンガープリント = 74B7 0607 675F BED0 0951  8600 0E31 BF09 23FE C570
uid         [  究極  ] KEINOS (ECC-Curve25519-Full_Enc-Sign) <[email protected]>
sub   cv25519/DB6B3F2A 2024-01-15 [E]

How to upload GPG key to key-server (keys.openpgp.org)

gpg --keyserver hkps://keys.openpgp.org --send-keys <finger print>
gpg --keyserver hkps://keys.openpgp.org --send-keys 74B70607675FBED0095186000E31BF0923FEC570

How to get current GPG Keys (Public and Private)