# Data Layer

Given the strict limitations and high costs of data storage in blockchain networks like Ethereum, and considering that the volume of ciphertexts and keys for Fully Homomorphic Encryption can reach several gigabytes, we have adopted a strategy to avoid placing such large amounts of data directly on the blockchain. Instead, we utilize IPFS-based external data storage to manage the data. This approach not only addresses the storage limitations and cost inefficiencies but also ensures efficient, scalable, and decentralized data management. On the on-chain side, instead of storing the ciphertexts and keys themselves, we only place commitments and meta-data corresponding to the files located on the external storage. The blockchain serves as a form of a hash table, pointing to the location of the data and ensuring their integrity and authenticity through a system of data commitments. This allows us to optimize the costs of using the blockchain while providing a reliable and scalable infrastructure for working with encrypted data of arbitrary scale. This data storage model makes our platform ideally suited for a wide range of applications requiring high data confidentiality and security.


---

# 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.fairmath.xyz/fhe-computer/architectural-layers/data-layer.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.
