# EFS

## <mark style="color:red;">❊ What is EFS?</mark>

The <mark style="color:red;">**`Encrypting File System`**</mark> on Microsoft Windows is a feature introduced in version 3.0 of NTFS that provides filesystem-level encryption. The technology enables files to be transparently encrypted to protect confidential data from attackers with physical access to the computer.

## <mark style="color:red;">❊ EFS vs Bitlocker</mark>

BitLocker helps protect an entire drive against offline attacks, whereas EFS can provide additional user-based file level encryption for security separation between multiple users of the same computer. EFS can also be used in Windows to encrypt files on other drives that aren't encrypted by BitLocker.

In short, <mark style="color:red;">**`BitLocker`**</mark> is full disk encryption, and <mark style="color:red;">**`EFS`**</mark> is individual file encryption.

## <mark style="color:red;">❊ How It Works with Yubikey</mark>

Usually with Bitlocker, you unlock your drive once with your Yubikey / smart card and the drive stays unlocked until you lock it again or restart your computer.

EFS on the other hand is much more adamate about ensuring your files are only accessed by the correct people.

With EFS, you can specify the "cache" time between authentication requests. This means that when you attempt to access or open a file, you will immediately be prompted by your Yubikey to authenticate. After that successful authentication, the computer will "remember" you for a period of time and lets you continue using the file uninterrupted. However, after that cache period is over, you will be asked again to authenticate the next time you access the file.

The cache duration can be increased or even decreased to as little as asking you to authenticate every 5 minutes. Or you can make EFS remember you for the entire day once you authenticate successfully the first time.

## <mark style="color:red;">❊ Configure EFS</mark>

Click ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FWAcReX5Fe4Boh9UYQRVK%2Ficon_windows_start.png?alt=media\&token=5abae15f-338a-4dc5-8315-653d6d88c1bf) -> <mark style="color:red;">**`Run`**</mark> -> type <mark style="color:red;">**`gpedit.msc`**</mark>

You will need to navigate to the following location:

```
📃 Local Computer Policy
   💻 Computer Configuration
      📁 Windows Settings
         🔒 Security Settings
           📁 Public Key Policies
              📁 Encrypting File System
```

Once you locate <mark style="color:red;">**`Encrypting File System`**</mark>, right-click and select <mark style="color:red;">**`Properties`**</mark>:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FaZkEFU30WI1iNfnU2XdS%2Fefs_group_1.png?alt=media&#x26;token=09624859-548d-4df0-9258-0f68a0db79e6" alt=""><figcaption></figcaption></figure>

You will see a new dialog with a few tabs and options:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FxtilNClgQlmELfINzzF5%2Fefs_group_2.png?alt=media&#x26;token=e468a6e4-265a-413f-8dcf-683beaaf55f8" alt=""><figcaption></figcaption></figure>

The settings you select depend on your preferences. In our demo, we want a pretty locked down system, so we've selected the following:

* <mark style="color:red;">**`Require a smart card for EFS`**</mark>
* <mark style="color:red;">**`Display key backup notifications when user key is created or changed`**</mark>

Then select the <mark style="color:red;">**`Cache`**</mark> tab.

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FPx2O3aV7LeVqHZuLk6Fs%2Fefs_group_3.png?alt=media&#x26;token=2dac1208-aa7b-4c74-9306-bf95a2ab12a4" alt=""><figcaption></figcaption></figure>

In this section, we're only going to allow it to cache the encryption key for <mark style="color:red;">**`120 minutes`**</mark> (2 hours).

You can set the cache timeout for as long or short as you want. The lower the time, the more it'll ask for authentication directly from your Yubikey.

Once you've configured the desired settings, click <mark style="color:red;">**`Apply`**</mark> and <mark style="color:red;">**`OK`**</mark>.

## <mark style="color:red;">❊ Encrypting Files</mark>

The process of encrypting a few of your files is rather simple. Locate a file you wish to test with first, in case something happens or it is not configured properly, you won't lose anything valuable. Then once you have the process down and understand how ti works, you can then encrypt your valuable data.

To encrypt, right -click on a file and select <mark style="color:red;">**`Properties`**</mark>.

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FkqnKixdVoe2bmvyOPsrD%2Fefs_1.png?alt=media&#x26;token=23999819-e330-4ec1-9bf0-6f60de74c0fc" alt=""><figcaption></figcaption></figure>

At the bottom of the dialog box, select ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FMf3ZCc7zgtTevpBYBOQp%2Fefs_2.png?alt=media\&token=993c42b3-f827-4376-b1ea-99dc3b9dbd8f)

