> For the complete documentation index, see [llms.txt](https://docs.fenixpyre.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fenixpyre.com/fenixpyre-for-admins/fenixpyre-windows-agent/how-to-install-and-use-fenixpyre-encryption-decryption-tool.md).

# How to install and use FenixPyre Encryption/Decryption Tool

## Offline FileKey Decryption for FenixPyre Tenants

This guide walks you through loading offline file keys and performing decryption using the FenixPyre Encryption/Decryption Tool. It is intended for **FenixPyre** customers who decrypt files using a FileKeys package and their organization's Master Key.

### 📋 Prerequisites

Before you begin, ensure you have the following:

* **Administrator Privileges** - You must have Admin rights on the Windows machine to install the script and modify the Windows Registry.
* **FileKeys Package** - Contact FenixPyre Support and request offline decryption assistance. After verification, a secure download link to a `.zip` archive containing the necessary file keys will be provided.
* **Master Key** - The administrator should already have access to the Master Key as a `.txt` file generated via the Admin Dashboard.

{% hint style="warning" %}
**Uninstall the FenixPyre Windows Agent first.** It is recommended to uninstall the FenixPyre Windows agent before installing the script. This avoids conflicts between the agent and the standalone enc-dec utility when accessing the local secure database and file keys.
{% endhint %}

### 📍 Quick Reference

| Item              | Value                                               |
| ----------------- | --------------------------------------------------- |
| Registry Path     | `HKEY_LOCAL_MACHINE\Software\FenixPyre\Standalone\` |
| Decryption Action | `DECRYPT`                                           |
| Progress Keys     | `status`, `detailedStatus`                          |

### ⚙️ Step-by-Step Decryption Guide

#### Step 1: Prepare the Installation Files

1. Contact the Support Team to obtain the Enc-Dec Tool ZIP and your DB file.
2. Download and extract the Enc-Dec Tool ZIP to a local directory on your machine.

#### Step 2: Install the EncDec Service

1. Open PowerShell as an Administrator. (Right-click the Start button and select **Windows PowerShell (Admin)**.)
2. Navigate to the extracted `FPEncDecService` directory:

```powershell
cd "C:\path\to\extracted\FPEncDecService"
```

3. Run the following installation command. Be sure to replace `<your_org_id>` and `<your_org_email>` with your actual credentials:

```powershell
PowerShell -ExecutionPolicy Bypass -File FPEncDecServiceInstall.ps1 -action install -orgId <your_org_id> -username <your_org_email>
```

{% hint style="info" %}
Example: `-orgId 12345 -username admin@yourdomain.com`
{% endhint %}

#### Step 3: Prepare the FileKeys Package

1. Contact FenixPyre Support and request offline decryption assistance.
2. Download the `.zip` archive provided via the secure download link and extract its contents to a known local directory.
3. Ensure you have access to the Master Key (`.txt`) generated via the Admin Dashboard.

#### Step 4: Verify Key Sync Timing (for LOADKEYS)

Before using the `LOADKEYS` action, ensure the file keys have fully synced from the FenixPyre storage system to your local storage.

{% hint style="info" %}
🔄 **Key syncing occurs every 12 hours.** 🕒 To ensure a complete set of keys is available for decryption, wait at least **12 hours** after the last encryption operation before downloading the key bundle. 📥 Attempting to download and load file keys before this window may result in missing or incomplete decryption capabilities.
{% endhint %}

> **Recommendation:** Only request or download the offline key bundle once the 12-hour sync window has passed.

#### Step 5: Load the FileKeys via the Registry

1. Press `Win + R`, type `regedit`, and press **Enter** to open the Registry Editor.
2. Navigate to the following path:

```
HKEY_LOCAL_MACHINE\Software\FPEncDecTool
```

3. Create or update the following three keys (create any that do not already exist). All keys are of type `REG_SZ`:

| Key                 | Type     | Description                                                        |
| ------------------- | -------- | ------------------------------------------------------------------ |
| `folderPath`        | `REG_SZ` | Path to the extracted folder containing the `.parquet` files.      |
| `masterKeyFilePath` | `REG_SZ` | Path to the `.txt` Master Key downloaded from the Admin Dashboard. |
| `action`            | `REG_SZ` | Set to `LOADKEYS` to initiate the key loading process.             |

{% hint style="info" %}
Use double backslashes (`\\`) or quotes for paths with spaces.
{% endhint %}

Once these values are set, the utility will begin loading keys into the local database. You can monitor progress using the `status` and `detailedStatus` keys in the same registry path.

#### Step 6: Perform Decryption Using Loaded FileKeys

Once the key loading process completes successfully:

1. Update the `folderPath` registry key to point to the folder containing the encrypted files.
2. Change the `action` registry key to `DECRYPT`.

This will trigger the utility to decrypt the files in the specified folder using the locally available file keys.

#### Step 7: Verify Decryption

1. Navigate to the folder you specified in the `folderPath` registry key.
2. Verify that the files have been successfully decrypted and are accessible.

***

{% hint style="success" %}
**Need Help?** If you encounter any errors during key loading or the files fail to decrypt, please reach out to the Support Team with a screenshot of the Registry settings and the `status` / `detailedStatus` values.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fenixpyre.com/fenixpyre-for-admins/fenixpyre-windows-agent/how-to-install-and-use-fenixpyre-encryption-decryption-tool.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
