E2EE Protocol

End-to-End Encryption protocol for WebSocket messaging. Messages are encrypted on the sender and can only be decrypted by the intended recipient — the server never sees plaintext.

TsgcWSPClient_E2EE / TsgcWSPServer_E2EE

End-to-end-encrypted direct + group messaging subprotocol. The server only sees ciphertext — keys are exchanged client-to-client.

Component class

TsgcWSPClient_E2EE

Protocol

End-to-end encryption over a WebSocket carrier

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Enterprise

Drop the component, set a few properties, go

Set a UserId, send DirectMessage or CreateGroup + JoinGroup + SendGroupMessage; keys negotiated transparently.

uses
  sgcWebSocket, sgcWebSocket_Server, sgcWebSocket_Protocol_E2EE_Server,
  sgcWebSocket_Protocol_E2EE_Client;

// --- Server -----------------------------------------------
ServerE2EE := TsgcWSPServer_E2EE.Create(nil);
ServerE2EE.Server := WSServer;

// --- Client -----------------------------------------------
ClientE2EE := TsgcWSPClient_E2EE.Create(nil);
ClientE2EE.Client := WSClient;
ClientE2EE.E2EE_Options.UserId := 'alice';
WSClient.Active := True;

// 1-to-1 encrypted direct message
ClientE2EE.SendDirectMessage('bob', 'hello bob');

// Group chat — create, join, broadcast
ClientE2EE.CreateGroup('team-42');
ClientE2EE.JoinGroup('team-42');
ClientE2EE.SendGroupMessage('team-42', 'standup at 10');
ClientE2EE.LeaveGroup('team-42');

What's inside

5 published properties, 9 methods, 19 events — pulled from the component reference.

Connection

Published properties: Client, Broker, Guid.

Lifecycle

Events: OnConnect, OnDisconnect, OnError.

Advanced

Methods: WriteData.

Diagnostics

Published properties: Version.

Encryption

Properties: E2EE_Options.

Subscriptions

Methods: Subscribe, UnSubscribe.

Specifications & references

Authoritative sources for the protocols this component implements.

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Demo Project — Demos\Protocols\E2EE Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.

Ready for End-to-End Encryption?

Download the free trial and add zero-knowledge messaging to your application.