Modelo de seguridadSecurity model
Qué protege The River, qué no, y en quién confías al usarlo. Sin marketing: si algo lo ve el servidor, aquí lo decimos.
What The River protects, what it doesn't, and whom you trust when you use it. No marketing: if the server can see something, it says so here.
- Qué ve el servidorWhat the server sees
- Claves y huellasKeys and fingerprints
- LímitesLimits
- Protocolo v2Protocol v2
Qué puede y qué no puede ver el servidorWhat the server can and cannot see
| DatoData | ServidorServer | Red / tercerosNetwork / third parties |
|---|---|---|
| Mensajes de la salaRoom messages | SÍYES — legibles por diseño; guarda los últimos 500, sellados en disco con la clave del servidor.readable by design; keeps the latest 500, sealed on disk with the server key. | NO — viajan dentro del circuito Tor hasta el servicio oculto.they travel inside the Tor circuit to the hidden service. |
Mensajes privados (/msg)Private messages (/msg) |
NO — cifrados de extremo a extremo; el servidor solo reenvía o encola el sobre.end-to-end encrypted; the server only forwards or queues the envelope. | NO |
| Contenido de adjuntosAttachment contents | NO — cada bloque va sellado para quien lo pidió.every chunk is sealed for the requester. | NO |
| Nombre, tipo y tamaño del adjuntoAttachment name, type and size | SÍYES — la oferta se anuncia a toda la sala.the offer is announced to the whole room. | NO |
| Metadatos: quién habla con quién, cuándo, tamaños, horas de conexiónMetadata: who talks to whom, when, sizes, online times | SÍYES | NO — salvo ataques de correlación de tráfico contra Tor.barring traffic-correlation attacks on Tor. |
| Tu contraseñaYour password | NO — SCRAM: guarda claves derivadas (PBKDF2, 210 000 iteraciones) que no sirven para iniciar sesión.SCRAM: it stores derived keys (PBKDF2, 210,000 iterations) that cannot be used to log in. | NO |
| Tu dirección IPYour IP address | NO — las conexiones llegan por Tor.connections arrive through Tor. | Tu proveedor ve que usas Tor, no a dónde vas.Your ISP sees that you use Tor, not where you go. |
| HWID | SÍYES — un identificador aleatorio que el propio cliente declara.a random identifier the client itself reports. | NO |
HWID
El HWID lo informa el cliente (se guarda en .the_river_machine_id) y se puede falsificar o regenerar. Un baneo por HWID frena a usuarios casuales, no a alguien decidido. Los baneos por usuario y el borrado de cuentas sí cortan el acceso de inmediato.
The HWID is reported by the client (stored in .the_river_machine_id) and can be spoofed or regenerated. An HWID ban slows down casual users, not a determined one. User bans and account deletion do revoke access immediately.
En resumen: confías en el operador del servidor para la sala y los metadatos; no necesitas confiar en él para tus privados y adjuntos si verificas las huellas.
In short: you trust the server operator with the room and with metadata; you don't have to trust them with your private messages and attachments as long as you verify fingerprints.
Claves, huellas y TOFUKeys, fingerprints and TOFU
- Cada cuenta tiene un par de claves X25519. La pública se publica en el servidor; la privada vive solo en tu equipo, en
river_identity_<usuario>.key, cifrada con tu contraseña (AES-256-GCM, PBKDF2) y con permisos0600en Linux/Termux. - Every account has an X25519 key pair. The public key is published on the server; the private key lives only on your device, in
river_identity_<user>.key, encrypted with your password (AES-256-GCM, PBKDF2) with0600permissions on Linux/Termux. - La primera vez que ves la clave de alguien, el cliente la fija en
river_known_keys.txt(trust on first use). Si después cambia, verás:[!] La clave de <usuario> cambio (huella …). Verificala por otro canal. - The first time you see someone's key, the client pins it in
river_known_keys.txt(trust on first use). If it changes later you will see:[!] La clave de <user> cambio (huella …). Verificala por otro canal.
La advertencia TOFU
The TOFU caveat
El servidor reparte las claves públicas. Un servidor malicioso podría entregarte una clave falsa la primera vez y leer tus privados sin que salte ningún aviso. La defensa es tuya: ejecuta /fingerprint y /fingerprint <usuario> y compara las huellas con tu contacto por otro canal (en persona, por teléfono). Un aviso de cambio de clave tampoco bloquea los mensajes: tómalo en serio y vuelve a verificar.
The server distributes public keys. A malicious server could hand you a fake key the first time and read your private messages with no warning at all. The defence is yours: run /fingerprint and /fingerprint <user> and compare fingerprints with your contact over another channel (in person, by phone). A key-change warning does not block messages either: take it seriously and verify again.
Copia de seguridad
Backups
Guarda una copia de river_identity_<usuario>.key. Si el archivo se pierde o no se puede descifrar, el cliente genera una clave nueva: tus contactos verán un aviso de cambio y los privados en cola cifrados para la clave vieja serán ilegibles.
Keep a copy of river_identity_<user>.key. If the file is lost or cannot be decrypted, the client generates a new key: your contacts will see a change warning and queued private messages sealed for the old key become unreadable.
Lo que no protegeWhat it does not protect
- Tu equipo. Malware o alguien con acceso a tu dispositivo y tu contraseña puede leerlo todo.
- Your device. Malware, or someone with access to your device and password, can read everything.
- Secreto hacia adelante limitado. Cada sobre usa una clave efímera, pero quien robe tu clave privada de identidad puede abrir los privados antiguos dirigidos a ti que haya capturado.
- Limited forward secrecy. Each envelope uses an ephemeral key, but whoever steals your private identity key can open old captured private messages addressed to you.
- La sala. No es E2E: el operador puede leerla y conserva historial.
- The room. It is not E2E: the operator can read it and keeps history.
- Metadatos. El servidor sabe quién existe, quién está conectado y quién escribe a quién.
- Metadata. The server knows who exists, who is online and who writes to whom.
- La base de datos del servidor. Si se filtra, las credenciales SCRAM no permiten entrar, pero contraseñas débiles pueden romperse por fuerza bruta. Usa contraseñas largas.
- The server database. If it leaks, SCRAM credentials cannot be used to log in, but weak passwords can still be brute-forced offline. Use long passwords.
Protocolo v2 en breveProtocol v2 at a glance
La especificación completa está en the_river_cpp/docs/PROTOCOL_V2.md. Todo usa OpenSSL 3 sobre tramas binarias TRV1.
The full specification is in the_river_cpp/docs/PROTOCOL_V2.md. Everything uses OpenSSL 3 over TRV1 binary frames.
AutenticaciónAuthentication
- El servidor anuncia
PROTO=2; el cliente se niega a seguir si falta. - The server announces
PROTO=2; the client refuses to continue without it. - SCRAM-SHA-256: reto con nonce, prueba del cliente y firma del servidor que el cliente verifica (autenticación mutua).
- SCRAM-SHA-256: nonce challenge, client proof, and a server signature the client verifies (mutual authentication).
- Usuarios inexistentes reciben un reto falso determinista: no se filtra quién tiene cuenta.
- Unknown users get a deterministic fake challenge: account existence is not leaked.
- Bloqueo tras 5 fallos por usuario o 10 por origen, durante 5 minutos.
- Lockout after 5 failures per user or 10 per origin, for 5 minutes.
Cifrado E2EE2E encryption
- Sobre
RE2: X25519 efímera + estática del remitente, HKDF-SHA256 y AES-256-GCM con datos asociados que atan contexto, remitente y destinatario. RE2envelope: ephemeral + sender static X25519, HKDF-SHA256 and AES-256-GCM with associated data binding context, sender and recipient.- Los adjuntos se sellan bloque a bloque; el receptor verifica tamaño y SHA-256 antes de guardar.
- Attachments are sealed chunk by chunk; the receiver checks size and SHA-256 before saving.
- Huella = primeros 16 bytes de SHA-256 de la clave pública, en grupos
xxxx-xxxx-…. - Fingerprint = first 16 bytes of SHA-256 of the public key, grouped
xxxx-xxxx-….
Historial y colaHistory and queue
- Al entrar: últimos 100 mensajes de la sala (el servidor guarda 500).
- On login: the latest 100 room messages (the server keeps 500).
- Privados offline: hasta 200 por destinatario, caducan a los 7 días, se borran al entregarse.
- Offline PMs: up to 200 per recipient, expire after 7 days, deleted once delivered.
- Límites de ritmo: 60 mensajes/min, 12 adjuntos/min.
- Rate limits: 60 messages/min, 12 attachments/min.
Clientes v1 incompatibles
v1 clients are incompatible
No hay modo de compatibilidad: el inicio de sesión v1 equivalía a pasar el hash. Un cliente v1 recibe SYSTEM: CLIENTE OBSOLETO. Actualiza al protocolo 2. y se cierra la conexión. Las credenciales v1 se migran solas en el servidor; los usuarios no tienen que hacer nada salvo actualizar el cliente.
There is no compatibility mode: v1 login was effectively pass-the-hash. A v1 client receives SYSTEM: CLIENTE OBSOLETO. Actualiza al protocolo 2. and the connection is closed. v1 credentials migrate automatically on the server; users only need to update the client.
¿Encontraste un problema de seguridad? Abre un aviso en el repositorio sin incluir datos sensibles.
Found a security problem? Open a report on the repository without including sensitive data.