{"revision": {"id": "f3ef2e76-2f95-11f1-b134-e86a64d24d78", "node_id": "f3ede171-2f95-11f1-81cb-e86a64d24d78", "user_id": "edc3f576-2f95-11f1-900f-e86a64d24d78", "author": "foxhop", "data": "Linux GPG\r\n###########\r\n\r\nShort how to document on setting up a PGP (GPG) keypair and a short lesson on how to encrypt a message as well as configuring \"pass\" password client for using the keypair to protect passwords.\r\n\r\nCreating GPG Keys Using the Command Line\r\n==========================================\r\n\r\nUse the following shell command:\r\n\r\n.. code-block:: bash\r\n\r\n gpg --gen-key\r\n\r\nAnswer the prompts, I typically accept all defaults which is 2048 bits and RSA.\r\nAlso memorize your long passphrase and never tell anyone it, ever.\r\n\r\nDocument your new 'KeyID'.\r\n\r\nList all keys\r\n=============================\r\n\r\nThis is a great way to determine a 'KeyID'\r\n\r\n.. code-block:: bash\r\n\r\n gpg --list-keys\r\n\r\nValidate a GPG passphrase and encrypt a test message\r\n=========================================================\r\n\r\n.. code-block:: bash\r\n\r\n gpg --local-user <KEYID> -as\r\n\r\nIt will prompt for a passphrase three times unless a valid one is submitted, then it will allow you to write an encrypted message.  press ctrl-d to end the message.\r\n\r\ndecrypt the test message\r\n==============================\r\n\r\n.. code-block:: bash\r\n\r\n gpg -d <encrypted message file>\r\n\r\nThen paste the encrypted message into the terminal.\r\n\r\nor optionally omit the 'encrypted message file' and paste the payload directly into the cmd prompt. \r\n", "source_format": "rst", "revision_number": 7, "created": 1403524357000}}