| 1 |
.. _encrypt: |
| 2 |
|
| 3 |
Password Protection |
| 4 |
=================== |
| 5 |
|
| 6 |
This page describes how to encrypt clipboard data stored by CopyQ. The |
| 7 |
recommended approach is the built-in encryption available since version 14.0.0. |
| 8 |
A legacy plugin using GnuPG is also documented below for older versions or |
| 9 |
per-item encryption needs. |
| 10 |
|
| 11 |
Built-in Encryption |
| 12 |
------------------- |
| 13 |
|
| 14 |
CopyQ can encrypt all stored tab data with a user-set password. No external |
| 15 |
software is required. |
| 16 |
|
| 17 |
To enable it, open **Preferences** and check the **Encrypt Tabs** option. |
| 18 |
You will be prompted to set a password. The password is needed when CopyQ |
| 19 |
starts and when changing the encryption password. If **Require password after |
| 20 |
an interval** is enabled (in the "History" configuration tab), the password is |
| 21 |
also requested periodically. |
| 22 |
|
| 23 |
To avoid entering the password at startup, enable **Use external key store**. |
| 24 |
This delegates password storage to a platform key store (note that this does |
| 25 |
not bypass the periodic prompt when password expiry is enabled): |
| 26 |
|
| 27 |
- **Windows** — Credential Store |
| 28 |
- **macOS** — Keychain |
| 29 |
- **Linux** — GNOME Keyring or KWallet |
| 30 |
|
| 31 |
Unlike the legacy Encryption plugin, built-in encryption automatically covers |
| 32 |
all tabs loaded by the application — there is no per-tab or per-item setup. |
| 33 |
|
| 34 |
.. note:: |
| 35 |
|
| 36 |
Built-in encryption protects data at rest but does **not** encrypt exported |
| 37 |
data. The ``exportTab`` and ``exportData`` script commands always write |
| 38 |
unencrypted files. When exporting from the GUI (**File — Export**), CopyQ |
| 39 |
prompts for an optional export password — if provided, tab data in the |
| 40 |
export file is encrypted with that password. See :ref:`backup` for details. |
| 41 |
|
| 42 |
Encryption Plugin (Legacy) |
| 43 |
-------------------------- |
| 44 |
|
| 45 |
.. deprecated:: 14.0.0 |
| 46 |
The Encryption plugin is obsolete. Use the built-in encryption described |
| 47 |
above instead. The plugin remains available for users who need per-item |
| 48 |
encryption or are running CopyQ versions older than 14.0.0. |
| 49 |
|
| 50 |
.. warning:: |
| 51 |
|
| 52 |
The plugin depends on GnuPG (``gpg2``), which introduces external key |
| 53 |
management complexity and version-compatibility issues. The password must |
| 54 |
be re-entered every few minutes. |
| 55 |
|
| 56 |
Installation |
| 57 |
~~~~~~~~~~~~ |
| 58 |
|
| 59 |
To enable this feature you need to have "Encryption" item plugin. |
| 60 |
|
| 61 |
.. image:: images/encryption-install.png |
| 62 |
|
| 63 |
The plugin configuration (under "Items" configuration tab in |
| 64 |
Configuration dialog) may prompt you to install |
| 65 |
`GnuPG <http://www.gnupg.org/>`__: |
| 66 |
|
| 67 |
- For Windows you can use `Chocolatey <https://chocolatey.org/install>`__ to |
| 68 |
install `Gpg4win <https://chocolatey.org/packages/gpg4win>`__:: |
| 69 |
|
| 70 |
choco install gpg4win |
| 71 |
|
| 72 |
- For Linux install ``gpg`` command line utility. It's usually provided |
| 73 |
by ``gnupg`` package but the package name may differ on some |
| 74 |
distributions. |
| 75 |
|
| 76 |
Generate Keys and Set Password |
| 77 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 78 |
|
| 79 |
To be able to encrypt tabs and items you first need to generate private |
| 80 |
and public key files. |
| 81 |
|
| 82 |
Click on the "Generate Ney Keys..." button and wait. |
| 83 |
|
| 84 |
.. image:: images/encryption-generate-keys.png |
| 85 |
|
| 86 |
If didn't set a password in previous step click "Change Password..." |
| 87 |
button and set it. |
| 88 |
|
| 89 |
.. image:: images/encryption-password.png |
| 90 |
|
| 91 |
Last step in configuration is to set tabs to encrypt. You can skip this |
| 92 |
step if you only need to encrypt single item in each tab (see next |
| 93 |
section). |
| 94 |
|
| 95 |
.. image:: images/encryption-tabs.png |
| 96 |
|
| 97 |
Click "OK" button to confirm Configuration dialog. |
| 98 |
|
| 99 |
Protect Tabs |
| 100 |
~~~~~~~~~~~~ |
| 101 |
|
| 102 |
Now you can create the tabs you want to encrypt (Ctrl+T to create new |
| 103 |
tab). |
| 104 |
|
| 105 |
The tab name should be same as one of the tabs entered in plugin |
| 106 |
configuration in previous step. |
| 107 |
|
| 108 |
.. image:: images/encryption-tab.png |
| 109 |
|
| 110 |
You'll be prompt to enter password in future (you only need to enter it |
| 111 |
once in a while). |
| 112 |
|
| 113 |
If you enter wrong password or cancel the password prompt you can later |
| 114 |
click on "Reload" button in tab to enter password again. |
| 115 |
|
| 116 |
.. image:: images/encryption-reload.png |
| 117 |
|
| 118 |
Protect Single Items |
| 119 |
~~~~~~~~~~~~~~~~~~~~ |
| 120 |
|
| 121 |
To protect items in unprotected tab you can add menu and tool bar |
| 122 |
actions with keyboard shortcut. |
| 123 |
|
| 124 |
Go to Command dialog F6, click on "Add" button, "Encryption" commands |
| 125 |
from list and confirm dialogs with "OK" button. |
| 126 |
|
| 127 |
Now you can select items and press Ctrl+L to encrypt ("Items - |
| 128 |
Encryption - Encrypt" in menu). |
| 129 |
|
| 130 |
To decrypt selected item press Ctrl+L ("Items - Encryption - Decrypt" in |
| 131 |
menu). |