> For the complete documentation index, see [llms.txt](https://cryptomessenger.gitbook.io/cryptomessenger-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cryptomessenger.gitbook.io/cryptomessenger-docs/technology.md).

# ├── ⚙️ Technology

### 🔐 Encryption Model

**Hybrid RSA + AES Encryption**

CryptoMessenger.io uses a hybrid encryption model to ensure both performance and security:

* **RSA (Asymmetric Encryption)** is used during the initial handshake between users to securely exchange a session key. Each user has a unique RSA public/private keypair stored in association with their blockchain wallet.
* **AES (Symmetric Encryption)** is used to encrypt the actual message content. Once a session key is securely shared, all chat messages are encrypted with AES-256 for maximum speed and efficiency.

This ensures:

* Messages cannot be decrypted by nodes, storage providers, or even the platform team.
* Forward secrecy is supported via rotating session keys.
* Identity is cryptographically tied to a blockchain-verified keypair.

***

### 🗂️ Decentralized Storage Layer

**Peer-to-Peer Media Storage (IPFS or Similar)**

To preserve message privacy and avoid centralized control, CryptoMessenger.io uses decentralized storage for file attachments (images, voice notes, documents, etc.):

* Media files are encrypted with the same AES session key before upload.
* Files are uploaded to a peer-to-peer storage network such as **IPFS (InterPlanetary File System)** or **Arweave**.
* Only users with the appropriate decryption key can access the contents.
* Message payloads (text) are stored in-memory or minimally cached, never permanently stored on centralized servers.

This ensures:

* No central point of failure or censorship.
* Media is globally accessible but securely encrypted.

***

### 💸 Smart Contract Integration

**Reward Distribution via Smart Contracts**

The CryptoMessenger ecosystem uses smart contracts to automate the distribution of token-based rewards and manage in-app economic functions:

* **User Rewards**: Users can earn tokens for participating in the network (e.g. high engagement, verifying nodes, or inviting users).
* **Node Incentives**: Decentralized relay or storage nodes can stake tokens and earn rewards for uptime and performance.
* **Tipping & Microtransactions**: Users may send crypto tips in real time using an in-chat payment module.
* **Governance Contracts**: Token holders can vote on platform proposals through DAO-style smart contracts.

All contracts are:

* Deployed on a transparent, auditable blockchain (e.g. Ethereum, Arbitrum, or Solana).
* Open source and verifiable.
* Upgradeable via community governance (if enabled).


---

# 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://cryptomessenger.gitbook.io/cryptomessenger-docs/technology.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.
