Data Security
toda provides integrity commitments, wallet-based ownership, and encryption at rest.
It does not provide end-to-end encryption or redundant data availability.
Guarantees
Integrity
A memory and its inclusion proof can be checked against the root stored on Solana.
After anchoring, changes to content, metadata, order, or count produce a different root. The block time provides an upper bound on when the data existed.
Ownership
Commitment accounts are derived from wallet public keys. API access is authorized through Sign-In With Solana or an API key issued by the wallet owner.
Encryption at rest
Memory bodies are encrypted with AES-256-GCM under per-user data keys. Metadata is not encrypted.
Trust assumptions
| Assumption | Failure result |
|---|---|
| SHA-256 remains secure | Otherwise proofs can be forged |
| Solana finalizes the anchor | Otherwise the root can be rolled back |
| The verifier uses a trusted RPC | Otherwise a false root can be returned |
MASTER_ENCRYPTION_KEY remains secret | Otherwise all stored content can be decrypted |
JWT_SECRET remains secret | Otherwise user sessions can be forged |
| The authority key remains secret | Otherwise roots can be withheld or replaced |
| The wallet key remains secret | Otherwise the account and stake can be controlled |
Use finalized commitment for high-value verification.
Threat model
Covered
| Adversary | Result |
|---|---|
| Database reader | Receives encrypted content and plain metadata |
| Database writer | Cannot change anchored data without changing the root |
| Replay attacker | SIWS nonce is consumed atomically |
| Proof forger | Must break SHA-256 or produce a matching committed root |
| Capability URL holder | Limited by expiry and use count |
Data lifecycle
| Stage | Location | Protection |
|---|---|---|
| Transit | Client to API | TLS |
| Processing | API memory | Temporary plaintext |
| Stored content | Postgres | AES-256-GCM |
| Stored metadata | Postgres | Plain JSON |
| Data key | Postgres | Wrapped with a user-bound KEK |
| Commitment | Solana | Public 32-byte root |
Reporting
Report vulnerabilities privately to the maintainers. Do not publish issues that expose deployed keys or user data.
Next: Encryption and key custody.