Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / library / e2ee-p2p / AGENTS.md

AGENTS.md1.7 KiBRenderedCodeRaw
1# AGENTS.md — library/e2ee-p2p/ (':library:e2ee-p2p')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `library/e2ee-p2p/` + allowed shared modules. Do not root-scan.
4
5<!-- last-reviewed: 2026-10-16 -->
6- Gradle: :library:e2ee-p2p / dir: library/e2ee-p2p/
7- Package roots present: (E2EE + P2P primitives — `com.vayunmathur.e2ee` package)
8- Entry files: E2ee.kt + PqcIdentity.kt (no MainActivity/Route — library)
9- Deps: (none — Rust PQC core via JNI)
10- Metadata: metadata_data/library-e2ee-p2p.md (absent — libraries have none by design)
11- Rust: yes / screenshotTest: no
12
13## Overview
14**Purpose:** End-to-end encryption + peer-to-peer primitives — PQC identity keys, AES content keys, safety numbers, invite fingerprints. Powers everysync vaults, voxels multiplayer, backup crypto. Relay/server sees ciphertext only.
15**How to use:** Identities via `PqcIdentity` (Rust `PqcNative`); content via `E2ee` + `E2eeKeyStore`; verify contacts with `SecurityCode`/`InviteFingerprint`.
16**Entry points:** `E2ee.kt` → `PqcIdentity.kt` → `PqcNative.kt` (Rust bridge).
17**Gotchas:** Crypto changes need adversarial review; identity/key loss is unrecoverable by design — recovery flows (BIP-39 in backup) live in consumers, not here.
18
19## Key files
20- com/vayunmathur/e2ee/E2ee.kt
21- com/vayunmathur/e2ee/E2eeKeyStore.kt
22- com/vayunmathur/e2ee/PqcIdentity.kt
23- com/vayunmathur/e2ee/Pqc.kt
24- com/vayunmathur/e2ee/PqcNative.kt — Rust bridge
25- com/vayunmathur/e2ee/SecurityCode.kt
26- com/vayunmathur/e2ee/InviteFingerprint.kt
27- com/vayunmathur/e2ee/Hkdf.kt — HKDF-SHA256 key derivation (moved from `:library`, #884)
28
29## Verify (this module only)
30```
31./gradlew :library:e2ee-p2p:compileDevKotlin
32./gradlew :library:e2ee-p2p:lint
33```