# How to decrypt files using FenixPyre Standalone Encryption Utility ?

**📝 Prerequisites**

1. **Request FileKeys Package**\
   To initiate the process, contact FenixPyre Support and request offline decryption assistance. A secure download link will be provided upon verification.
2. **Download and Extract Package**\
   The download will be a `.zip` archive containings files with the necessary file keys. Extract the contents to a known local directory.
3. **Ensure Access to Master Key**\
   The administrator should already have access to the **Master Key** as a `.txt` file generated via the Admin Dashboard.

***

**⚙️ Configure Registry for Offline FileKey Loading**

Update the registry with the following entries to load the file keys into the local secure database:

**Registry Path:**\
`HKEY_LOCAL_MACHINE\Software\FenixPyre\Standalone\`

| Key             | Type     | Description                                                        |
| --------------- | -------- | ------------------------------------------------------------------ |
| `folderPath`    | `REG_SZ` | Path to the extracted folder containing the `.parquet` files.      |
| `masterKeyPath` | `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.             |

> ℹ️ Use double backslashes (`\\`) or quotes for paths with spaces.

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.

| Key              | Description                                                                      |
| ---------------- | -------------------------------------------------------------------------------- |
| `status`         | Displays the current state (`PENDING`, `IN_PROGRESS`, `COMPLETED`, or `FAILED`). |
| `detailedStatus` | Provides descriptive progress or error information.                              |

***

**🔓 Perform Decryption Using Loaded FileKeys**

Once the key loading process completes successfully:

1. Update the `folderPath` 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.

***

#### ⏱️ Key Sync Timing (for `LOADKEYS`)

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

* 🔄 **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.

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


---

# 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://docs.fenixpyre.com/fenixpyre-for-admins/admin-dashboard/fenixpyre-standalone-encryption-utility/how-to-decrypt-files-using-fenixpyre-standalone-encryption-utility.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.
