# Caching Passcodes for Symmetrical Encryption

**URL:** <https://org-roam.discourse.group/t/caching-passcodes-for-symmetrical-encryption/1631>\
**Category:** Requests\
**Created:** [May 26, 2021, 10:14pm UTC](https://org-roam.discourse.group/t/caching-passcodes-for-symmetrical-encryption/1631 "2021-05-26T22:14:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeekTea](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/geektea/32/757_2.png) [@GeekTea](https://org-roam.discourse.group/u/GeekTea)\
**Post date:** [May 26, 2021, 10:14pm UTC](https://org-roam.discourse.group/t/caching-passcodes-for-symmetrical-encryption/1631/1 "2021-05-26T22:14:46Z")

</div>

I wish to be using org-roam to keep track of all my notes across my multiple computers. Since some of my notes contain sensitive information, I want to be encrypting my notes that are being shared between my computers with Dropbox. Encryption was easy, but it continuously asks me for my passphrase between saves of a file. Being a habitual saver, this gets annoying very quick.

This is a very new topic for me as I have never tried to encrypt my data prior to this. I’m doing a lot of learning as I go. I wish to be doing a symmetrical encryption, so I wish to be caching the passphrase I use.

Here are the steps I’ve taken to try and solve this…

First, enabling encryption for new org-roam files.  
`(setq org-roam-encrypt-files t)`

Simple, and my new files are automatically becoming encrypted. Now, I want to be setting up gpg and gpg-agent.

Following instructions from [Caching Passphrases](https://www.gnu.org/software/emacs/manual/html_mono/epa.html#Caching-Passphrases)… I’ve done the following to set up gpg-agent.

```auto
~ $ cat ~/gpg-agent.conf
default-cache-ttl 3600
max-cache-ttl 3600

```

And for gpg config…

```auto
~ $ cat ~/.gnupg/gpg.conf 
use-agent

```

Then, after a reboot of gpg-agent, my understanding is that gpg agent should be caching my passphrase for an hour.

Has anyone else done this task? Is there some steps I’m missing.

---

<div class="post-metadata">

**Author:** ![sva](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@sva](https://org-roam.discourse.group/u/sva)\
**Post date:** [May 27, 2021, 7:05am UTC](https://org-roam.discourse.group/t/caching-passcodes-for-symmetrical-encryption/1631/2 "2021-05-27T07:05:03Z")

</div>

I think GPG expects the file to be located in `~/.gnupg/gpg-agent.conf`. But I’m not absolutely sure that’s a requirement.