You will then see another dialog box appear:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FOi6xqYLjLAoyfbElLhjB%2Fefs_3.png?alt=media&#x26;token=175ebb0a-861b-43d0-9e08-bfb5efdbdf29" alt=""><figcaption></figcaption></figure>

Enable / check the option at the bottom <mark style="color:red;">**`Encrypt contents to secure data`**</mark>.

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FtyA5HPIydxvZghWqdR9L%2Fefs_4.png?alt=media&#x26;token=6ee8bba9-d5a2-4abd-9286-268187f66f3a" alt=""><figcaption></figcaption></figure>

Once checked, press ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FgypYuWrCCBEkXiY5gKRT%2Fefs_5.png?alt=media\&token=6905ee85-0373-403d-974a-646e03f0f8d0)

A dialog appear:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FzkcvhTujfj6eZgml7ges%2Fefs_6.png?alt=media&#x26;token=cf4f1721-b6ec-4cb7-805d-e897b609460e" alt=""><figcaption></figcaption></figure>

For this tutorial, we will select <mark style="color:red;">**`Encrypt the file only`**</mark>.

{% hint style="warning" %}
Once you press OK to encrypt the file, physically look at your Yubikey. If the "Y" is blinking, you will need to touch your device in order to complete the encryption process.

\
Touching your Yubikey will be a requirement each time you wish to access your encrypted file depending on how you've configured your PIV touch policies. You will not see a dialog appear on-screen telling you to touch the key, so you will need to physically pay attention to it and touch it if it blinks.
{% endhint %}

At this point, if you click the ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FMf3ZCc7zgtTevpBYBOQp%2Fefs_2.png?alt=media\&token=993c42b3-f827-4376-b1ea-99dc3b9dbd8f) button again and look at the checkbox to encrypt data, a new button should be enabled labeled ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2Fdtof1ElrlhqE5zrfVIHV%2Fefs_8.png?alt=media\&token=d051af40-3328-42ec-8c1b-49d33fd34b5d)

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FPKj1I3KWEizYVgSoZbl2%2Fefs_7.png?alt=media&#x26;token=3729af17-0d09-42aa-8cf1-b77388031cb4" alt=""><figcaption></figcaption></figure>

The ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2F7LZa1akCSk5AWDcYWd8t%2Fefs_8.png?alt=media\&token=d9127302-55c4-4dca-b04c-c3d7f294e1d5) dialog should display certificates that are able to access this file.

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FoouORjcai10UXOTyHN2o%2Fefs_9.png?alt=media&#x26;token=0721da4c-7242-481e-98a5-431192b6813c" alt=""><figcaption></figcaption></figure>

If you do not see anything in this list, that is fine. Close out all the dialog boxes and return to the file you were encrypting.

Depending on the file, you should now see a yellow lock integrated into the icon:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FqmAwKBDuo6rmFNHEMqXb%2Fefs_10.png?alt=media&#x26;token=8939aa05-0f4f-4367-9872-87e89cca8eb6" alt=""><figcaption></figcaption></figure>

After you first enabled encryption for your file, that counts as one authentication. Which means your key is cached and you can freely access the file for a certain amount of time.

If you attempt to access the file and remove your Yubikey, a dialog box will appear:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FRGAE8UNOS8xZohNNe1nZ%2Fefs_11.png?alt=media&#x26;token=1bc3b8ed-67bd-4a22-99b4-a775f04f8c08" alt=""><figcaption></figcaption></figure>

Be sure to pay attention to the icons near your clock. If you attempt to access an encrypted file and it appears that your computer may have froze and is not responding, that is a graphical glitch in Windows. Somewhere near your clock should be an icon indicating that EFS requires you to enter your Yubikey or type of your PIN.

If your Yubikey is not inserted into the USB port, you will see the following:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FD3s4WyxdugHlNTwLtIQL%2Fefs_12.png?alt=media&#x26;token=949f89f9-76ca-4963-9129-86f4a7b885f4" alt=""><figcaption></figcaption></figure>

Once you enter your Yubikey, Windows will find your certificate and ask you to enter your PIN.

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2Fa5bPgf63p9bdtGFWTWTE%2Fefs_13.png?alt=media&#x26;token=691e5254-c753-4011-9e9d-3feeb8c4676e" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">❊ EFS Certificate</mark>

EFS appears to prefer using the certificate that has been assigned to the user account via the Windows control panel.

