Add E2EE messaging and VPS deployment

Add signed, encrypted messages and attachments with per-session device keys, conversation key discovery, and server-side validation. Extend CI to publish immutable container images and deploy to a VPS, with setup and protocol documentation.
This commit is contained in:
Artemy
2026-10-24 13:44:41 +07:00
parent e060b2bcbb
commit 33550d4fc9
25 changed files with 1226 additions and 15833 deletions
+5
View File
@@ -1,4 +1,5 @@
using Govor.API.Common.Extensions;
using Govor.Application.E2ee;
using Govor.Application.Infrastructure.Extensions;
using Govor.Application.Medias;
using Govor.Contracts.Requests;
@@ -49,6 +50,10 @@ public class MediaController : Controller
if (string.IsNullOrWhiteSpace(request.MimeType))
return BadRequest("Missing MIME type");
if (request.OwnerType == MediaOwnerType.Message &&
(request.MimeType != E2eeProtocol.EncryptedMimeType || !string.IsNullOrEmpty(request.EncryptedKey)))
return BadRequest("Message attachments must be encrypted on the client. Do not upload decryption keys.");
try
{
byte[] fileBytes = await ReadFileAsync(request.FromFile);