# Privacy and Security

Social Registry typically contains rich demographic information of persons. Hence, privacy and security of this data if utmost importance. OpenG2P offers several features related to privacy and security

* Encryption of PII at rest
* Anonymized eligibility and entitlement determination
* Anonymous data for reporting
* Role based access to data
* Multi factor authentication
* Robust secure deployment infrastructure
* HSM based Key Manager for encryption and digital signatures
* [Secure input handling](https://openg2p.gitbook.io/1.2-reorg/Kh7IXykse3jg1KAO6g2b/social-registry/privacy-and-security#secure-input-handling)

## Secure input handling <a href="#secure-input-handling" id="secure-input-handling"></a>

Input security is handled in the following ways:

* Input validation
* Memory safe programming language (Python)
* Type safe programming using Python Pydantic
* ORM capabilities to avoid SQL Injection threats

## Encryption of PII

* Social Registry fields can be encrypted and stored. Or the registry data can be anonymized.
* Social Registry uses [MOSIP Keymanager](https://docs.mosip.io/1.2.0/modules/keymanager) module for cryptography APIs. Keymanager uses HSM to store keys and perform operations like encrypting, signing, etc. so that the real keys are stored in HSM.
* Know more about [Privacy and Security in OpenG2P](/1.3/privacy-and-security.md). And about [Keymanager integration](/1.3/privacy-and-security/key-manager.md).
* Link to [Configuration and source code](/1.3/pbms/developer-zone/repositories/openg2p-security.md).

<figure><img src="/files/2AGC17oQc7KTbiYC1UBh" alt=""><figcaption></figcaption></figure>


---

# 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.openg2p.org/1.3/social-registry/features/privacy-and-security.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.
