PGP Command Line User Guide
Total Page:16
File Type:pdf, Size:1020Kb
PGP Command Line User Guide Last updated: July 2020 Copyright statement Broadcom, the pulse logo, Connecting everything, and Symantec are among the trademarks of Broadcom. Copyright © 2020 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. For more information, please visit www.broadcom.com. Broadcom reserves the right to make changes without further notice to any products or data herein to improve reliability, function, or design. Information furnished by Broadcom is believed to be accurate and reliable. However, Broadcom does not assume any liability arising out of the application or use of this information, nor the application or use of any product or circuit described herein, neither does it convey any license under its patent rights nor the rights of others. Contents About PGP Command Line 1 Important Concepts 1 Technical Support 2 Installing 5 Install Location 5 Installing on AIX 6 Installing on AIX 6 Changing the Home Directory on AIX 7 Uninstalling on AIX 7 Installing on HP-UX 8 Installing on HP-UX 8 Changing the Home Directory on HP-UX 9 Installing to a Non-Default Directory on HP-UX 9 Uninstalling on HP-UX 9 Installing on macOS 10 Installing on macOS 10 Changing the Home Directory on macOS 10 Uninstalling on macOS 11 Installing on Red Hat Enterprise Linux, SLES, or Fedora Core 11 Installing on Red Hat Enterprise Linux or Fedora Core 11 Changing the Home Directory on Linux or Fedora Core 12 Uninstalling on Linux or Fedora Core 12 Installing on Oracle Solaris 13 Installing on Oracle Solaris 13 Changing the Home Directory on Oracle Solaris 14 Uninstalling on Oracle Solaris 14 Installing on Windows 15 PGP Command Line for Windows and Symantec Encryption Desktop on the Same System 15 To Install on Windows 15 Changing the Home Directory on Windows 15 Uninstalling on Windows 16 Upgrading 16 Relocating 17 Licensing 19 Overview 19 Using a License Number 20 Using a License Authorization 20 Re-Licensing 20 ii Contents The Command-Line Interface 23 Overview 23 Flags and Arguments 24 Flags 25 Arguments 25 Configuration File 28 Keyserver Configuration File Settings 32 Environment Variables 33 Standard Input, Output, and Error 34 Redirecting an Existing File 34 Entering Data 34 Specifying a Key 35 'Secure' Options 36 First Steps 37 Overview 37 Creating Your Keypair 38 Protecting Your Private Key 40 Distributing Your Public Key 40 Posting Your Public Key to a Keyserver 41 Exporting Your Public Key to a Text File 41 Getting the Public Keys of Others 42 Finding a Public Key on a Keyserver 42 Importing a Public Key from a Keyserver 43 Verifying Keys 44 Cryptographic Operations 47 Overview 47 Commands 48 --armor (-a) 48 --clearsign 49 --decrypt 51 --detached (-b) 53 --dump-packets, --list-packets 54 --encrypt (-e) 55 --export-session-key 58 --list-sda 59 --list-archive 59 --sign (-s) 60 --symmetric (-c) 62 --verify 63 Key Listings 65 Overview 65 Commands 65 --fingerprint 66 --fingerprint-details 66 Contents iii --list-key-details 68 --list-keys (-l) 69 --list-keys-xml 70 --list-sig-details 70 --list-sigs 71 --list-userids 71 Working with Keyservers 73 Overview 73 Commands 74 --keyserver-disable 74 --keyserver-recv 74 --keyserver-remove 75 --keyserver-search 76 --keyserver-send 77 --keyserver-update 78 Managing Keys 79 Overview 81 Commands 81 --add-adk 81 --add-photoid 82 --add-preferred-cipher 82 --add-preferred-compression-algorithm 83 --add-preferred-email-encoding 83 --add-preferred-hash 84 --add-revoker 84 --add-userid 85 --cache-passphrase 85 --change-passphrase 86 --clear-key-flag 87 --disable 87 --enable 88 --export, --export-key-pair 88 --export-photoid 90 --gen-key 91 --gen-revocation 93 --gen-subkey 94 --get-email-encoding 94 --import 95 --join-key 96 --join-key-cache-only 99 --key-recon-send 100 --key-recon-recv-questions 101 --key-recon-recv 102 --remove 103 --remove-adk 103 --remove-all-adks 104 --remove-all-photoids 104 --remove-all-revokers 104 --remove-expiration-date 105 iv Contents --remove-key-pair 105 --remove-photoid 106 --remove-preferred-cipher 106 --remove-preferred-compression-algorithm 106 --remove-preferred-email-encoding 107 --remove-preferred-hash 107 --remove-preferred-keyserver 108 --remove-revoker 108 --remove-sig 109 --remove-subkey 109 --remove-userid 110 --revoke 110 --revoke-sig 111 --revoke-subkey 111 --send-shares 112 --set-expiration-date 112 --set-key-flag 113 --set-preferred-ciphers 113 --set-preferred-compression-algorithms 114 --set-preferred-email-encodings 114 --set-preferred-hashes 115 --set-preferred-keyserver 115 --set-primary-userid 116 --set-trust 116 --sign-key 117 --sign-userid 118 --split-key 119 Working with Email 123 Overview 123 Encrypt Email 124 Sign Email 125 Decrypt Email 126 Verify Email 126 Annotate Email 126 Working with a PGP Key Management Server 129 Overview 130 New Terms and Concepts 130 Relationship with a PGP KMS 131 Authentication for PGP KMS Operations 131 --decrypt 133 --encrypt (-e) 133 --create-mak 134 --export-mak 134 --export-mak-pair 135 Export Format 136 --import-mak 137 --request-cert 138 --edit-mak 138 --search-mak 139 Contents v --delete-mak 140 --create-mek-series 141 --edit-mek-series 141 --search-mek-series 142 --delete-mek-series 143 --create-mek 144 --import-mek 144 --export-mek 145 --edit-mek 145 --search-mek 146 --create-msd 147 --export-msd 148 --edit-msd 148 --search-msd 149 --delete-msd 150 --create-consumer 151 --search-consumer 151 --check-certificate-validity 152 Miscellaneous Commands 155 Overview 155 Commands 156 --agent 156 --create-keyrings 156 --help (-h) 157 --license-authorize 157 --purge-all-caches 157 --purge-keyring-cache 157 --purge-passphrase-cache 158 --speed-test 158 --version 158 --wipe 159 --check-sigs 159 --check-userids 160 Options 161 Using Options 161 Boolean Options 162 --alternate-format 162 --annotate 162 --archive 162 --banner 163 --biometric 164 --buffered-stdio 164 --compress, --compression 164 --details 165 --email 165 --encrypt-to-self 165 --eyes-only 166 --fast-key-gen 166 --fips-mode, --fips 166 vi Contents --force (-f) 167 --halt-on-error 167 --import-certificates 167 --keyring-cache 167 --large-keyrings 168 --marginal-as-valid 168 --master-key 168 --pass-through 168 --passphrase-cache 168 --photo 169 --quiet (-q) 169 --recursive 169 --reverse-sort, --reverse 169 --sda 169 --skep 170 --text-mode, --text (-t) 170 --truncate-passphrase 171 --verbose (-v) 171 --warn-adk 171 --wrapper-key 171 --xml 171 Integer Options 172 --3des 173 --aes128, --aes192, --aes256 173 --bits, --encryption-bits 173 --blowfish 174 --bzip2 174 --cast5 174 --creation-days 175 --expiration-days 175 --idea 175 --index 176 --keyring-cache-timeout 176 --keyserver-timeout 176 --md5 177 --passphrase-cache-timeout 177 --partitioned 177 --pgp-mime 178 --ripemd160 178 --sha, --sha256, --sha384, --sha512 179 --signing-bits 180 --skep-timeout 180 --threshold 180 --trust-depth 180 --twofish 181 --wipe-input-passes 181 --wipe-overwrite-passes 181 --wipe-passes 181 --wipe-temp-passes 182 --zip 182 --zlib 182 Enumeration Options 182 --auto-import-keys 182 --cipher 183 Contents vii --compression-algorithm 184 --compression-level 184 --email-encoding 185 --enforce-adk 185 --export-format 185 --hash 186 --import-format 187 --input-cleanup 187 --key-flag 188 --key-type 188 --manual-import-key-pairs 189 --manual-import-keys 189 --overwrite 189 --sig-type 190 --sort-order, --sort 190 --tar-cache-cleanup 190 --target-platform 191 --temp-cleanup 191 --trust 192 String Options 192 --auth-key 192 --auth-passphrase 192 --auth-username 192 --basic-constraint 193 --city, --common-name, --contact-email, --country 193 --comment 193 --creation-date 193 --default-key 194 --expiration-date 194 --export-passphrase 194 --extended-key-usage 195 --home-dir 195 --key-usage 195 --local-user (-u), --user 195 --license-number 196 --new-passphrase 196 --organization, --organizational-unit 196 --output (-o) 196 --output-file 197 --passphrase 197 --preferred-keyserver 197 --private-keyring 198 --proxy-passphrase, --proxy-server, --proxy-username 198 --public-keyring 199 --recon-server 199 --regular-expression 199 --random-seed 200 --root-path 200 --share-server 200 --state 200 --status-file 201 --subject-alternative-name 201 --symmetric-passphrase 201 --temp-dir 202 viii Contents List Options 202 --additional-recipient 202 --adk 202 --input (-i) 203 --question / --answer 203 --keyserver 203 --recipient (-r) 204 --revoker 204 --share 205 File Descriptors 206 --auth-passphrase-fd, auth-passphrase-fd8 206 --export-passphrase-fd, --export-passphrase-fd8 206 --new-passphrase-fd, --new-passphrase-fd8 206 --passphrase-fd 207 --proxy-passphrase-fd, --proxy-passphrase-fd8 207 --symmetric-passphrase-fd, --symmetric-passphrase-fd8 207 Lists 209 Basic Key List 209 The Default Key Column 210 The Algorithm Column 210 The Type Column 211 The Size/Type Column 211 The Flags Column 212 The Key ID Column 213 The User ID Column 213 Detailed Key List 214 Main Key Details 215 Subkey Details 221 ADK Details 223 Revoker Details 224 Key List in XML Format 224 Elements with fixed settings 228 X.509 Signatures 230 Detailed Signature List 231 Usage Scenarios 237 Secure Off-Site Backup 237 PGP Command Line and Symantec Encryption Desktop 237 Compression Saves Money 238 Surpasses Legal Requirements 239 Searching for Data on a PGP KMS 241 Overview 241 Operators 242 Types 242 Keyword Listing 242 Example Searches 244 For Linux and Mac OSX 244 Contents ix For Windows 244 More About Types 245 Time Fields 245 Boolean Values 245 Open PGP Algorithms 246 Open PGP Key