Rechercher dans ce blog

Affichage des articles dont le libellé est remove from memory. Afficher tous les articles
Affichage des articles dont le libellé est remove from memory. Afficher tous les articles

jeudi 2 février 2023

Clear GPG passphrase from session memory / no symkey caching

% gpg-connect-agent reloadagent /bye

 

gpg -c --no-symkey-cache your-file.txt
-symmetric
 -c
        Encrypt with a symmetric cipher using a passphrase. [..]  gpg
        caches the passphrase used for symmetric encryption so that a decrypt
        operation may not require that the user needs to enter the passphrase.
        The option --no-symkey-cache can be used to disable this feature.

 

To make this setting persistent, add the option (without --) in ~/.gnupg/gpg.conf:

no-symkey-cache