To locate this area, click ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FWAcReX5Fe4Boh9UYQRVK%2Ficon_windows_start.png?alt=media\&token=5abae15f-338a-4dc5-8315-653d6d88c1bf) -> type <mark style="color:red;">**`Control Panel`**</mark><mark style="color:red;">.</mark>

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FZhteW18IeJpIm3JHNqoO%2Fcert_2.png?alt=media&#x26;token=fba4f917-0532-443f-8f79-c6db0d7611f0" alt=""><figcaption></figcaption></figure>

Select <mark style="color:red;">**User Accounts**</mark> option:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FOidPaNFvQI2ivtfS8wXE%2Fcert_3.png?alt=media&#x26;token=3bbf53c8-fe37-48be-a97c-b9ae664d8b9b" alt=""><figcaption></figcaption></figure>

On the next dialog, select <mark style="color:red;">**`Manage your file encryption certificates`**</mark>:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FunoNPsMWieEPfcD37SqH%2Fcert_4.png?alt=media&#x26;token=10f729e7-940c-44e6-818f-2b91872a6d78" alt=""><figcaption></figcaption></figure>

A dialog box will appear:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FdAhseFRXWFiOnkzosTpm%2Fcert_5.png?alt=media&#x26;token=b16a5303-bf4b-4428-9841-6d036dd1155f" alt=""><figcaption></figcaption></figure>

Select ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2F4QM84GVZiKmHgqaNVuDN%2Fcert_8.png?alt=media\&token=33b2001a-3842-4548-9ecc-b9739dc70625) to see the following:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FrpR7lgZQURtnr9wGlftQ%2Fcert_6.png?alt=media&#x26;token=fef5d567-7202-400d-b7b1-0171ecfe9975" alt=""><figcaption></figcaption></figure>

You may not see any certificates in the box above.&#x20;

If not, then click ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FN98RLgU5Y4Chd0YgLXZd%2Fcert_7.png?alt=media\&token=42a1a2f6-4342-4ee0-a7f5-79c81f575116) which should make a dialog appear which asks you to select the certificate you wish to use for EFS / Bitlocker.

Once you select the correct certificate, another box will appear asking you to enter your PIV PIN.

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FAZw058Rm15HSakYxHrSd%2Fcert_9.png?alt=media&#x26;token=0876f6b0-c03d-40ed-9fd9-4cd2d89af463" alt=""><figcaption></figcaption></figure>

Once the PIN has been entered, you will see:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FntTgCCxDe7qLuKB9zDkE%2Fcert_10.png?alt=media&#x26;token=b4d7be90-5f68-477c-a214-620f432175f3" alt=""><figcaption></figcaption></figure>

For the purposes of EFS, you can leave this alone and click ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2F4QM84GVZiKmHgqaNVuDN%2Fcert_8.png?alt=media\&token=33b2001a-3842-4548-9ecc-b9739dc70625) and yet another dialog will appear asking for your PIV PIN again.

Once entered, the final dialog will show a summary of your assigned certificate:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FrCkjpKuvyegihX8CRcDB%2Fcert_11.png?alt=media&#x26;token=ca5674b3-25c9-4f4b-b88c-746c521c6eae" alt=""><figcaption></figcaption></figure>

You can now close this window and your EFS certificate should be associated to your account.

When you now right-click on a file and select ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FGpjnaOZFY1Q1Jd9X2LRb%2Fcert_12.png?alt=media\&token=38c64c60-50cb-4a9b-85f0-20b910236498) you can then click on the ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FdUhRs3VINCVyySqPq8rj%2Fcert_14.png?alt=media\&token=e9612bcb-d0b7-413b-bf8e-5cd70fbf671e) in the below window:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FIXQRsNH6I6o96gz3ww4a%2Fcert_13.png?alt=media&#x26;token=6f6a7aeb-6c12-4d56-8f8e-8b9ae8b48a34" alt=""><figcaption></figcaption></figure>

Selecting the option <mark style="color:red;">**`Encrypt contents to secure data`**</mark> will now use the certificate you selected earlier in order to access or edit the file.&#x20;

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FNiJVqIKi4J9gkeJe5HHM%2Fcert_15.png?alt=media&#x26;token=2b56086e-0c9e-426d-b54b-1150a183f0c4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Side Note:**

You may notice once you enable encryption on a particular file that any time you attempt to access it afterward will result in a very slight delay between selecting it and the action taking place. You'll also notice your Yubikey light will turn on. This is due to the computer reading your Yubikey each time you access the encrypted file.
{% endhint %}

## <mark style="color:red;">❊ Adding Additional Certificates</mark>

On top of the primary certificate Windows will use for EFS, you can add secondary certificates which can access the same file.

