OMEGA Protocol — Technical Specification

Author
Eduardo Camarillo [Noir0x63]
Date
Version
v1.1

Quick Answer

Formal specification of the OMEGA protocol: architecture, wire protocol, fixed 4096-byte frame format, E2EE cryptographic construction, PFS key derivation, access control, vault persistence, and operational parameters.

Key Takeaways

  • Category: Protocolo OMEGA
  • Version: v1.1
  • Published: 2026-08-12
  • Keywords: OMEGA protocol specification, wire protocol, frame format, E2EE construction, Perfect Forward Secrecy

OMEGA Protocol — Technical Specification

GitHub Repository
Date: Fecha: August 12, 2026
Author: Autor: Eduardo Camarillo [Noir0x63]
Version: Versión: v1.1
Informative — Protocol Reference

OMEGA is an ephemeral end-to-end encrypted communication relay that operates over Tor Hidden Services. All cryptographic operations execute in the browser through the WebCrypto API; the server acts as a blind relay that forwards fixed-size binary frames without access to message material, keys, or plaintext. This document specifies the architecture, wire protocol, cryptographic construction, and operational parameters of the reference implementation.

1. Scope and Status

This specification describes the OMEGA reference implementation. It defines normative behavior for interoperability and informative behavior for operational security. The document is versioned v1.1 and reflects the audited, remediated codebase.

Aspect Value
StatusReference implementation, audited (21 findings, 20 remediated)
LicenseGPL v3.0
Repositorygithub.com/Noir0x63/OMEGA
Key wordsMUST, MUST NOT, SHOULD, MAY per RFC 2119

2. System Architecture

OMEGA consists of three logical parties connected by a single transport channel:

01.Client — a browser page. Generates ephemeral ECDH keys, derives AES session keys, encrypts/decrypts messages in a Web Worker.
02.Operator (Admin) — a browser panel. Authenticates with RSA-PSS, terminates E2EE, stores no plaintext outside RAM.
03.Relay — a Node.js/Express + WebSocket server. Forwards fixed-size frames; never holds keys or plaintext.

The relay's identity is volatile: a fresh .onion address is generated on every boot and previous key material is destroyed. The relay binds to 127.0.0.1:3000 by default; Tor publishes the hidden service.

3. Identity and Key Management

// 3.1 Master identity

A one-time keygen step generates an RSA-4096 master key pair:

Artifact Content Distribution
master_public.pemRSA-4096 public key (SPKI)Injected into the client build
master_private.encRSA-4096 private key (PKCS8), AES-256-GCM encryptedAdmin-only, decrypted in browser
server_secrets.encAdmin HMAC secret + server nonce (JSON)Relay at rest

master_private.enc is protected with a user passphrase via PBKDF2 (600,000 iterations) + AES-256-GCM. The passphrase is irrecoverable: loss of the passphrase permanently destroys the identity.

// 3.2 Ephemeral session material

The client and the operator each generate an ephemeral ECDH P-256 key pair per session. The shared secret is computed locally on both ends and never transits the relay.

Property

Perfect Forward Secrecy (PFS). The ECDH shared secret is bound into the message key derivation via HKDF. A future compromise of the RSA master key does not decrypt past sessions, because the ephemeral ECDH secret is never serialized into the RSA-encrypted INIT payload.

4. Transport and Frame Format

All traffic — signals and noise — travels as fixed 4096-byte binary frames over a single WebSocket connection:

Offset Size Field Semantics
04payload lengthUint32LE; 0 = pure noise frame
40..4092payloadUTF-8 JSON message
4 + lenremainderrandom paddingCSPRNG fill; defeats length correlation

A client MUST send constant-size noise frames on a random interval (1–6 s) while connected. The relay MUST drop frames whose length field is zero or greater than 4092. Every frame must be exactly 4096 bytes on the wire.

5. Wire Protocol

Messages are JSON objects with a type field. The following message types are normative:

Type Direction Purpose
HANDSHAKE / HANDSHAKE_ACKC→R / R→CSession registration (32-hex sessionId)
ECDH_EXCHANGEC↔A via RPublic ECDH key relay (zero-knowledge)
REQ_POW / POW_CHALLENGEC→R / R→CAdaptive proof-of-work handshake
REQ_CHALLENGE / AUTH_CHALLENGEA→R / R→AAdmin RSA-PSS challenge
ADMIN_AUTHA→RDomain-separated RSA-PSS signature
INITC→R→AIdentity + RSA-OAEP-wrapped token, attestation key
ATTEST_CHALLENGE / ATTEST_RESPONSER↔C30s ECDSA P-256 liveness attestation
ASYNC_MSG / SERVER_MSGC↔AAES-256-GCM encrypted messages
FILE_META / FILE_CHUNKA→CEncrypted chunked file transfer
BROADCASTA→CEncrypted broadcast to all sessions
HISTORY / NEW_MESSAGER→C/AVault replay and delivery
PURGE / PURGE_EVENTA→R / R→allAdmin-initiated vault wipe

// 5.1 Session lifecycle

A session is identified by a 128-bit random sessionId (32 lowercase hex). The relay accepts at most 2 concurrent connections per session and expires sessions after 1 hour. A client MUST complete the ECDH exchange within 5 s of the handshake or the relay closes the connection.

