mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-11-19 15:18:06 +01:00
feat: implement end-to-end encryption for room keys with secure storage and migration support
This commit is contained in:
@@ -38,7 +38,8 @@ public class SavedServer
|
||||
|
||||
/// <summary>
|
||||
/// Cached room content keys for end-to-end encrypted channels on this server,
|
||||
/// keyed by channel name (base64). Like RefreshToken, these live only on the
|
||||
/// keyed by channel name and encrypted at rest (see RoomKeyProtector; legacy
|
||||
/// entries were plain base64). Like RefreshToken, these live only on the
|
||||
/// user's machine — the server never sees them.
|
||||
/// </summary>
|
||||
public Dictionary<string, string> ChannelKeys { get; set; } = [];
|
||||
|
||||
@@ -9,6 +9,9 @@ public static class ConfigManager
|
||||
|
||||
private static readonly string ConfigPath = Path.Combine(ConfigDir, "config.json");
|
||||
|
||||
/// <summary>Directory holding the client config and local key material.</summary>
|
||||
public static string ConfigDirectory => ConfigDir;
|
||||
|
||||
// Load-mutate-save cycles run from both the UI thread and background tasks
|
||||
// (token refresh, room keys, last-read checkpoints) — serialize file access.
|
||||
private static readonly Lock FileLock = new();
|
||||
|
||||
Reference in New Issue
Block a user