Your passphrase is the one thing standing between your private key and anyone keen on misusing it or learning your secrets, so choose it wisely. You may use the optional comment field to state an opinion (“Live Free or Die”), to further identify yourself (“Company Name”) or however else you see fit – just remember that the comment field will be tied to your User ID and will show up in your public key. Choose “ 1” for the kind of key (DSA and Elgamal), “ 4096” for the key size, “ 0” to make your keypair valid indefinitely (if you think your key should expire after a certain length of time, you may use the following code: 2 for 2 days, 3w for 3 weeks, 6m for 6 months, or 12y for 12 years).įor your User-ID, enter your name, your e-mail address (this is the address you’ll use to send and receive encrypted emails) and an optional comment. Type: gpg -gen-keyĪnd follow the instructions to generate your keypair. Launch the Terminal application and open a command-line window.
#Install gpg mac command line for mac os x#
Launch the “GnuPG for Mac OS X 1.4.7” package (this was the version at the time of writing this article) and follow the instructions to install GnuPG on your computer. You’ll need to download the following software (or packages) which will allow you to create encrypted messages on your Mac, import and export encryption keys, and configure everything through a GUI (Graphical User Interface).ĭouble-click on the Mac GnuPG file you downloaded to launch the installer. Step 1: Download all the necessary software If you want a more detailed guide, explaining every step, visit įor a detailed explanation of how PGP works, visit the Getting Started page of the GNU Privacy Handbook at įor a nice tutorial on selecting a strong passphrase, read This is a quick-and-dirty guide to installing and configuring GnuPG (PGP) on you Mac.