This can be done by right-clicking on the file, select ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FGpjnaOZFY1Q1Jd9X2LRb%2Fcert_12.png?alt=media\&token=38c64c60-50cb-4a9b-85f0-20b910236498) and access the properties page:

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FIXQRsNH6I6o96gz3ww4a%2Fcert_13.png?alt=media&#x26;token=6f6a7aeb-6c12-4d56-8f8e-8b9ae8b48a34" alt=""><figcaption></figcaption></figure>

Select ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FdUhRs3VINCVyySqPq8rj%2Fcert_14.png?alt=media\&token=e9612bcb-d0b7-413b-bf8e-5cd70fbf671e) and then on the far right near the option to encrypt, select ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2F7ZO9dxegk17dTmpfXMae%2Fcert_16.png?alt=media\&token=b78a874e-779e-4641-af3a-dce3a5c17e24)

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FNiJVqIKi4J9gkeJe5HHM%2Fcert_15.png?alt=media&#x26;token=2b56086e-0c9e-426d-b54b-1150a183f0c4" alt=""><figcaption></figcaption></figure>

You will then see a dialog box which lists your current PIV certificate name, and an ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2Fa4qkSOwEQ4QSvngWHtVf%2Fcert_18.png?alt=media\&token=6d688115-824b-4c2d-bfdb-071a620b1aa9)

<figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FI0OIfv3uX4Zt0NS1d0io%2Fcert_17.png?alt=media&#x26;token=a467faf1-462e-4c5c-b9f8-71009c317ba3" alt=""><figcaption></figcaption></figure>

You will then go through the normal process of being prompted with a list of your compatible certificates and you'll be able to select another certificate which will have access to this file.

Once you've selected a new certificate, enter the PIV PIN, and then apply your changes.

You can now access the selected file with any Yubikey which has one of the two specified keys imported.

{% hint style="warning" %}
When accessing an encrypted file, be sure you physically check the Yubikey. If you have the <mark style="color:red;">**`touch policy enabled`**</mark>, you will see the light on the Yubikey blink and you will be required to actually touch the Yubikey in order to access the file; otherwise the system will just sit there and eventually time out with an access violation error.
{% endhint %}

## <mark style="color:red;">❊ Notes to Consider</mark>

I've setup the EFS system with my Yubikey a few times, and I've noticed the process can seem very buggy.

At times it will seem like once you encrypt a file, it stays unlocked, while other files will ask you to enter your Yubikey PIN or Touch almost every time you interact with them.

Lucky for you, I've spent the time trying to figure out why.

In the first part of the instructions where you were asked to click ![](https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FWAcReX5Fe4Boh9UYQRVK%2Ficon_windows_start.png?alt=media\&token=5abae15f-338a-4dc5-8315-653d6d88c1bf) -> <mark style="color:red;">**Run**</mark> -> type <mark style="color:red;">**`gpedit.msc`**</mark>, you will a dialog box which includes settings for EFS:

<div><figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FG47rzk5iTjECct38oMh0%2Fefs_group_2.png?alt=media&#x26;token=9f9014d7-108b-475e-8c42-99d5c9d4c09d" alt=""><figcaption></figcaption></figure> <figure><img src="https://3439786616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFqFACNHWgp8HSNubDNCu%2Fuploads%2FdHRhVajd4QbA8fafBMgI%2Fefs_group_3.png?alt=media&#x26;token=b5f20b28-48ed-4cde-91d0-a55d20c7c26d" alt=""><figcaption></figcaption></figure></div>

If you enable these settings, and then encrypt a file, all the files you encrypt will take on these settings.

If you come back to the EFS settings later and modify <mark style="color:red;">**`File Encryption using Encrypting File System (EFS)`**</mark> and set it to <mark style="color:red;">**`Not Defined`**</mark> or <mark style="color:red;">**`Don't Allow`**</mark>, the settings you had before disabling EFS will still apply to the already encrypted files.

This means that if you decide to change your EFS settings later, you must decrypt all of your files. Then come back to the above EFS settings, change the settings, and then go back to re-encrypt your files if you've just modified something like the cache time. If you disable EFS, then there's no need to re-encrypt.

The other note to take into account, if you <mark style="color:blue;">**`uncheck / disable`**</mark> the option <mark style="color:red;">**`Create caching-capable user key from smart card`**</mark>, then caching will be disabled completely. You will need to enter your Yubikey PIN / Touch the yubikey almost every time you interact with the encrypted file. This means that if you disable that feature, then the settings in the <mark style="color:red;">**`Cache`**</mark> tab will do nothing.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yubico.gitbook.io/yubikey5/tutorials/efs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
