Application Secure Key
GpgFrontend keeps one key of its own. This key locks the data the program saves for you: settings, cached details, key server entries, and so on.
This is not one of your OpenPGP keys. It never touches your messages, your files, or your keyring. GpgFrontend makes it for you the first time it runs, and you never have to think about it.
Most people can stop reading here. The rest of this page is for people who want more protection than the default.
Your Three Choices
Section titled “Your Three Choices”Open Settings, go to Advanced, and look at Application Key Protection:. It is a list with three choices.
No extra protection
Section titled “No extra protection”The default. In the list it reads No extra protection (default). The key sits in a file that only your user account can read.
This is fine for a computer only you use. Anyone who can read your files could also read the key, but someone with that much access could read most of your other things anyway.
System keychain
Section titled “System keychain”GpgFrontend stores its key in the place where your computer already keeps passwords:
Credential Manager.
Your login keychain.
Your password service, such as GNOME Keyring or KWallet.
Nothing changes for you day to day. The program never asks you for anything. But the key file on its own is now useless to someone who copies it.
This choice is greyed out when it cannot work:
- In the Portable profile of a portable copy, because the password store belongs to one computer and a portable copy has to run on any computer.
- When GpgFrontend cannot find any password store on this computer. On Linux
this means the
libsecretlibrary is missing. Install it (libsecret-1-0on Debian and Ubuntu,libsecreton Fedora), then start GpgFrontend again.
Point at the greyed-out choice to see why it is not available.
On Linux the choice can also be shown, but still not work. For example, no password service such as GNOME Keyring or KWallet is running, or it is locked. Then, when you pick System keychain, GpgFrontend shows System Keychain Unavailable and sets the list back to No extra protection (default). Click Show Details… in that window to see the reason your system gave. Start or unlock your password service, then try again.
If the keychain is locked on Linux
Section titled “If the keychain is locked on Linux”On Linux, your password service may still be locked when GpgFrontend starts, for example right after you log in. GpgFrontend then asks the system to unlock it.
-
Your system shows its own unlock window. If you do not see it, look behind the GpgFrontend window and other open windows.
-
Type the password for your keyring. This is often your login password.
If the keychain stays locked, GpgFrontend shows Secure Key Unavailable. This window can also appear on Windows and macOS. It means the secret in the password store could not be read. Besides a locked keychain, the store may have been reset, or the profile was copied from another computer or user account.
Click Show Details… to see the reason your system gave. Then:
- Click Quit, unlock your keychain, and start GpgFrontend again. This costs nothing and keeps your data.
- Only click Reset Secure Key if you are sure the secret is gone for good. Everything the key protected becomes unreadable. Two windows called Reset to Default ask you to confirm first: click Reset to Default in the first and Yes in the second. Go Back or Cancel stops the reset.
If the keychain stops working
Section titled “If the keychain stops working”If you chose System keychain but GpgFrontend cannot use it when it starts, it shows System Keychain Unavailable. The program’s key then stays without extra protection, and the setting goes back to No extra protection (default). You can choose System keychain again once your password service works.
PIN at startup
Section titled “PIN at startup”You choose a PIN, and GpgFrontend asks for it every time it opens. Nothing it saved can be read until you type it. The PIN must be at least 8 characters long.
This is the strongest of the three. It is also the only one where you can lose data.
Use Change PIN… on the same settings page to pick a new one later. You need the current PIN to do it.
To stop using a PIN, pick another choice in the list and click OK. The Unlock Application Key window then asks for your current PIN. Type it and click Unlock. If you close that window instead, nothing changes and the PIN stays. Its other button is labelled Quit, but here it does not close GpgFrontend.
If GpgFrontend finds at start that a PIN is set but the key on disk is not locked with it, it shows Application Key Not Protected. This can happen when an earlier change was cut off halfway. GpgFrontend turns the PIN setting off and leaves the key as it is. Choose PIN at startup again if you want it.
Profiles that have no choice
Section titled “Profiles that have no choice”- A profile opened from a file uses the file’s passphrase to protect its key. The whole Application Key Protection: list and Change PIN… are greyed out. To change the protection, export the profile again with a new passphrase. See Profiles.
- A temporary profile has no key protection at all. Its key is held in memory only and is destroyed when the window closes, so there is nothing to protect. The list and Change PIN… are greyed out.
Secure Level
Section titled “Secure Level”On the same settings page, just above the key protection choices, you will find Secure Level:. It has four levels:
| In the list | What it does |
|---|---|
| Standard (no extra hardening) | No extra hardening. Default |
| Enhanced (wipe freed memory) | Wipes memory as soon as it is finished with it. |
| Strong (also lock memory pages) | Also keeps sensitive memory out of the swap file. |
| Maximum (also rotate keys weekly) | Also changes the program’s internal key every week. |
The first three are about memory, and are explained on Memory Security.
Maximum is the only level that changes how the key is used. Every week, GpgFrontend makes a new key from the program’s key, and saves new data with it.
Weekly keys help little while the program’s key has No extra protection. The settings page says so when you pick both, and suggests System keychain or PIN at startup.
Changes on the Advanced settings page only take effect after GpgFrontend restarts. GpgFrontend offers to restart for you.
Where the Key Is Kept
Section titled “Where the Key Is Kept”The key lives inside the profile you are using, in a folder called secure.
If you use several profiles, each has its own key, and
each can have its own protection setting.
If the Key File Is Missing
Section titled “If the Key File Is Missing”Directory@profile/ your profile folder
Directorysecure/
- app.key the program’s key
The key is kept in a file called app.key in the secure folder. If that file
is gone, but the profile still holds data locked with it, GpgFrontend shows
Secure Key Missing when it starts. This usually happens when the data
folder was restored or copied without the key file.
- Click Quit to keep your data safe. Put
app.keyback from your backup, then start GpgFrontend again. Click Show Details… to see where the file is expected. - Click Create New Key only if you cannot get the file back. Two windows called Reset to Default ask you to confirm: click Reset to Default in the first and Yes in the second. GpgFrontend then starts, but everything it locked with the old key can never be read again.
Good Habits
Section titled “Good Habits”- Back up your OpenPGP private keys and revocation certificates separately. This key is not a backup of anything.
- If you pick a PIN, write it down and keep it somewhere safe.
- If you want protection with nothing to remember, pick System keychain.