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

# Darkrelay Messaging

<figure><img src="/files/Rjm4DMCyMUb3tihDD7Ac" alt=""><figcaption></figcaption></figure>

Darkrelay Messaging is GhostWare’s encrypted communication layer. It allows users, dApps, and relays to exchange information privately without exposing content or metadata. Only the intended recipient can read what is sent.

Darkrelay combines off-chain encryption with on-chain commitments. This means that while the blockchain records proof that a message exists, the actual data stays encrypted and invisible to outsiders.

### How It Works

1. **End-to-End Encryption**\
   Every message is encrypted using Hybrid Public Key Encryption (HPKE). Only the sender and recipient share the secret needed to read it.
2. **Off-Chain Storage**\
   Encrypted messages are stored off-chain or passed directly between peers. The blockchain stores only a commitment or reference, not the message itself.&#x20;
3. **Commitment Anchors**\
   A small piece of data is placed on-chain to prove that a message exists without revealing its contents. This anchor lets users verify authenticity later if needed.
4. **Selective Disclosure**\
   Users can choose to share message contents or proofs later. This makes it possible to prove communication happened without revealing details.

### Why It Matters

Most blockchain communication is public, which makes privacy impossible. Even metadata such as timing, sender, and receiver can reveal sensitive information. Darkrelay protects both content and context.

This system is helpful for:

* Private negotiations and coordination between users or DAOs.
* Anonymous messaging between wallets.
* Secure communication between GhostWare modules, such as GhostPay and GhostRoute.

### Key Features

* **End-to-End Encryption:** Only intended recipients can decrypt messages.
* **Metadata Protection:** Relay nodes cannot see sender or receiver identities.
* **Light On-Chain Footprint:** Only small proofs or commitments are stored publicly.
* **User Control:** Full ownership of message keys and visibility settings.

### The Result

Darkrelay Messaging makes private communication possible on Solana. It turns messages into encrypted events that only authorized users can read. Combined with GhostOS, ShadowNet, and the ID Obfuscation Layer, it completes GhostWare’s privacy stack.


---

# 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://ghostwareos.gitbook.io/docs/architecture/darkrelay-messaging.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.
