Install GnuPG

GnuPG is an implementation of the OpenPGP standard. There are several ways to install GnuPG on macOS. Using Homebrew is the way I prefer.

However, if you want to use your key for email encryption too, than the GPG Suite might be what you're looking for. It provides a package called MacGPG, which is based on GnuPG and you can also choose not to install MacGPG and use GnuPG instead. This is what I did in the past.

Please note that the GPG Suite is released under an Open Source license, but you have to buy a support plan to use it, unless you want to fork it and compile your own version. From my personal experience I can say that I was happy about the product, but they had some trouble with providing a working version for macOS Catalina and I was forced to postpone the upgrade. I hope they will solve this for the next release of macOS.

To install GnuPG via Homebrew you just need one command:

> brew install gnupg

After that you will have the gpg command available in your terminal. You can verify that by running gpg --version, which should print something like that.

> gpg --version
gpg (GnuPG) 2.2.19
libgcrypt 1.8.5
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /Users/danieltrautmann/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
        CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2