Skip to content

Conversation

@hluk
Copy link
Owner

@hluk hluk commented Dec 7, 2025

This enables encrypting all tab data on disk that are not handled by plugins (i.e. Synchronization and Encryption which itself uses gpg) using single password.

The feature is disabled by default, needs to be enabled in Preferences.

Requires QCA library and keyring support needs QtKeychain. This can be disabled by CMake options WITH_QCA_ENCRYPTION and WITH_KEYCHAIN.

To check if encryption is supported by the app (from Action dialog or command line):

copyq 'popup("Encryption", info("has-encryption") === "1" ? "Supported" : "NOT supported")'
copyq 'popup("Keychain Access", info("has-keychain") === "1" ? "Supported" : "NOT supported")'

To enable the feature from command line:

copyq config tab_encryption_enabled true

To disable storing password in external keyring:

copyq config use_key_store false

Encrypted files cannot be exported and imported in scripts - there is no support for passing passwords from scripts.

TODO:

  • Enable encryption in Linux builds
  • Enable encryption in Windows builds
  • Enable encryption in macOS builds
  • Changing password
  • Encrypting all data when enabled
  • Disabling encryption - all the data need to be saved decrypted again
  • Import and export with a custom password from GUI
  • Support key stores (KWallet, GNOME Keyring, Credential Manager in Windows, Keychain for macOS)
  • Support encrypted import/export from scripts

Assisted-by: Claude Code

Fixes #2617

@hluk hluk force-pushed the encrypt-tabs branch 2 times, most recently from 4e00865 to 41cd2e0 Compare December 7, 2025 06:46
@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

❌ Patch coverage is 73.64906% with 434 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.95%. Comparing base (310e998) to head (954acaa).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
src/common/encryption.cpp 56.13% 161 Missing ⚠️
src/gui/encryptionpassword.cpp 69.33% 69 Missing ⚠️
src/gui/mainwindow.cpp 79.87% 65 Missing ⚠️
src/item/serialize.cpp 73.74% 47 Missing ⚠️
src/common/keychainaccess.cpp 22.91% 37 Missing ⚠️
src/tests/itemtests/itemtests.cpp 64.19% 29 Missing ⚠️
src/gui/geometry.cpp 91.47% 11 Missing ⚠️
src/tests/tests.cpp 66.66% 7 Missing ⚠️
src/item/itemstore.cpp 75.00% 4 Missing ⚠️
src/common/config.cpp 0.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3345      +/-   ##
==========================================
+ Coverage   79.90%   79.95%   +0.05%     
==========================================
  Files         231      238       +7     
  Lines       28469    29671    +1202     
==========================================
+ Hits        22747    23724     +977     
- Misses       5722     5947     +225     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hluk hluk force-pushed the encrypt-tabs branch 18 times, most recently from 5c20ca6 to dcbedc3 Compare December 11, 2025 12:21
@hluk hluk force-pushed the encrypt-tabs branch 8 times, most recently from 4276913 to b42f05e Compare December 12, 2025 19:56
@hluk hluk force-pushed the encrypt-tabs branch 4 times, most recently from 0f19bb7 to d2a49b7 Compare December 14, 2025 07:41
@hluk hluk force-pushed the encrypt-tabs branch 14 times, most recently from d94a51e to 59baee8 Compare December 15, 2025 15:17
hluk added 2 commits December 15, 2025 16:52
Fixes the following Qt warning:

    QObject::disconnect: wildcard call disconnects from destroyed signal
    of ConfigurationManager::ConfigurationManager
Adds build dependencies for enabling the encryption: QCA, QtKeychain

Removes the instructions for building with old unmaintained Qt 5
libraries. CopyQ may drop the support in the near future.

Removes the source code building instructions from README file and adds
just a link to the documentation.
This enables encrypting all tab data on disk that are not handled by
plugins (i.e. Synchronization and Encryption which itself uses gpg)
using single password.

The feature is disabled by default, needs to be enabled in Preferences.

Requires [QCA library](https://invent.kde.org/libraries/qca) and keyring
support needs
[QtKeychain](https://github.com/frankosterfeld/qtkeychain). This can be
disabled by CMake options `WITH_QCA_ENCRYPTION` and `WITH_KEYCHAIN`.

To check if encryption is supported by the app (from Action dialog or
command line):

    copyq 'popup("Encryption", info("has-encryption") === "1" ? "Supported" : "NOT supported")'
    copyq 'popup("Keychain Access", info("has-keychain") === "1" ? "Supported" : "NOT supported")'

To enable the feature from command line:

    copyq config tab_encryption_enabled true

To disable storing password in external keyring:

    copyq config use_key_store false

Encrypted files cannot be exported and imported in scripts - there is no
support for passing passwords from scripts.

Assisted-by: Claude Code

Fixes #2617
@hluk hluk merged commit f8af2ea into master Dec 16, 2025
11 of 12 checks passed
@hluk hluk deleted the encrypt-tabs branch December 17, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Encrypt clipboard items database (%APPDATA%\copyq\copyq_tab_XYZ.dat)

2 participants