|
| 1 | +# NWE Chat™ — Encrypted Communication Module |
| 2 | + |
| 3 | +**NitroWebExpress™ Module** |
| 4 | +Author: Maximilian Eric Alexander Rupplin von Keffikon — MEARVK LLC |
| 5 | +Installer Tech ID: Max Rupplin |
| 6 | +Port: 49230 |
| 7 | +Database: nwe_chat |
| 8 | +Context: /chat |
| 9 | +Ethics: We conceal God but do not work for Her. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## Purpose |
| 14 | + |
| 15 | +Full-featured encrypted chat server with: |
| 16 | +- **Account Management** — Register, login, change username, delete account |
| 17 | +- **End-to-End Encryption** — DH-2048 (RFC 3526 Group 14) + RSA-2048 + AES-256-GCM |
| 18 | +- **Direct Messaging** — Encrypted user↔user communication |
| 19 | +- **Broadcast** — Send to all connected users |
| 20 | +- **File Transfer** — Send files up to 25MB with E2E encryption |
| 21 | +- **Voice Notes** — Microphone recording up to 120s |
| 22 | +- **Federation** — Connect to up to 5 external NWE Chat servers (Max Rupplin design) |
| 23 | +- **Rank System** — Concealment 3 at 200+ federated connects, Gold Harvard Certificate at 300+ |
| 24 | +- **Admin Panel** — User management, ban/unban, logs, IP/Geo tracking |
| 25 | +- **Chat Logging** — All messages stored with IPs and timestamps |
| 26 | +- **Settings** — Reviewable, settable, revisable in XML and database |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## Encryption |
| 31 | + |
| 32 | +| Layer | Algorithm | Key Size | Purpose | |
| 33 | +|-------|-----------|----------|---------| |
| 34 | +| Key Exchange | Diffie-Hellman | 2048-bit | Server↔user session key derivation | |
| 35 | +| Public Key | RSA | 2048-bit | User↔user direct message signing/encryption | |
| 36 | +| Symmetric | AES-256-GCM | 256-bit | Authenticated bulk data encryption | |
| 37 | + |
| 38 | +DH parameters: RFC 3526 Group 14 (2048-bit MODP). |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## Federation & Ranks |
| 43 | + |
| 44 | +Users can connect to up to 5 external NWE Chat™ servers (of Max Rupplin's design) by IP or domain. |
| 45 | + |
| 46 | +| Connects | Rank | Reward | |
| 47 | +|----------|------|--------| |
| 48 | +| 50+ | CONNECTOR | Federation badge | |
| 49 | +| 100+ | FEDERATION VETERAN | Veteran status + priority routing | |
| 50 | +| 200+ | CONCEALMENT 3 | ★ Elevated encryption tier | |
| 51 | +| 300+ | GOLD HARVARD CERTIFICATE | ★★ Gold Letter of Certificate from Harvard. Kids. | |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## Protocol (Port 49230) |
| 56 | + |
| 57 | +``` |
| 58 | +telnet localhost 49230 |
| 59 | +
|
| 60 | +REGISTER|username|password|email → Create account |
| 61 | +LOGIN|username|password → Authenticate |
| 62 | +ADMIN|password → Enable admin mode |
| 63 | +MSG|user|text → Direct message (encrypted) |
| 64 | +BROADCAST|text → Send to all |
| 65 | +LIST → Online users with geo |
| 66 | +HISTORY → Last 30 messages |
| 67 | +ENCRYPT|DH → Initiate DH-2048 key exchange |
| 68 | +ENCRYPT|RSA → Initiate RSA-2048 |
| 69 | +ENCRYPT_ACCEPT|pubkey → Complete handshake |
| 70 | +ENCRYPT_OFF → Disable encryption |
| 71 | +FILE|user|name|size|b64 → Send file |
| 72 | +VOICE|user|durationMs|b64 → Send voice note |
| 73 | +FEDERATE|host[:port] → Connect to remote server |
| 74 | +FEDERATION_STATUS → View rank and servers |
| 75 | +CHANGE_USERNAME|new → Change username |
| 76 | +DELETE_ACCOUNT → Delete account |
| 77 | +STATUS → Module status |
| 78 | +QUIT → Disconnect |
| 79 | +
|
| 80 | +Admin commands: |
| 81 | +ADMIN_USERS → List all users |
| 82 | +ADMIN_BAN|user → Ban user |
| 83 | +ADMIN_UNBAN|user → Unban user |
| 84 | +ADMIN_LOGS → Event log |
| 85 | +ADMIN_GEO|user → User IP/geo |
| 86 | +ADMIN_IPS → All connected IPs |
| 87 | +``` |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## Database Schema (nwe_chat) |
| 92 | + |
| 93 | +- **users** — username, password_hash, salt, email, IPs, geo, admin/ban/delete flags, federation count |
| 94 | +- **messages** — sender, receiver, content, type (DM/BROADCAST/FILE/VOICE/SYSTEM), IP, timestamp |
| 95 | +- **event_log** — user events (login, register, ban, etc.) with IPs |
| 96 | +- **federation_log** — remote server connections per user |
| 97 | +- **ranks** — rank awards (CONCEALMENT_3, GOLD_HARVARD_CERTIFICATE) |
| 98 | +- **chat_settings** — configurable settings (key/value with updater and timestamp) |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## Webapp |
| 103 | + |
| 104 | +Deep blue background with rich purple offsets. CD1 button connector in blue for Strernary™/direct port routing. |
| 105 | + |
| 106 | +Pages: |
| 107 | +- **index.jsp** — Live chat interface, CD1 connector, file/mic buttons |
| 108 | +- **account.jsp** — Register, login, change username, delete account |
| 109 | +- **federation.jsp** — Connect to remote servers, rank progression |
| 110 | +- **settings.jsp** — Review and revise all settings |
| 111 | +- **admin.jsp** — Admin panel (users, ban, geo, logs) |
| 112 | +- **status.jsp** — Backend connectivity, protocol reference |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +## Scripts |
| 117 | + |
| 118 | +| Script | Purpose | |
| 119 | +|--------|---------| |
| 120 | +| `start-backend.sh` | Start TCP backend on port 49230 | |
| 121 | +| `shutdown-backend.sh` | Stop TCP backend | |
| 122 | +| `start-frontend.sh` | Deploy webapp to Tomcat | |
| 123 | +| `shutdown-frontend.sh` | Undeploy webapp | |
| 124 | +| `servlets/deploy-local.sh` | Deploy webapp | |
| 125 | +| `servlets/setup-db.sh` | Create database and seed settings | |
| 126 | + |
| 127 | +--- |
| 128 | + |
| 129 | +## Contact |
| 130 | + |
| 131 | +- GitHub: https://github.com/mearvk/Java.Web.Server.Telnet.Front.Java.21/discussions |
| 132 | +- Email: mearvk@mearvk.us | mearvk@outlook.com |
0 commit comments