# Data Encryption

If you're handling personal identifying information (PII) or personal health information  (PHI) data in your forms you may want to keep that information as secure as possible to avoid any data leak if your database or server is being unfortunately compromised.&#x20;

Using ngSurvey's data encryption features you can make sure that the collected data of your choice is securely [encrypted](/data-encryption/encryption-setup.md) at the database level and only accessible using a secure private encryption key of your choice.

ngSurvey can be globally configured to support symmetric encryption using a [single encryption key](/data-encryption/encryption-setup/transparent-encryption.md) or you can configure each of your form individually with asymmetric encryption using a [PGP key pair](/data-encryption/encryption-setup/pgp-encryption.md).

Data encryption can be applied on following ngSurvey items

* Respondent text based answers
* Respondent IP, User agent, Username
* Security items data attributes
* Token email, first name, name, email
* Campaigns recipients (email, phones)
* SQL ConnectionStrings
* Active directory passwords
* System Settings passwords / api keys

{% hint style="danger" %}
Be very careful with data encryption, once the data has been encrypted its not possible to decrypt it back if you loose its encryption key. &#x20;
{% endhint %}

&#x20;


---

# 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.ngsurvey.com/data-encryption.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.