CLIENT            RELAY             OPERATOR
  |  HANDSHAKE(sid)  |                 |
  |---------------->|                 |
  |  HANDSHAKE_ACK   |                 |
  |<----------------|                 |
  |  ECDH_EXCHANGE   |  ECDH_EXCHANGE  |
  |  pubKey (C)      |---------------->|
  |                  |  ECDH_EXCHANGE  |
  |                  |<----------------|
  |  ECDH_EXCHANGE   |  pubKey+sig (A) |
  |<----------------|                 |
  |        E2EE derived locally         |
  |        (relay never sees secret)   |

6. Cryptographic Construction

Primitive Purpose
AES-256-GCMMessage confidentiality + integrity, unique IV per message
ECDH P-256Ephemeral key agreement (E2EE), PFS binding
PBKDF2 (600k, SHA-256)Stage-1 KDF: brute-force resistance on user token / passphrase
HKDF-SHA256Stage-2 KDF: binds ephemeral ECDH secret as salt
RSA-4096 OAEPWraps INIT payload (token, session binding)
RSA-4096 PSSAdmin challenge-response; signs ECDH public keys (domain-separated)
ECDSA P-256Client liveness attestation every 30 s
SHA-256PoW, ECDH fingerprint, session hashing, integrity checks

// 6.1 Message key derivation

The AES message key is derived in two stages, identical on the client worker and the operator:

// Stage 1 — PBKDF2: brute-force resistance
pbkdfBits = PBKDF2(password=token, salt=sessionId, iters=600000, sha256, 256);

// Stage 2 — HKDF: binds the ephemeral ECDH secret (PFS)
hkdfSalt  = ecdhSecret || zeroes(32);
msgKey    = HKDF(ikm=pbkdfBits, salt=hkdfSalt, info="omega-v1-msg-key", sha256)
            -> AES-GCM 256, non-extractable

A hard failure occurs if the ECDH secret is absent at worker initialization (SEC_FAULT_NO_ECDH). No message key is ever derived without the ephemeral secret.

// 6.2 Domain separation

All RSA signatures are bound to their purpose with a domain prefix, preventing cross-protocol signature reuse:

// Admin authentication (VULN-03 mitigation)
signedNonce  = "OMEGA_ADMIN_AUTH:" + nonce;

// ECDH public key authentication (H3)
signedKey    = "OMEGA_ECDH:" + sessionId + ":" + publicKeyHex;

// Replay to another session fails on the sessionId component.

7. Access Control and DoS Resistance

// 7.1 Admin authentication

The admin route is a rotating HMAC path derived from a daily/hourly nonce:

dayNonce   = floor(now / 86400000);
hourNonce  = floor(now / 3600000);
adminPath  = HMAC-SHA256(secret, dayNonce + ":" + hourNonce + ":" + serverNonce);
// The previous hour's path is accepted to avoid logout at hour rollover.

Authenticating as admin requires completing adaptive PoW, then signing a challenge nonce with the RSA-PSS master key. Admin assets are served only via the token route — never as static files — and are integrity-pinned with CSP, SRI, and a Service Worker pin.

// 7.2 Proof of work

PoW is adaptive to connection load. Difficulty is the number of leading zero bits of SHA-256(nonce + challenge):

Relay load Difficulty (bits)
≤ 50% connections16
50% – 80%20
> 80%24

PoW is required before the admin challenge, before INIT, and before client-initiated vault writes. Challenges expire after 60 s; the message rate is limited to 50 frames per 10 s per socket.

8. Vault and Persistence

The vault stores only ciphertext records with minimal metadata. Records are truncated to the most recent 5000 and purged every 24 hours, or on admin command (PURGE).

{
  "id":   "<16 random bytes hex>",
  "type": "ASYNC_MSG | SERVER_MSG | BROADCAST",
  "payload": "<base64 AES-GCM ciphertext>",
  "ts":   "<epoch ms>"
}

Vault writes are coalesced with a 1-second write-behind to prevent disk amplification under load. On shutdown, the vault is flushed before the process exits.

9. Operational Parameters

Parameter Value
Frame size4096 bytes
Max connections per session2
Max total connections500
Session lifetime1 hour
ECDH window5 s after handshake
PoW difficulty16–24 bits adaptive
Message rate limit50 / 10 s per socket
Vault capacity5000 records
Vault purgeevery 24 h + admin PURGE
Attestation interval30 s, fail-closed after 3 misses
File chunk size2048 bytes

10. Security Properties

E2EE confidentiality — AES-256-GCM keys derived only from material that never transits the relay.
Perfect Forward Secrecy — ephemeral ECDH bound into KDF; RSA compromise cannot decrypt history.
Authenticated ECDH — operator signs its ephemeral key with RSA-PSS, bound to sessionId.
Session binding — sessionId pinned to the first ECDH fingerprint; substitution rejected.
Code integrity — client worker SHA-512 pinned; admin assets CSP + SRI + Service Worker pin.
Replay resistance — message and file-chunk monotonic counters.
Traffic analysis resistance — fixed frames, random padding, stochastic noise, no IP rate limiting.
Memory hygiene — plaintext buffers zeroized after use; private keys non-extractable.

The "zero-trust against the relay operator" property holds only under deployment scenario (a): self-hosted on operator-controlled hardware with a benign operator. Rented VPS (b) requires additional monitoring; Tor onion (c) adds transport anonymity without changing the host trust level. Post-quantum migration (ML-KEM) is planned; ECDH P-256 and RSA-4096 remain vulnerable to a CRQC.

Related Articles