Memory Security
While GpgFrontend works, your passphrases and your decrypted text have to sit in the computer’s memory. Secure Level decides how much effort the program puts into clearing them out again afterwards.
The default is fine for most people. Raise it if you handle something you would not want recovered from a memory dump or a swap file.
Change It
Section titled “Change It”-
Open Settings.
-
Go to Advanced.
-
Set Secure Level:.
The change takes effect after GpgFrontend restarts. It offers to restart for you.
Each profile has its own Secure Level.
If the list is greyed out
Section titled “If the list is greyed out”Whoever set up your computer can fix the Secure Level for a profile. They do
this in the profile.json file in the profile’s folder, with a
"deployment" section such as "deployment": { "SecureLevel": 2 }. Then
Secure Level: is greyed out, and you cannot change it in Settings.
The note on the page then says the setting is fixed by an ENV.ini file.
The value really comes from profile.json. To change it, edit or remove the
SecureLevel line there, then restart GpgFrontend.
The Levels
Section titled “The Levels”The old level numbers are in brackets, in case you are used to them.
Standard (0)
Section titled “Standard (0)”The default. Normal memory, with no extra work.
Even here, GpgFrontend does not simply leave things lying around. Whenever it reads text out of a box on screen, it copies it into its own buffer and wipes the original straight away.
Its most sensitive memory, such as the memory that holds your passphrases, is also wiped when the program is done with it. This happens at every level, Standard included.
Choose this if you want the best speed and the fewest surprises.
Enhanced (1)
Section titled “Enhanced (1)”Everything sensitive goes into memory buffers that are wiped clean before use and wiped again after use.
This costs almost nothing and is a sensible step up.
Strong (2)
Section titled “Strong (2)”Everything from Enhanced, plus the memory holding your secrets is locked. Locked memory cannot be written to the swap file or into a hibernation image, so it does not end up on your disk by accident.
This is the strongest memory protection. Pick it if you are handling something sensitive.
Maximum (3)
Section titled “Maximum (3)”Everything from Strong. It adds no further memory protection.
Instead, it makes GpgFrontend use a new key for its saved data every week. That is about the data the program saves, not about memory. It has a catch, so read Application Secure Key before you turn it on.
The weekly key change does not happen in a temporary profile, or in a profile you opened straight from a file. Both run from a working copy that is deleted when the window closes. A new key kept only in that copy would be lost with it, and so would everything saved with it.
Undo After an Operation
Section titled “Undo After an Operation”When you encrypt or decrypt text, the result replaces what was in the editor tab. If undo were allowed there, undoing after you encrypt would bring your plain text back. To allow that, the program would have to keep the plain text in memory.
So by default, you cannot undo an encrypt, decrypt or other operation in the text editor. The old text is gone once the result appears.
If you want undo back:
-
Open Settings and go to General.
-
Under Operation, tick Allow undoing encrypt, decrypt and other operations in the text editor.
-
Click OK. On macOS, close the window instead.
Leave it off if you handle sensitive text. As the setting’s tooltip says, undo keeps the previous text in memory, and after encrypting that is the plain text.
Unsaved Editor Tabs
Section titled “Unsaved Editor Tabs”The setting Cache text editor contents. is on by default. It keeps the text in your editor tabs, so nothing is lost when you close the program.
What it does:
- While you type, GpgFrontend keeps a copy of every unsaved editor tab. This includes tabs that hold plain text, such as a message you just decrypted.
- The copy is kept in the program’s own saved data, which is locked with the program’s key. See Application Data Storage.
- When you quit, the program does not ask you to save your tabs. It just closes.
- The next time you start GpgFrontend, your tabs come back.
The trade-off is simple. With the cache on, you never lose a draft. But your unsaved text, plain text included, stays on the disk in locked form until you close those tabs or turn the cache off.
If you would rather nothing is kept:
-
Open Settings and go to General.
-
Under Operation, untick Cache text editor contents.
-
Click OK. On macOS, close the window instead.
With the cache off, quitting asks whether to save your unsaved tabs, and any cached tabs are cleared the next time the program starts.
When you quit and the program is sure it will close, it also wipes the text out of every open tab. This happens after the cache is saved and after any question about saving has been answered.
What Strong and Maximum Need
Section titled “What Strong and Maximum Need”Locking memory is something the operating system has to allow, and some systems limit how much any one program may lock.
If your system will not allow it, GpgFrontend does not fail. It falls back to the best protection it can actually get.
On Linux you may need to raise the memory locking limit for your user if you want the full effect.
What This Cannot Do
Section titled “What This Cannot Do”GpgFrontend keeps your secrets in memory for as short a time as it can, avoids making extra copies, and wipes what it can before letting memory go.
It cannot protect you from someone who already controls your computer. If malware is running under your account, or someone is sitting at your unlocked computer, no memory setting can save you.